/* صفحهٔ نقشهٔ ایران‌گاه (/map): نقشهٔ تمام‌صفحه، نوار باریک بالا، دکمه‌های دسته روی نقشه.
   نقشهٔ پایه روشن است، پس پوستهٔ صفحه هم عمداً یک‌رنگ و روشن می‌ماند. */
@font-face { font-family: "Vazirmatn"; src: url("/fonts/city-reference/vazirmatn-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/city-reference/vazirmatn-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* MapLibre وزن را از نام قلم می‌خواند؛ «Vazirmatn Bold» باید نام یک قلم واقعی باشد */
@font-face { font-family: "Vazirmatn Bold"; src: url("/fonts/city-reference/vazirmatn-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ig-ink: #14222a;
  --ig-muted: #56656b;
  --ig-line: #d9e1df;
  --ig-paper: #ffffff;
  --ig-accent: #0f766e;
  --ig-accent-ink: #ffffff;
  --ig-bar: 48px;
  color-scheme: light;
}

html, body { height: 100%; margin: 0; }
body { background: #ebe8e1; color: var(--ig-ink); font-family: "Vazirmatn", Tahoma, sans-serif; overflow: hidden; }

.ig-map-bar {
  position: fixed; inset: 0 0 auto; z-index: 5; height: var(--ig-bar);
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
  display: flex; align-items: center; gap: 12px;
  background: var(--ig-paper); border-bottom: 1px solid var(--ig-line);
}
.ig-map-brand { font-weight: 700; font-size: 17px; color: var(--ig-accent); text-decoration: none; }
.ig-map-bar h1 { margin: 0; font-size: 15px; font-weight: 500; color: var(--ig-muted); }
.ig-map-bar h1::before { content: "/"; margin-inline-end: 10px; color: var(--ig-line); }

#ig-map { position: fixed; inset: calc(var(--ig-bar) + env(safe-area-inset-top, 0px)) 0 0 0; }
#ig-map-canvas { position: absolute; inset: 0; }

.ig-map-chips {
  position: absolute; z-index: 3; top: 10px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 2px max(10px, env(safe-area-inset-right, 0px)) 6px max(10px, env(safe-area-inset-left, 0px));
  inset-inline: 0;
}
.ig-map-chips::-webkit-scrollbar { display: none; }
.ig-map-chips--sub { top: 52px; }
.ig-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--ig-line); border-radius: 999px; background: var(--ig-paper); color: var(--ig-ink);
  padding: 6px 12px; font: 500 13px/1.4 "Vazirmatn", Tahoma, sans-serif; cursor: pointer;
  box-shadow: 0 1px 3px rgba(20, 34, 42, .14);
}
.ig-chip i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ig-chip small { font-size: 11px; color: var(--ig-muted); }
.ig-chip[aria-pressed="true"] { background: var(--ig-accent); border-color: var(--ig-accent); color: var(--ig-accent-ink); }
.ig-chip[aria-pressed="true"] small { color: rgba(255, 255, 255, .8); }
.ig-chip[aria-pressed="true"] i { box-shadow: 0 0 0 2px var(--ig-paper); }
.ig-chip:focus-visible, .ig-map-save:focus-visible { outline: 3px solid #f2b84b; outline-offset: 1px; }

.ig-map-save {
  position: absolute; z-index: 3; inset-inline-start: max(10px, env(safe-area-inset-right, 0px));
  bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--ig-line); border-radius: 999px; background: var(--ig-paper); color: var(--ig-ink);
  padding: 7px 14px; font: 500 12.5px/1.4 "Vazirmatn", Tahoma, sans-serif; cursor: pointer;
  box-shadow: 0 1px 3px rgba(20, 34, 42, .14);
}
.ig-map-save:disabled { opacity: .75; cursor: progress; }

.ig-map-message {
  position: absolute; z-index: 4; top: 50%; inset-inline: 16px; transform: translateY(-50%);
  max-width: 420px; margin: 0 auto; padding: 14px 16px; border-radius: 12px; text-align: center;
  background: var(--ig-paper); border: 1px solid var(--ig-line); box-shadow: 0 6px 24px rgba(20, 34, 42, .12);
  font-size: 14px; line-height: 1.8;
}

.ig-map-loading {
  position: absolute; z-index: 2; top: 50%; inset-inline: 0; text-align: center; color: var(--ig-muted); font-size: 13px;
  display: none;
}
#ig-map[data-state="loading"] .ig-map-loading { display: block; }
.ig-map-loading span {
  display: block; width: 22px; height: 22px; margin: 0 auto 8px; border-radius: 50%;
  border: 3px solid var(--ig-line); border-top-color: var(--ig-accent); animation: ig-spin 0.9s linear infinite;
}
@keyframes ig-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ig-map-loading span { animation: none; } }

.ig-popup .maplibregl-popup-content {
  font-family: "Vazirmatn", Tahoma, sans-serif; direction: rtl; text-align: right;
  border-radius: 12px; padding: 12px 14px 10px; box-shadow: 0 6px 24px rgba(20, 34, 42, .16);
}
.ig-popup .maplibregl-popup-close-button { left: 4px; right: auto; font-size: 18px; color: var(--ig-muted); }
.ig-popup b { display: block; font-size: 14.5px; line-height: 1.6; padding-inline-end: 14px; }
.ig-popup small { display: block; color: var(--ig-muted); font-size: 12px; margin-top: 2px; }
.ig-popup-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ig-popup-links a {
  font-size: 12px; text-decoration: none; color: var(--ig-accent); border: 1px solid var(--ig-line);
  border-radius: 999px; padding: 4px 10px;
}
.ig-popup-links a.ig-popup-primary { background: var(--ig-accent); border-color: var(--ig-accent); color: var(--ig-accent-ink); }

.maplibregl-ctrl-attrib { font-family: "Vazirmatn", Tahoma, sans-serif; }
.maplibregl-ctrl-bottom-left { padding-bottom: env(safe-area-inset-bottom, 0px); }

.ig-map-noscript { position: fixed; inset: calc(var(--ig-bar) + 16px) 16px auto; z-index: 6; background: var(--ig-paper); padding: 14px 16px; border-radius: 12px; }

/* جستجو: در نوار بالا؛ فهرست نتایج زیر نوار باز می‌شود */
.ig-map-search { position: relative; flex: 1; max-width: 420px; margin-inline-start: auto; }
.ig-map-search input {
  width: 100%; box-sizing: border-box; height: 34px; border: 1px solid var(--ig-line); border-radius: 999px;
  padding: 0 14px; background: #f6f8f7; color: var(--ig-ink); font: 400 14px/1 "Vazirmatn", Tahoma, sans-serif;
}
.ig-map-search input:focus { outline: 2px solid var(--ig-accent); background: var(--ig-paper); }
.ig-map-results {
  position: absolute; z-index: 8; top: 40px; inset-inline: 0; margin: 0; padding: 4px; list-style: none;
  max-height: min(60vh, 420px); overflow-y: auto; background: var(--ig-paper); border: 1px solid var(--ig-line);
  border-radius: 12px; box-shadow: 0 8px 28px rgba(20, 34, 42, .18);
}
.ig-map-results button, .ig-map-results a {
  display: block; width: 100%; box-sizing: border-box; text-align: right; border: 0; background: none; cursor: pointer;
  padding: 9px 12px; border-radius: 8px; color: var(--ig-ink); font: 500 14px/1.5 "Vazirmatn", Tahoma, sans-serif; text-decoration: none;
}
.ig-map-results button:hover, .ig-map-results button:focus-visible, .ig-map-results a:hover { background: #eef5f3; }
.ig-map-results small { display: block; color: var(--ig-muted); font-size: 12px; font-weight: 400; }
.ig-map-results a { color: var(--ig-accent); font-size: 13px; }
.ig-map-results__note { padding: 8px 12px; color: var(--ig-muted); font-size: 12.5px; line-height: 1.8; }
@media (max-width: 520px) { .ig-map-bar h1 { display: none; } .ig-map-search { max-width: none; } }

.ig-map-nearbtn {
  flex: none; border: 1px solid var(--ig-accent); border-radius: 999px; background: var(--ig-accent); color: var(--ig-accent-ink);
  height: 34px; padding: 0 12px; font: 500 13px/1 "Vazirmatn", Tahoma, sans-serif; cursor: pointer;
}
.ig-map-nearbtn:disabled { opacity: .6; cursor: progress; }
.ig-map-search { display: flex; gap: 6px; }
.ig-map-search input { flex: 1; min-width: 0; }

.ig-map-save--city { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.ig-popup-phone { direction: ltr; text-align: right; font-size: 13px; letter-spacing: .02em; }

/* مسیریابی: ورقهٔ پایین نقشه */
.ig-map-route {
  position: absolute; z-index: 5; inset-inline: 0; bottom: 0; max-height: 42%; overflow-y: auto; box-sizing: border-box;
  background: var(--ig-paper); border-top: 1px solid var(--ig-line); border-radius: 16px 16px 0 0;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 24px rgba(20, 34, 42, .16);
  font: 400 14px/1.8 "Vazirmatn", Tahoma, sans-serif;
}
.ig-map-route p { margin: 0 0 8px; }
.ig-map-route__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.ig-map-route__head span { color: var(--ig-accent); font-weight: 700; }
.ig-map-route button { margin-inline-start: auto; border: 1px solid var(--ig-line); border-radius: 999px; background: var(--ig-paper); padding: 4px 14px; font: 500 13px "Vazirmatn", Tahoma, sans-serif; cursor: pointer; }
.ig-map-route ol { margin: 8px 0; padding-inline-start: 22px; }
.ig-map-route li { margin: 2px 0; }
.ig-map-route small { display: block; color: var(--ig-muted); font-size: 11.5px; line-height: 1.7; }
#ig-map[data-route] .ig-map-save, #ig-map[data-route] .ig-map-chips { display: none; }

.ig-map-save--province { bottom: calc(116px + env(safe-area-inset-bottom, 0px)); }

.ig-map-route__apps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font-size: 12.5px; color: var(--ig-muted); }
.ig-map-route__apps a { color: var(--ig-accent); border: 1px solid var(--ig-line); border-radius: 999px; padding: 3px 12px; text-decoration: none; background: var(--ig-paper); }

.ig-map-route__start { background: var(--ig-accent) !important; border-color: var(--ig-accent) !important; color: var(--ig-accent-ink) !important; font-weight: 700 !important; }
.ig-map-route--guide { max-height: none; text-align: center; padding-top: 14px; }
.ig-map-guide__next { font-size: 20px; font-weight: 700; line-height: 1.6; }
.ig-map-guide__dist { font-size: 28px; font-weight: 700; color: var(--ig-accent); line-height: 1.4; }
.ig-map-guide__sum { color: var(--ig-muted); font-size: 13px; margin: 2px 0 8px; }
.ig-map-guide__bar { display: flex; gap: 8px; justify-content: center; }
.ig-map-guide__bar button { margin-inline-start: 0; }
.ig-map-me { width: 18px; height: 18px; border-radius: 50%; background: #1d4ed8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(29, 78, 216, .25); }

.ig-map-install {
  flex: none; border: 1px solid var(--ig-accent); border-radius: 999px; background: transparent; color: var(--ig-accent);
  height: 34px; padding: 0 12px; font: 500 13px/1 "Vazirmatn", Tahoma, sans-serif; cursor: pointer;
}
.ig-map-install[hidden] { display: none; }
.ig-popup-links button {
  font: inherit; font-size: 12px; color: var(--ig-accent); background: transparent; border: 1px solid var(--ig-line);
  border-radius: 999px; padding: 4px 10px; cursor: pointer;
}
.ig-map-trip { margin: 8px 0; }
.ig-map-trip__prayer { margin-top: 8px; font-size: 12.5px; color: var(--ig-muted); }
.ig-map-trip__prayer[hidden] { display: none; }
.ig-map-trip__prayer > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 0; border-top: 1px solid var(--ig-line, rgba(0, 0, 0, .1)); }
.ig-map-route .ig-map-trip__prayer button { margin: 0; padding: 2px 10px; font-size: 12.5px; color: var(--ig-accent); }
.ig-map-trip__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; color: var(--ig-muted); }
.ig-map-route .ig-map-trip__bar button { margin: 0; padding: 3px 12px; font-size: 12.5px; color: var(--ig-accent); }
.ig-map-route .ig-map-trip__bar button[aria-pressed="true"] { background: var(--ig-accent); border-color: var(--ig-accent); color: var(--ig-accent-ink); }
.ig-map-route .ig-map-trip__bar .ig-map-trip__save { color: var(--ig-text, inherit); }
.ig-map-trip__list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 170px; overflow-y: auto; font-size: 13px; }
.ig-map-trip__list li { margin: 0; border-top: 1px solid var(--ig-line); }
.ig-map-route .ig-map-trip__list button { display: block; width: 100%; margin: 0; border: 0; border-radius: 0; background: transparent; text-align: start; padding: 6px 2px; }
.ig-map-trip__list small { display: block; color: var(--ig-muted); font-size: 11.5px; }
.ig-map-trip__note, .ig-map-trip__list li:only-child { padding: 6px 2px; color: var(--ig-muted); }
.ig-map-guide__tools { margin: 4px 0 8px; flex-wrap: wrap; }
.ig-map-route .ig-map-guide__tools button { padding: 3px 12px; font-size: 12.5px; }
.ig-map-guide__look { margin: 4px 0; padding: 6px 10px; border-radius: 10px; background: var(--ig-accent); color: var(--ig-accent-ink); font-size: 13px; line-height: 1.7; }
.ig-popup-tools { display: flex; gap: 4px; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--ig-line); }
.ig-popup-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ig-muted); cursor: pointer; text-decoration: none;
}
.ig-popup-icon:hover, .ig-popup-icon[aria-pressed="true"] { color: var(--ig-accent); background: var(--ig-soft, rgba(15, 118, 110, .08)); }
.ig-chip-icon { width: 16px; height: 16px; flex: none; }

/* کارت مکان: پنل کنار نقشه در دسکتاپ، برگهٔ پایین در گوشی */
.ig-panel {
  position: absolute; z-index: 6; background: var(--ig-paper); color: var(--ig-ink);
  box-shadow: 0 6px 28px rgba(20, 34, 42, .22); display: flex; flex-direction: column;
}
.ig-panel[hidden] { display: none; }
.ig-panel-close {
  position: absolute; top: 8px; left: 8px; z-index: 2; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: #14222a; font: 400 22px/1 sans-serif; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.ig-panel-body { overflow-y: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.ig-panel-body b { display: block; font-size: 16px; line-height: 1.6; padding-inline-end: 34px; }
.ig-panel-body small { display: block; color: var(--ig-muted); font-size: 12.5px; margin-top: 2px; }
.ig-panel-photo { display: block; width: calc(100% + 32px); margin: -14px -16px 12px; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ig-line); }
.ig-panel-rating { font-size: 13px; margin-top: 4px; color: #b56a00; }
@media (min-width: 900px) {
  .ig-panel { top: 0; bottom: 0; right: 0; width: 360px; border-inline-start: 1px solid var(--ig-line); }
}
@media (max-width: 899px) {
  .ig-panel { left: 0; right: 0; bottom: 0; max-height: 52%; border-radius: 16px 16px 0 0; }
  .ig-has-panel .ig-map-save, .ig-has-panel .ig-map-theme { display: none; }
  .ig-panel-photo { aspect-ratio: auto; height: 120px; }
}

/* دکمهٔ حالت شب */
.ig-map-theme {
  position: absolute; z-index: 3; right: max(10px, env(safe-area-inset-right, 0px)); bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--ig-line); border-radius: 999px; background: var(--ig-paper); color: var(--ig-ink);
  padding: 6px 12px; font: 500 12px/1.4 "Vazirmatn", Tahoma, sans-serif; cursor: pointer; box-shadow: 0 1px 3px rgba(20, 34, 42, .14);
}
.ig-has-panel .ig-map-theme { right: 372px; }
@media (max-width: 899px) { .ig-has-panel .ig-map-theme { right: max(10px, env(safe-area-inset-right, 0px)); } }

/* حالت شب: پوستهٔ صفحه هم تیره می‌شود */
body.ig-dark, .ig-dark {
  --ig-ink: #e3e7e9; --ig-muted: #9aa6ab; --ig-line: #2c353a; --ig-paper: #181e22; --ig-soft: rgba(59, 184, 168, .14);
  color-scheme: dark;
}
.ig-dark .ig-panel-close { background: rgba(24, 30, 34, .92); color: #e3e7e9; }
.ig-dark .ig-panel-rating { color: #f1ab4f; }
.ig-dark .maplibregl-ctrl-group { background: #181e22; }
.ig-dark .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(.85); }
.ig-dark .maplibregl-ctrl-attrib { background: rgba(24, 30, 34, .8); color: #9aa6ab; }
.ig-dark .maplibregl-ctrl-attrib a { color: #9aa6ab; }
.ig-dark .ig-map-search input, .ig-dark input[type="search"] { background: #10161a; color: var(--ig-ink); border-color: var(--ig-line); }
.ig-dark .ig-map-results { background: #181e22; color: var(--ig-ink); }

/* مسیر (۱۴۰۵-۰۸): کادر پایین جمع‌شونده، کارت مبدأ و مقصد بالا، چند مسیر، دوری از طرح */
body.ig-routing .ig-map-nearbtn { display: none; }
#ig-map[data-route] .ig-map-route { padding-top: 22px; max-height: 62%; }
.ig-map-route__grab { position: absolute; top: 0; inset-inline: 0; margin: 0 auto !important; width: 100%; height: 20px; padding: 0 !important; border: 0 !important; border-radius: 16px 16px 0 0 !important; background: transparent !important; cursor: pointer; }
.ig-map-route__grab::before { content: ""; display: block; width: 42px; height: 4px; margin: 8px auto 0; border-radius: 4px; background: var(--ig-line); }
.ig-map-route .ig-map-route__x { position: absolute; top: 8px; inset-inline-end: 10px; z-index: 1; width: 34px; height: 34px; margin: 0; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--ig-muted); }
.ig-map-route .ig-map-route__head { flex-wrap: nowrap; gap: 12px; padding-inline-end: 40px; }
.ig-map-route .ig-map-route__start { margin: 0; padding: 10px 26px; font-size: 16px; box-shadow: 0 2px 8px rgba(15, 118, 110, .3); }
.ig-map-route__sum { font-size: 15px; cursor: pointer; }
.ig-map-route__alts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ig-map-route .ig-map-route__alts button { margin: 0; text-align: center; line-height: 1.5; }
.ig-map-route .ig-map-route__alts button[aria-pressed="true"] { border-color: #1d4ed8; color: #1d4ed8; font-weight: 700; box-shadow: inset 0 0 0 1px #1d4ed8; }
.ig-map-route__alts small { display: block; font-size: 11px; color: #c2410c; }
.ig-map-route__zones { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 8px; font-size: 13px; }
.ig-map-route__zones label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ig-map-route__zones small { flex-basis: 100%; color: #c2410c; }
.ig-map-route .ig-map-route__apps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ig-map-route .ig-map-route__apps a { display: block; text-align: center; padding: 9px 8px; border: 1.5px solid var(--ig-accent); border-radius: 12px; font-weight: 700; font-size: 14px; }
.ig-map-route__elev { margin-top: 8px; }
.ig-map-route__elev[hidden] { display: none; }
.ig-map-route__elev summary { cursor: pointer; color: var(--ig-accent); font-weight: 600; font-size: 13.5px; }
.ig-map-route__elev-chart { margin-top: 6px; line-height: 0; }
.ig-map-route__elev-ends { display: flex; justify-content: space-between; font-size: 12px; opacity: .75; margin-top: 2px; }
.ig-map-route__elev small { display: block; margin-top: 4px; }
.ig-map-route__steps { margin-top: 8px; }
.ig-map-route__steps summary { cursor: pointer; color: var(--ig-accent); font-weight: 600; font-size: 13.5px; }
.ig-map-ends {
  position: absolute; z-index: 6; top: 10px; inset-inline: 10px; max-width: 520px; display: flex; align-items: center; gap: 8px;
  background: var(--ig-paper); border: 1px solid var(--ig-line); border-radius: 14px; padding: 6px 10px; box-shadow: 0 4px 18px rgba(20, 34, 42, .16);
  font: 400 14px/1.6 "Vazirmatn", Tahoma, sans-serif;
}
.ig-map-ends__rows { flex: 1; min-width: 0; }
.ig-map-ends__row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.ig-map-ends__row + .ig-map-ends__row { border-top: 1px solid var(--ig-line); }
.ig-map-ends__row i { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid #1d4ed8; }
.ig-map-ends__row--to i { border-color: #e34948; background: #e34948; }
.ig-map-ends__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ig-map-ends button { flex: none; border: 0; background: none; color: var(--ig-accent); font: 500 12.5px "Vazirmatn", Tahoma, sans-serif; cursor: pointer; padding: 2px 4px; }
.ig-map-ends .ig-map-ends__swap { width: 36px; height: 36px; border: 1px solid var(--ig-line); border-radius: 50%; font-size: 18px; color: var(--ig-ink, inherit); }
#ig-map[data-guide] .ig-map-ends { display: none; }
.ig-map-ends[hidden] { display: none; } /* display:flex بالا ویژگی hidden را بی‌اثر می‌کرد */

/* سنجاق مکان انتخاب‌شده */
.ig-pin { width: 30px; height: 40px; pointer-events: none; }
.ig-pin::before { content: ""; position: absolute; left: 3px; top: 0; width: 24px; height: 24px; background: #e0352b; border: 2px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); transform-origin: 50% 50%; box-shadow: 0 3px 8px rgba(0, 0, 0, .3); top: 8px; }
.ig-pin::after { content: ""; position: absolute; left: 11px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.ig-map-route__grab, .ig-map-route__head { touch-action: none; } /* کشیدن کادر مسیر با انگشت */

/* فلش راهنما، مرور مسیر */
.ig-map-nav { width: 40px; height: 40px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
.ig-map-route__go { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.ig-map-route .ig-map-route__look { margin: 0; padding: 6px 18px; font-weight: 600; color: var(--ig-accent); border-color: var(--ig-accent); }
.ig-map-preview {
  position: absolute; z-index: 6; top: 10px; inset-inline: 10px; max-width: 520px; padding: 12px 16px;
  background: #1f2933; color: #fff; border-radius: 14px; box-shadow: 0 4px 18px rgba(20, 34, 42, .25);
  font: 400 14px/1.7 "Vazirmatn", Tahoma, sans-serif;
}
.ig-map-preview[hidden] { display: none; }
.ig-map-preview b { display: block; font-size: 17px; }
.ig-map-preview small { color: #c9d3da; }
#ig-map[data-preview] .ig-map-ends { display: none; }
.ig-map-preview__nav { display: flex; gap: 10px; padding-inline-end: 44px; }
.ig-map-route .ig-map-preview__nav button { flex: 1; margin: 0; padding: 10px 8px; font-size: 15px; font-weight: 600; }
.ig-map-route .ig-map-preview__nav .ig-map-preview__next { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.ig-map-route .ig-map-preview__nav button:disabled { opacity: .45; cursor: default; }

/* راهنما: دستور در کادر بالا، بلندگو، قطب‌نما */
.ig-map-preview .ig-map-guide__next { font-size: 18px; font-weight: 700; line-height: 1.6; color: #fff; }
.ig-map-preview .ig-map-guide__dist { font-size: 22px; font-weight: 700; line-height: 1.4; color: #7dd3fc; }
.ig-map-route .ig-map-guide__mute { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 38px; padding: 0; color: var(--ig-accent); }
.ig-map-guide__mute .ig-slash { display: none; }
.ig-map-guide__mute.is-off { color: #c2410c; }
.ig-map-guide__mute.is-off .ig-slash { display: inline; }
.ig-map-guide__mute.is-off .ig-wave { display: none; }
.ig-map-compass {
  position: absolute; z-index: 5; top: 92px; inset-inline-end: 12px; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  background: #1f2933; color: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); cursor: pointer;
  font: 700 12px "Vazirmatn", Tahoma, sans-serif;
}
.ig-map-compass[hidden] { display: none; }
#ig-map[data-guide] .ig-map-compass, #ig-map[data-preview] .ig-map-compass { top: 140px; }
.ig-map-compass__dial { position: absolute; inset: 0; transition: transform .2s; }
.ig-map-compass__dial i { position: absolute; top: -7px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-bottom: 9px solid #e0352b; }
.ig-map-compass__label { position: relative; }

/* راهنما: فلش پیچ، «و بعد»، فهرست گام‌ها؛ توقف میانی */
.ig-map-preview--guide { cursor: pointer; padding-bottom: 8px; }
.ig-map-guide__head { display: flex; align-items: center; gap: 14px; }
.ig-map-guide__icon { flex: none; color: #fff; line-height: 0; }
.ig-map-guide__text { min-width: 0; }
.ig-map-preview .ig-map-guide__dist { font-size: 24px; color: #fff; }
.ig-map-preview .ig-map-guide__next { color: #7dd3fc; font-size: 17px; }
.ig-map-guide__then { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 10px; border-radius: 10px; background: #2d3a45; font-size: 13px; line-height: 0; }
.ig-map-guide__then[hidden] { display: none; }
.ig-map-guide__then span { line-height: 1.6; }
.ig-map-limit {
  position: absolute; z-index: 5; top: var(--ig-below, 150px); inset-inline-start: 12px; width: 52px; height: 52px; box-sizing: border-box;
  display: grid; place-items: center; border: 5px solid #d62828; border-radius: 50%; background: #fff; color: #111;
  font: 800 20px/1 "Vazirmatn", Tahoma, sans-serif; box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
}
.ig-map-limit[hidden] { display: none; }
.ig-map-limit.is-over { background: #d62828; color: #fff; border-color: #fff; animation: ig-over .6s ease-in-out infinite alternate; }
@keyframes ig-over { to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .ig-map-limit.is-over { animation: none; } }
.ig-map-guide__hz { display: block; margin-top: 8px; padding: 5px 12px; border-radius: 10px; background: #f59e0b; color: #1f1300; font-size: 14px; font-weight: 700; line-height: 1.6; }
.ig-map-guide__hz[hidden] { display: none; }
.ig-map-guide__steps { list-style: none; margin: 8px -16px 0; padding: 0; max-height: 55vh; overflow-y: auto; }
.ig-map-guide__steps[hidden] { display: none; }
.ig-map-guide__steps li { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-top: 1px solid #33414c; }
.ig-map-guide__steps li:nth-child(odd) { background: #26323c; }
.ig-map-guide__steps-icon { flex: none; line-height: 0; color: #e5edf2; }
.ig-map-guide__steps b { display: block; font-size: 14px; }
.ig-map-guide__steps span span { color: #7dd3fc; font-weight: 600; }
.ig-map-guide__grip { width: 40px; height: 4px; margin: 8px auto 0; border-radius: 4px; background: #5b6873; }
.ig-map-ends__row--via i { border-color: #6b7280; border-radius: 2px; }
.ig-map-ends .ig-map-ends__add { display: block; padding: 4px 0 6px; padding-inline-start: 18px; font-size: 12.5px; }

/* فقط یک دکمهٔ ذخیرهٔ آفلاین، هم‌جای دکمهٔ محدوده */
#ig-map[data-save-level] .ig-map-save--city, #ig-map[data-save-level] .ig-map-save--province { bottom: calc(36px + env(safe-area-inset-bottom, 0px)); }
#ig-map[data-save-level="area"] .ig-map-save--city, #ig-map[data-save-level="area"] .ig-map-save--province,
#ig-map[data-save-level="city"] #ig-map-save, #ig-map[data-save-level="city"] .ig-map-save--province,
#ig-map[data-save-level="province"] #ig-map-save, #ig-map[data-save-level="province"] .ig-map-save--city,
#ig-map[data-save-level="none"] .ig-map-save { display: none; }

/* راهنما: یک ردیف دکمه، «کل مسیر» برجسته؛ دکمه‌های زوم و موقعیت نقشه پنهان (راهنما «موقعیت من» خودش را دارد) */
.ig-map-route--guide { padding-top: 10px; }
.ig-map-route--guide .ig-map-guide__sum { margin: 0 0 8px; }
.ig-map-route--guide .ig-map-guide__bar { flex-wrap: nowrap; align-items: center; }
.ig-map-route .ig-map-guide__bar button { margin: 0; white-space: nowrap; }
.ig-map-route .ig-map-guide__whole { padding: 8px 18px; font-size: 14px; font-weight: 700; background: var(--ig-accent); border-color: var(--ig-accent); color: var(--ig-accent-ink); }
#ig-map[data-guide] .ig-map-theme { display: none; }

/* حالت شب: دکمهٔ گرد آیکونی، کمی بالاتر */
.ig-map-theme { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); border-radius: 50%; }
/* کادر مسیر: «شروع مسیریابی» و «مرور مسیر» کنار هم و هم‌اندازه، زمان و مسافت زیرشان */
.ig-map-route .ig-map-route__head { flex-direction: column; align-items: stretch; gap: 6px; padding-inline-end: 40px; }
.ig-map-route .ig-map-route__go { flex-direction: row; gap: 8px; }
.ig-map-route .ig-map-route__go > button { flex: 1 1 0; margin: 0; padding: 9px 8px; font-size: 15px; border-radius: 999px; }
.ig-map-route .ig-map-route__sum { text-align: center; font-size: 14px; }
#ig-map[data-route] .ig-map-route { padding-top: 18px; }
/* راهنما: «پایان» هم‌اندازهٔ «کل مسیر» */
.ig-map-route .ig-map-guide__end { padding: 8px 18px; font-size: 14px; font-weight: 700; }

/* توقف میانی و مقصد روی نقشه */
.ig-stop { width: 26px; height: 26px; border-radius: 50%; background: #7c3aed; color: #fff; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); display: flex; align-items: center; justify-content: center; font: 700 13px/1 "Vazirmatn", Tahoma, sans-serif; }
.ig-stop--end { background: #e34948; width: 22px; height: 22px; }
.ig-map-ends__row--via i { border-color: #7c3aed; background: #7c3aed; border-radius: 50%; }

/* ستون چپ نقشه: موقعیت، +، −، و زیرشان دکمهٔ روز و شب هم‌عرض و هم‌تراز */
.ig-map-theme, .ig-has-panel .ig-map-theme {
  right: auto; left: max(10px, env(safe-area-inset-left, 0px)); bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: 29px; height: 29px; border: 0; border-radius: 4px; box-shadow: 0 0 0 2px rgba(0, 0, 0, .1);
}
.ig-map-theme svg { width: 18px; height: 18px; }
#ig-map .maplibregl-ctrl-bottom-left { bottom: calc(36px + env(safe-area-inset-bottom, 0px)); }

/* نگه داشتن انگشت روی نقشه کارت می‌سازد، نه منوی انتخاب متن */
#ig-map-canvas, #ig-map-canvas canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ig-popup-links a:not(.ig-popup-primary) { cursor: pointer; }
.ig-map-ends__hint { display: block; padding: 2px 0 6px 18px; color: var(--ig-muted); font-size: 12px; line-height: 1.6; }

/* دکمهٔ حالت دوربین (راهنما): زیر قطب‌نما */
.ig-map-camera {
  position: absolute; z-index: 5; top: 202px; inset-inline-end: 12px; width: 52px; height: 36px; padding: 0; border: 0; border-radius: 18px;
  background: #1f2933; color: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); cursor: pointer; font: 700 12.5px "Vazirmatn", Tahoma, sans-serif;
}
.ig-map-camera[hidden] { display: none; }
.ig-map-camera[aria-pressed="true"] { background: #1d4ed8; }

/* ردیف پایین نقشه: چپ «+ و −» و کنارشان «موقعیت من» هم‌قد هر دو (۵۸ پیکسل)، راست دکمهٔ روز و شب هم‌اندازهٔ آن */
#ig-map .maplibregl-ctrl-bottom-left { bottom: env(safe-area-inset-bottom, 0px); display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: flex-end; gap: 6px; direction: ltr; }
#ig-map .maplibregl-ctrl-bottom-left .maplibregl-ctrl { float: none; margin: 0 0 40px 10px; }
#ig-map .maplibregl-ctrl-bottom-left .maplibregl-ctrl:first-child { margin-left: 0; }
#ig-map .maplibregl-ctrl-geolocate { width: 58px; height: 58px; }
#ig-map .maplibregl-ctrl-geolocate .maplibregl-ctrl-icon { transform: scale(1.7); }
.ig-map-theme, .ig-has-panel .ig-map-theme {
  right: max(10px, env(safe-area-inset-right, 0px)); left: auto; bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 4px;
}
.ig-map-theme svg { width: 30px; height: 30px; }
@media (min-width: 900px) { .ig-has-panel .ig-map-theme { right: 372px; } }
/* دکمهٔ ذخیرهٔ آفلاین بین دو دکمه، هم‌تراز با آن‌ها */
.ig-map-save, #ig-map[data-save-level] .ig-map-save--city, #ig-map[data-save-level] .ig-map-save--province {
  inset-inline-start: auto; right: calc(max(10px, env(safe-area-inset-right, 0px)) + 66px); bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 200px);
}

/* راهنما: نوار بالا برداشته می‌شود؛ جستجو در صورت نیاز شناور بالای کادر مسیر می‌آید */
body.ig-guiding { --ig-bar: 0px; }
body.ig-guiding .ig-map-bar { display: none; }
.ig-map-search.is-floating {
  position: absolute; z-index: 12; left: 10px; right: 10px; bottom: calc(var(--ig-sheet, 120px) + 10px); max-width: none; margin: 0;
  background: var(--ig-paper); border-radius: 14px; padding: 6px; box-shadow: 0 4px 18px rgba(20, 34, 42, .22);
}
.ig-map-search.is-floating .ig-map-nearbtn { display: none; }
.ig-map-search.is-floating .ig-map-results { top: auto; bottom: 48px; max-height: 45vh; }
/* ردیف پایین: ارتفاع پایه یک متغیر است (با کادر مسیر بالا می‌رود)؛ چپ ۵۸ پیکسل، راست دو دکمهٔ ۲۹ پیکسلی روی هم */
#ig-map { --ig-row: calc(40px + env(safe-area-inset-bottom, 0px)); }
#ig-map .maplibregl-ctrl-bottom-left { bottom: var(--ig-row); }
#ig-map .maplibregl-ctrl-bottom-left .maplibregl-ctrl { margin: 0 0 0 10px; }
#ig-map .maplibregl-ctrl-bottom-left .maplibregl-ctrl:first-child { margin-left: 0; }
.ig-map-theme, .ig-has-panel .ig-map-theme { width: 29px; height: 29px; bottom: calc(var(--ig-row) + 29px); right: max(10px, env(safe-area-inset-right, 0px)); }
.ig-map-theme svg { width: 18px; height: 18px; }
.ig-map-save, #ig-map[data-save-level] .ig-map-save--city, #ig-map[data-save-level] .ig-map-save--province {
  inset-inline-start: auto; right: max(10px, env(safe-area-inset-right, 0px)); bottom: var(--ig-row); max-width: none;
  height: 29px; box-sizing: border-box; padding: 0 12px; border-radius: 4px; white-space: nowrap; font-size: 11.5px; line-height: 27px;
}
.ig-map-route__go button, .ig-map-guide__bar button { white-space: nowrap; }
#ig-map[data-state="loading"] .maplibregl-ctrl-attrib, #ig-map[data-state="loading"] .maplibregl-ctrl-bottom-right { visibility: hidden; }
.ig-map-route__cost { margin-top: 8px; }
.ig-map-route__cost[hidden] { display: none; }
.ig-map-route__cost summary { cursor: pointer; color: var(--ig-accent); font-weight: 600; font-size: 13.5px; }
.ig-map-route__cost ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 13px; line-height: 1.9; }
.ig-map-route__cost input { width: 64px; padding: 2px 6px; border: 1px solid var(--ig-line, rgba(0, 0, 0, .25)); border-radius: 6px; font: inherit; }
.ig-map-route__cost small { display: block; margin-top: 4px; opacity: .75; }
.ig-map-route__cost-picks { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 13px; }
.ig-map-route__cost select { max-width: 100%; padding: 2px 6px; border: 1px solid var(--ig-line, rgba(0, 0, 0, .25)); border-radius: 6px; font: inherit; background: transparent; color: inherit; }
.ig-map-route__cost-sub { list-style: none; margin-inline-start: -18px; opacity: .8; }
.ig-report {
  width: 26px; height: 26px; padding: 0; border: 2px solid #fff; border-radius: 50%; color: #fff; cursor: pointer;
  font: 800 13px/1 "Vazirmatn", Tahoma, sans-serif; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.ig-report-card { display: grid; gap: 4px; min-width: 150px; font-family: "Vazirmatn", Tahoma, sans-serif; text-align: center; }
.ig-report-card small { opacity: .75; }
.ig-report-card div { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.ig-report-card button { padding: 3px 10px; border: 1px solid #0f766e; border-radius: 999px; background: #fff; color: #0f766e; font: inherit; font-size: 12.5px; cursor: pointer; }
.ig-report-sheet {
  position: absolute; z-index: 30; inset-inline: 0; bottom: 0; display: grid; gap: 8px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-radius: 18px 18px 0 0; background: #fff; color: #1f2933; box-shadow: 0 -6px 24px rgba(0, 0, 0, .3); text-align: center;
  font-family: "Vazirmatn", Tahoma, sans-serif;
}
.ig-report-sheet button { padding: 10px; border: 2px solid; border-radius: 12px; background: #fff; color: inherit; font: 700 15px "Vazirmatn", Tahoma, sans-serif; cursor: pointer; }
.ig-report-sheet button[hidden] { display: none; }
.ig-report-sheet .ig-report-sheet__cancel { border-color: #cbd2d9; font-weight: 500; }
.ig-report-sheet small { opacity: .7; font-size: 12px; }
.ig-map-route__modes { display: flex; gap: 6px; margin: 8px 0 4px; }
.ig-map-route .ig-map-route__modes button { flex: 1; margin: 0; padding: 6px 4px; font-size: 13.5px; font-weight: 600; border-radius: 10px; }
.ig-map-route .ig-map-route__modes button[aria-pressed="true"] { background: var(--ig-accent); border-color: var(--ig-accent); color: var(--ig-accent-ink); }
.ig-map-route__modenote { display: block; margin-bottom: 4px; opacity: .8; }

/* ==========================================================================================================
   پوستهٔ v3 (۱۴۰۵-۰۸): همه‌چیز روی نقشه شناور، شیشه‌ای و هم‌شکل است؛ یک مجموعه توکن برای رنگ، گوشه، سایه و حرکت.
   این بخش عمداً آخر فایل است و قاعده‌های بالا را بازنویسی می‌کند؛ هندسهٔ ردیف پایین (+/−، موقعیت، روز و شب، ذخیره)
   و متغیرهایی که جاوااسکریپت می‌نویسد (--ig-row، --ig-sheet، --ig-below) دست نخورده است.
   ========================================================================================================== */
:root {
  --ig-top: 70px;                       /* زیر جستجوی شناور */
  --ig-glass: rgba(255, 255, 255, .9);
  --ig-glass-line: rgba(20, 34, 42, .08);
  --ig-soft-bg: #eef3f1;
  --ig-r-xl: 24px; --ig-r-lg: 18px; --ig-r-md: 14px;
  --ig-sh-1: 0 1px 2px rgba(20, 34, 42, .1), 0 4px 14px rgba(20, 34, 42, .14);
  --ig-sh-2: 0 -2px 4px rgba(20, 34, 42, .06), 0 -12px 36px rgba(20, 34, 42, .22);
  --ig-ease: cubic-bezier(.2, .8, .2, 1);
  --ig-route: #2563eb;
  --ig-danger: #d62828;
  --ig-bar: 0px;
}
.ig-dark {
  --ig-glass: rgba(24, 30, 34, .9);
  --ig-glass-line: rgba(255, 255, 255, .08);
  --ig-soft-bg: #222b30;
  --ig-sh-1: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .45);
  --ig-sh-2: 0 -12px 36px rgba(0, 0, 0, .55);
  --ig-route: #7aa2ff;
}
body.ig-routing, body.ig-guiding { --ig-top: 0px; }
body { -webkit-tap-highlight-color: transparent; }
#ig-map button, #ig-map a, .ig-map-bar button, .ig-map-bar a { touch-action: manipulation; }
#ig-map { inset: 0; }

/* ---------- نوار جستجوی شناور ---------- */
.ig-map-bar {
  position: fixed; inset: 0 0 auto; z-index: 9; height: auto; pointer-events: none; background: none; border: 0;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  gap: 10px;
}
.ig-map-bar > * { pointer-events: auto; }
.ig-map-bar h1, .ig-map-install { display: none; }
.ig-map-brand {
  flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; font-size: 0; color: transparent;
  background: var(--ig-glass) url("/icon-96.png") center / 34px no-repeat; box-shadow: var(--ig-sh-1);
  border: 1px solid var(--ig-glass-line); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.ig-map-search { flex: 1; max-width: 520px; margin: 0; position: relative; display: block; }
.ig-map-search input {
  width: 100%; height: 48px; padding: 0 18px 0 62px; border: 1px solid var(--ig-glass-line); border-radius: 999px; box-sizing: border-box;
  background: var(--ig-glass) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356656b' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='6.5'/><path d='m20 20-4-4'/></svg>") no-repeat right 16px center / 20px;
  padding-right: 46px; padding-left: 58px;
  box-shadow: var(--ig-sh-1); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  font: 400 15px/1 "Vazirmatn", Tahoma, sans-serif; color: var(--ig-ink);
}
.ig-map-search input::placeholder { color: var(--ig-muted); }
.ig-map-search input:focus { outline: 2px solid var(--ig-accent); outline-offset: 0; background-color: var(--ig-paper); }
.ig-map-nearbtn {
  position: absolute; z-index: 1; left: 5px; top: 5px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
  font-size: 0; background: var(--ig-accent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='3.2'/><path d='M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3'/><circle cx='12' cy='12' r='7.5'/></svg>") center / 22px no-repeat;
  box-shadow: 0 2px 6px rgba(15, 118, 110, .4); transition: transform .15s var(--ig-ease);
}
.ig-map-nearbtn:active { transform: scale(.92); }
.ig-map-results {
  top: 56px; padding: 6px; border: 1px solid var(--ig-glass-line); border-radius: var(--ig-r-lg); background: var(--ig-paper); box-shadow: var(--ig-sh-2);
  max-height: min(62vh, 460px);
}
.ig-map-results button, .ig-map-results a { min-height: 48px; padding: 10px 14px; border-radius: 12px; font-size: 14.5px; display: flex; flex-direction: column; justify-content: center; }
.ig-map-results button:hover, .ig-map-results button:focus-visible, .ig-map-results a:hover { background: var(--ig-soft-bg); }
.ig-map-results li + li { border-top: 1px solid var(--ig-glass-line); }
.ig-map-results button:active { background: var(--ig-soft-bg); }
body.ig-routing .ig-map-bar, body.ig-guiding .ig-map-bar { display: none; }

/* ---------- دسته‌ها ---------- */
.ig-map-chips {
  top: calc(var(--ig-top) + env(safe-area-inset-top, 0px)); padding: 4px max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px));
  scroll-snap-type: x proximity; scroll-padding-inline: 12px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.ig-map-chips--sub { top: calc(var(--ig-top) + 50px + env(safe-area-inset-top, 0px)); }
.ig-chip {
  scroll-snap-align: start; min-height: 38px; padding: 7px 14px; gap: 7px; border: 1px solid var(--ig-glass-line); border-radius: 999px;
  background: var(--ig-glass); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: var(--ig-sh-1); font-size: 13.5px; transition: transform .15s var(--ig-ease), background-color .15s;
}
.ig-chip:active { transform: scale(.96); }
.ig-chip[aria-pressed="true"] { background: var(--ig-accent); border-color: var(--ig-accent); color: #fff; box-shadow: 0 4px 14px rgba(15, 118, 110, .45); }

/* ---------- دکمه‌های نقشه (هندسهٔ ردیف پایین ثابت؛ فقط ظاهر) ---------- */
#ig-map .maplibregl-ctrl-group { border-radius: var(--ig-r-md); background: var(--ig-glass); box-shadow: var(--ig-sh-1); border: 1px solid var(--ig-glass-line); overflow: hidden; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
#ig-map .maplibregl-ctrl-group:not(:empty) { box-shadow: var(--ig-sh-1); }
#ig-map .maplibregl-ctrl-group button { background: transparent; }
#ig-map .maplibregl-ctrl-group button + button { border-top: 1px solid var(--ig-glass-line); }
#ig-map .maplibregl-ctrl-group button:active { background: var(--ig-soft-bg); }
.ig-map-theme, .ig-has-panel .ig-map-theme, .ig-map-save, #ig-map[data-save-level] .ig-map-save--city, #ig-map[data-save-level] .ig-map-save--province {
  border: 1px solid var(--ig-glass-line); border-radius: 10px; background: var(--ig-glass); color: var(--ig-ink); box-shadow: var(--ig-sh-1);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.ig-map-save { font-weight: 700; color: var(--ig-accent); }
.ig-map-message { border-radius: var(--ig-r-lg); background: var(--ig-paper); box-shadow: var(--ig-sh-2); }

/* ---------- ورقهٔ پایین: کارت مکان و کادر مسیر ---------- */
.ig-panel, .ig-map-route {
  border: 0; border-radius: var(--ig-r-xl) var(--ig-r-xl) 0 0; background: var(--ig-paper); box-shadow: var(--ig-sh-2);
}
.ig-panel { animation: ig-up .28s var(--ig-ease); }
@keyframes ig-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ig-panel { animation: none; } }
@media (max-width: 899px) {
  .ig-panel { max-height: 58%; }
  .ig-panel::before { content: ""; position: absolute; top: 8px; inset-inline: 0; margin: 0 auto; width: 44px; height: 5px; border-radius: 5px; background: var(--ig-line); }
}
@media (min-width: 900px) {
  .ig-panel { top: 12px; bottom: 12px; right: 12px; width: 372px; border-radius: var(--ig-r-xl); border: 1px solid var(--ig-glass-line); box-shadow: var(--ig-sh-1), 0 18px 40px rgba(20, 34, 42, .22); }
  .ig-has-panel .ig-map-theme { right: 396px; }
}
.ig-panel-close, .ig-map-route .ig-map-route__x {
  width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--ig-soft-bg); color: var(--ig-ink); box-shadow: none; font-size: 22px;
  transition: background-color .15s;
}
.ig-panel-close { top: 12px; left: 12px; }
.ig-panel-close:hover, .ig-map-route .ig-map-route__x:hover { background: var(--ig-line); }
.ig-panel-body { padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
.ig-panel-body b { font-size: 18px; line-height: 1.55; padding-inline-end: 46px; }
.ig-panel-body small { font-size: 13px; }
.ig-panel-photo { width: calc(100% + 36px); margin: -22px -18px 14px; }
.ig-panel .ig-popup-links { gap: 8px; margin-top: 14px; }
.ig-panel .ig-popup-links a, .ig-panel .ig-popup-links button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--ig-line); border-radius: 999px;
  font-size: 13.5px; font-weight: 700; background: var(--ig-paper); color: var(--ig-accent); text-decoration: none; transition: transform .15s var(--ig-ease), background-color .15s;
}
.ig-panel .ig-popup-links a:active, .ig-panel .ig-popup-links button:active { transform: scale(.97); }
.ig-panel .ig-popup-links a.ig-popup-primary { min-height: 46px; padding: 0 22px; font-size: 15px; background: var(--ig-accent); border-color: var(--ig-accent); color: #fff; box-shadow: 0 4px 14px rgba(15, 118, 110, .4); }
.ig-panel .ig-popup-links a:not(.ig-popup-primary) { font-weight: 500; color: var(--ig-ink); }
.ig-panel .ig-popup-tools { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--ig-glass-line); justify-content: space-around; }
.ig-popup-icon { width: 44px; height: 44px; }

/* ---------- کادر مسیر ---------- */
.ig-map-route { padding: 20px 16px calc(14px + env(safe-area-inset-bottom, 0px)); max-height: 60%; animation: ig-up .28s var(--ig-ease); }
@media (prefers-reduced-motion: reduce) { .ig-map-route { animation: none; } }
.ig-map-route::-webkit-scrollbar { display: none; }
.ig-map-route__grab::before { width: 44px; height: 5px; margin-top: 8px; background: var(--ig-line); }
.ig-map-route .ig-map-route__x { top: 12px; inset-inline-end: 12px; }
.ig-map-route .ig-map-route__head { gap: 10px; padding-inline-end: 0; padding-top: 4px; }
.ig-map-route .ig-map-route__sum { order: -1; display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: start; padding-inline-end: 48px; color: var(--ig-ink); cursor: pointer; }
.ig-map-route .ig-map-route__sum strong { font-size: 24px; font-weight: 700; line-height: 1.4; color: var(--ig-ink); }
.ig-map-route .ig-map-route__sum .ig-map-route__sum-rest { font-size: 13px; font-weight: 400; color: var(--ig-muted); }
.ig-map-route .ig-map-route__go { gap: 10px; }
.ig-map-route .ig-map-route__go > button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 12px; font-size: 15.5px; font-weight: 700; border-radius: 16px;
  transition: transform .15s var(--ig-ease);
}
.ig-map-route .ig-map-route__go > button:active { transform: scale(.97); }
.ig-map-route .ig-map-route__start { flex: 2 1 0 !important; box-shadow: 0 6px 18px rgba(15, 118, 110, .42); }
.ig-map-route .ig-map-route__look { flex: 1 1 0 !important; background: var(--ig-soft-bg); border: 0; color: var(--ig-accent); }
.ig-map-route__modes { display: flex; gap: 4px; margin: 14px 0 6px; padding: 4px; border-radius: 16px; background: var(--ig-soft-bg); }
.ig-map-route .ig-map-route__modes button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--ig-muted);
  font-size: 14px; font-weight: 700; transition: background-color .2s, color .2s, box-shadow .2s;
}
.ig-map-route .ig-map-route__modes button[aria-pressed="true"] { background: var(--ig-paper); color: var(--ig-accent); box-shadow: 0 1px 4px rgba(20, 34, 42, .18); }
.ig-dark .ig-map-route .ig-map-route__modes button[aria-pressed="true"] { background: #2d383e; color: #5eead4; }
.ig-map-route__modenote { margin: 2px 4px 6px; }
.ig-map-route__alts { gap: 8px; margin-top: 10px; }
.ig-map-route .ig-map-route__alts button { flex: 1 1 0; min-width: 0; padding: 8px 10px; border: 1.5px solid var(--ig-line); border-radius: var(--ig-r-md); font-size: 14px; font-weight: 700; }
.ig-map-route .ig-map-route__alts button[aria-pressed="true"] { border-color: var(--ig-route); color: var(--ig-route); background: rgba(37, 99, 235, .07); box-shadow: none; }
.ig-map-route__zones, .ig-map-route__opts { margin-top: 10px; padding: 10px 12px; border-radius: var(--ig-r-md); background: var(--ig-soft-bg); }
.ig-map-route .ig-map-route__apps { gap: 8px; }
.ig-map-route .ig-map-route__apps a { padding: 10px 8px; border: 0; border-radius: 14px; background: var(--ig-soft-bg); color: var(--ig-accent); font-size: 13.5px; }
.ig-map-trip { margin: 10px 0 2px; }
.ig-map-route .ig-map-trip__bar button { min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--ig-soft-bg); border: 0; color: var(--ig-ink); font-weight: 700; }
.ig-map-route .ig-map-trip__bar button[aria-pressed="true"] { background: var(--ig-accent); color: #fff; }
.ig-map-route .ig-map-trip__bar .ig-map-trip__save { background: transparent; color: var(--ig-muted); font-weight: 400; text-decoration: underline; text-underline-offset: 3px; }
.ig-map-trip__prayer > div { padding: 8px 0; }
/* بخش‌های بازشونده (هزینه، ارتفاع، گام‌ها) به شکل ردیف‌های هم‌شکل */
.ig-map-route details { margin: 0; border-top: 1px solid var(--ig-glass-line); }
.ig-map-route details > summary {
  list-style: none; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 2px; cursor: pointer; color: var(--ig-ink);
  font-size: 14px; font-weight: 700; line-height: 1.6;
}
.ig-map-route details > summary::-webkit-details-marker { display: none; }
.ig-map-route details > summary::after {
  content: ""; margin-inline-start: auto; flex: none; width: 10px; height: 10px; border-inline-start: 2px solid var(--ig-muted); border-bottom: 2px solid var(--ig-muted);
  transform: rotate(-45deg); transition: transform .2s var(--ig-ease); margin-inline-end: 6px;
}
.ig-map-route details[open] > summary::after { transform: rotate(-135deg); }
.ig-map-route details > :not(summary) { animation: ig-fade .2s ease; }
@keyframes ig-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ig-map-route__elev summary, .ig-map-route__cost summary, .ig-map-route__steps summary { color: var(--ig-ink); font-size: 14px; }
.ig-map-route__cost select, .ig-map-route__cost input { min-height: 34px; border-radius: 10px; }
.ig-map-route__steps ol { padding-inline-start: 20px; }

/* ---------- کارت مبدأ و مقصد ---------- */
.ig-map-ends {
  top: calc(10px + env(safe-area-inset-top, 0px)); border: 1px solid var(--ig-glass-line); border-radius: var(--ig-r-lg); padding: 8px 12px;
  background: var(--ig-glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: var(--ig-sh-1);
}
.ig-map-ends__rows { position: relative; }
.ig-map-ends__row { padding: 7px 0; }
.ig-map-ends__row + .ig-map-ends__row { border-top: 0; }
.ig-map-ends__row i { width: 12px; height: 12px; }
.ig-map-ends__row:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 5px; width: 2px; height: 14px; margin-top: 30px; background: repeating-linear-gradient(to bottom, var(--ig-muted) 0 3px, transparent 3px 6px); opacity: .55; }
.ig-map-ends button { min-height: 32px; padding: 0 10px; border-radius: 999px; background: var(--ig-soft-bg); color: var(--ig-accent); font-weight: 700; font-size: 12.5px; }
.ig-map-ends .ig-map-ends__swap { width: 40px; height: 40px; border: 0; background: var(--ig-soft-bg); }
.ig-map-ends .ig-map-ends__add { background: transparent; }

/* ---------- راهنما ---------- */
.ig-map-preview {
  top: calc(10px + env(safe-area-inset-top, 0px)); border-radius: var(--ig-r-xl); padding: 14px 16px 10px;
  background: linear-gradient(180deg, #243039, #1b252d); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 10px 30px rgba(10, 16, 20, .45);
}
.ig-map-guide__head { gap: 14px; }
.ig-map-guide__icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: rgba(255, 255, 255, .1); }
.ig-map-preview .ig-map-guide__dist { font-size: 28px; line-height: 1.2; }
.ig-map-preview .ig-map-guide__next { font-size: 16.5px; color: #8bdcff; }
.ig-map-guide__then { padding: 5px 12px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.ig-map-guide__hz { border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.ig-map-guide__grip { background: rgba(255, 255, 255, .25); }
.ig-map-compass, .ig-map-camera { background: rgba(31, 41, 51, .92); border: 1px solid rgba(255, 255, 255, .1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ig-map-camera[aria-pressed="true"] { background: var(--ig-route); }
.ig-map-limit { box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.ig-map-route--guide { padding-top: 16px; text-align: center; }
.ig-map-route--guide .ig-map-guide__sum { margin: 0 0 12px; font-size: 17px; font-weight: 700; color: var(--ig-ink); }
.ig-map-route .ig-map-guide__bar button { min-height: 46px; border-radius: 14px; font-weight: 700; transition: transform .15s var(--ig-ease); }
.ig-map-route .ig-map-guide__bar button:active { transform: scale(.96); }
.ig-map-route .ig-map-guide__end { border: 0; background: rgba(214, 40, 40, .12); color: var(--ig-danger); }
.ig-map-route .ig-map-guide__whole { box-shadow: 0 4px 14px rgba(15, 118, 110, .35); }
.ig-map-route .ig-map-guide__mute { width: 50px; height: 46px; border: 0; background: var(--ig-soft-bg); }

/* ---------- گزارش‌ها و سنجاق‌ها ---------- */
.ig-report-sheet { border-radius: var(--ig-r-xl) var(--ig-r-xl) 0 0; background: var(--ig-paper); color: var(--ig-ink); box-shadow: var(--ig-sh-2); animation: ig-up .26s var(--ig-ease); grid-template-columns: 1fr 1fr; padding-top: 18px; }
.ig-report-sheet b, .ig-report-sheet small, .ig-report-sheet .ig-report-sheet__cancel { grid-column: 1 / -1; }
.ig-report-sheet b { font-size: 17px; }
.ig-report-sheet button { min-height: 56px; border-width: 0; border-bottom: 4px solid; border-radius: 16px; background: var(--ig-soft-bg); font-size: 14.5px; }
.ig-report-sheet button:active { transform: scale(.97); }
.ig-report-sheet .ig-report-sheet__cancel { min-height: 44px; border-bottom-width: 0; background: transparent; color: var(--ig-muted); }
.ig-report { box-shadow: 0 3px 8px rgba(0, 0, 0, .4); }
.ig-popup .maplibregl-popup-content { border-radius: var(--ig-r-md); background: var(--ig-paper); color: var(--ig-ink); }
.ig-popup .maplibregl-popup-tip { display: none; }
.ig-report-card button { min-height: 34px; background: var(--ig-soft-bg); border-color: transparent; color: var(--ig-accent); font-weight: 700; }

/* ---------- بارگیری ---------- */
.ig-map-loading { font-weight: 700; }
.ig-map-loading span { width: 34px; height: 34px; border-width: 4px; }

/* ---------- اصلاح‌ها پس از بازبینی تصویری ---------- */
.ig-map-route .ig-map-route__go button span, .ig-map-route__head .ig-map-route__go span { color: inherit; font-weight: inherit; }
.ig-panel .ig-popup-links a.ig-popup-primary + a.ig-popup-primary { min-height: 46px; background: var(--ig-soft-bg); border-color: transparent; color: var(--ig-accent); box-shadow: none; font-size: 14.5px; }
.ig-map-ends { padding: 6px 10px; }
.ig-map-ends__row { padding: 3px 0; }
.ig-map-ends button { min-height: 28px; padding: 0 10px; font-size: 12px; }
.ig-map-ends .ig-map-ends__swap { width: 36px; height: 36px; }
.ig-map-ends__row:not(:last-child)::after { height: 10px; margin-top: 22px; }
.ig-map-ends .ig-map-ends__add { min-height: 24px; padding: 0 0 0 10px; }
.ig-map-ends__hint { padding: 0 0 4px 18px; font-size: 11.5px; }
.ig-map-guide__eta { display: flex; justify-content: center; gap: 22px; align-items: flex-start; }
.ig-map-guide__eta > span { display: flex; flex-direction: column; align-items: center; line-height: 1.3; }
.ig-map-guide__eta b { font-size: 21px; color: var(--ig-ink); }
.ig-map-guide__eta small { font-size: 11.5px; color: var(--ig-muted); margin: 0; }
.ig-map-route--guide .ig-map-guide__sum { margin: 0 0 12px; }

/* ---------- حالت شب: متن‌های سبز روشن‌تر تا خوانا بمانند ---------- */
.ig-dark { --ig-link: #5eead4; }
:root { --ig-link: var(--ig-accent); }
.ig-dark .ig-map-save, .ig-dark .ig-map-ends button, .ig-dark .ig-map-ends .ig-map-ends__add, .ig-dark .ig-map-route .ig-map-route__look,
.ig-dark .ig-map-route .ig-map-route__apps a, .ig-dark .ig-panel .ig-popup-links a, .ig-dark .ig-panel .ig-popup-links button,
.ig-dark .ig-map-route .ig-map-trip__bar button, .ig-dark .ig-map-guide__mute { color: var(--ig-link); }
.ig-dark .ig-map-route .ig-map-trip__bar button { color: var(--ig-ink); }
.ig-dark .ig-panel .ig-popup-links a.ig-popup-primary, .ig-dark .ig-map-route .ig-map-route__start, .ig-dark .ig-map-route .ig-map-guide__whole,
.ig-dark .ig-map-route .ig-map-trip__bar button[aria-pressed="true"] { color: #fff; }
.ig-dark .ig-panel .ig-popup-links a:not(.ig-popup-primary) { color: var(--ig-ink); }
.ig-dark .ig-map-route .ig-map-guide__end { background: rgba(255, 99, 99, .14); color: #ff8a8a; }
.ig-dark .ig-report-sheet button { color: var(--ig-ink); }

/* ---------- رایانه: کادر مسیر و کارت مبدأ و مقصد ستون کنار نقشه می‌شوند ---------- */
@media (min-width: 900px) {
  .ig-map-ends { box-sizing: border-box; top: 12px; right: 12px; left: auto; width: 392px; max-width: none; inset-inline: auto; }
  .ig-map-route { top: 150px; bottom: 12px; right: 12px; left: auto; width: 392px; max-height: none; border-radius: var(--ig-r-xl); border: 1px solid var(--ig-glass-line);
    box-shadow: var(--ig-sh-1), 0 18px 40px rgba(20, 34, 42, .22); inset-inline: auto; }
  #ig-map[data-route] .ig-map-theme { right: 416px; }
  #ig-map[data-route] .ig-map-save { right: 416px; }
  #ig-map[data-route]:not([data-guide]) .maplibregl-ctrl-bottom-right { right: 404px; }
  .ig-map-route--guide { top: auto; }
}

/* راهنمای رنگ تأخیر ترافیک زیر زمان مسیر */
.ig-map-route .ig-map-route__sum .ig-map-route__legend { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--ig-muted); }
.ig-map-route__legend i { width: 18px; height: 5px; border-radius: 3px; margin-inline-start: 8px; }
.ig-map-route__legend i:first-child { margin-inline-start: 0; }
.ig-map-route__legend .is-1 { background: #f59e0b; }
.ig-map-route__legend .is-2 { background: #dc2626; }

/* خانهٔ تیک‌دار در کادر مسیر (استهلاک، دوری از طرح): همان اندازهٔ کوچک، نه پهنای فیلد عددی */
.ig-map-route input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; flex: none; accent-color: var(--ig-accent); border-radius: 4px; }
.ig-map-route__cost-picks label { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- منوی کاربر (سایدبار راست با لمس نشان ایران‌گاه) ---------- */
.ig-map-brand { cursor: pointer; }
.ig-drawer { position: fixed; inset: 0; z-index: 50; font-family: "Vazirmatn", Tahoma, sans-serif; direction: rtl; }
.ig-drawer__backdrop { position: absolute; inset: 0; background: rgba(10, 16, 20, .45); opacity: 0; transition: opacity .25s ease; }
.ig-drawer__panel {
  position: absolute; top: 0; bottom: 0; right: 0; width: min(340px, 86vw); display: flex; flex-direction: column;
  background: var(--ig-paper); color: var(--ig-ink); box-shadow: -12px 0 36px rgba(10, 16, 20, .28);
  border-radius: 0 0 0 var(--ig-r-xl, 24px); transform: translateX(105%); transition: transform .28s var(--ig-ease, ease);
  padding-top: env(safe-area-inset-top, 0px);
}
.ig-drawer.is-open .ig-drawer__backdrop { opacity: 1; }
.ig-drawer.is-open .ig-drawer__panel { transform: none; }
@media (prefers-reduced-motion: reduce) { .ig-drawer__panel, .ig-drawer__backdrop { transition: none; } }
.ig-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.ig-drawer__brand { font-weight: 700; font-size: 16px; color: var(--ig-link, var(--ig-accent)); }
.ig-drawer__close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ig-soft-bg); color: var(--ig-ink); display: grid; place-items: center; cursor: pointer; }
.ig-drawer__body { flex: 1; overflow-y: auto; padding: 4px 12px calc(16px + env(safe-area-inset-bottom, 0px)); }
.ig-drawer__account { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 4px 8px; padding: 14px; border-radius: var(--ig-r-lg, 18px); background: var(--ig-soft-bg); }
.ig-drawer__avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ig-accent); color: #fff; flex: none; }
.ig-drawer__who { flex: 1; min-width: 0; }
.ig-drawer__who b { display: block; font-size: 15px; }
.ig-drawer__who small { display: block; color: var(--ig-muted); font-size: 12px; margin-top: 2px; }
.ig-drawer__login { flex-basis: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: 14px;
  background: var(--ig-accent); color: #fff; font: 700 14px "Vazirmatn", Tahoma, sans-serif; cursor: pointer; }
.ig-drawer__login[hidden] { display: none; }
.ig-drawer__section { margin-top: 10px; }
.ig-drawer__section h3 { margin: 8px 8px 4px; font-size: 12.5px; font-weight: 700; color: var(--ig-muted); }
.ig-drawer__section ul { list-style: none; margin: 0; padding: 0; }
.ig-drawer__section li { display: flex; align-items: center; }
.ig-drawer__row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px; border: 0; border-radius: 14px; background: transparent;
  color: var(--ig-ink); text-align: start; font: inherit; cursor: pointer; }
.ig-drawer__row:hover, .ig-drawer__row:focus-visible { background: var(--ig-soft-bg); }
.ig-drawer__icon { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--ig-soft-bg); color: var(--ig-link, var(--ig-accent)); }
.ig-drawer__text { min-width: 0; }
.ig-drawer__text b { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-drawer__text small { display: block; font-size: 12px; color: var(--ig-muted); margin-top: 1px; }
.ig-drawer__text small[hidden] { display: none; }
.ig-drawer__side { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--ig-muted); display: grid; place-items: center; cursor: pointer; }
.ig-drawer__side:hover { background: var(--ig-soft-bg); }
.ig-drawer__hint { padding: 4px 10px 6px; color: var(--ig-muted); font-size: 12px; line-height: 1.7; }
.ig-drawer__link { margin: 2px 8px; padding: 4px 0; border: 0; background: none; color: var(--ig-muted); font: 12.5px "Vazirmatn", Tahoma, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ig-drawer__foot { margin: 16px 8px 0; color: var(--ig-muted); font-size: 11.5px; line-height: 1.9; }

/* منوی کاربر، دور دوم: «مهمان» و توضیحش در یک خط؛ خانه و محل کار با توضیح روبه‌روی عنوان */
.ig-drawer__who { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 8px; }
.ig-drawer__who b { flex: none; margin: 0; }
.ig-drawer__who small { flex: 1 1 auto; min-width: 0; margin: 0; line-height: 1.6; }
.ig-drawer__row.is-inline .ig-drawer__text { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ig-drawer__row.is-inline .ig-drawer__text b { flex: none; }
.ig-drawer__row.is-inline .ig-drawer__text small { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-drawer__more { display: block; color: var(--ig-link, var(--ig-accent)); font-weight: 700; }

/* منوی کاربر، دور سوم: توضیح «مهمان» یک‌خطی و فاصله‌های عمودی کمتر تا سطرهای بیشتری در یک نگاه دیده شود */
.ig-drawer__who small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-drawer__account { margin: 2px 2px 4px; padding: 10px 12px; gap: 8px; }
.ig-drawer__avatar { width: 38px; height: 38px; }
.ig-drawer__login { min-height: 40px; }
.ig-drawer__head { padding: 10px 14px 2px; }
.ig-drawer__section { margin-top: 4px; }
.ig-drawer__section h3 { margin: 6px 8px 0; }
.ig-drawer__row { min-height: 42px; padding: 3px 8px; gap: 10px; }
.ig-drawer__icon { width: 32px; height: 32px; border-radius: 10px; }
.ig-drawer__text b { font-size: 14px; line-height: 1.5; }
.ig-drawer__text small { font-size: 11.5px; line-height: 1.4; }
.ig-drawer__side { width: 36px; height: 36px; }
.ig-drawer__hint { padding: 2px 10px 4px; }
.ig-drawer__link { padding: 2px 0; }
.ig-drawer__foot { margin-top: 10px; }

/* لمس طولانی روی نقشه: نام نقطه برای ذخیره */
.ig-popup-name { display: flex; gap: 8px; margin-top: 10px; }
.ig-popup-name input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid rgba(127, 127, 127, .4); border-radius: 12px; background: transparent; color: inherit; font: inherit; font-size: 15px; }
.ig-popup-name input:focus { outline: 2px solid var(--ig-accent); outline-offset: 1px; }
.ig-popup-name button { flex: none; height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ig-accent); color: var(--ig-accent-ink); font: inherit; font-weight: 700; cursor: pointer; }

/* انتخاب مبدأ/مقصد: جستجو و مکان‌های ذخیره‌شده داخل کادر مسیر */
.ig-map-ends { flex-wrap: wrap; }
.ig-map-pick { flex: 1 0 100%; padding-top: 6px; }
.ig-map-search.is-picking { max-width: none; margin: 0; }
.ig-map-search.is-picking .ig-map-nearbtn { display: none; }
.ig-map-search.is-picking .ig-map-results { z-index: 20; }
.ig-map-pick__chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.ig-map-pick__chips::-webkit-scrollbar { display: none; }
.ig-map-ends .ig-map-pick__chips button { flex: none; min-height: 34px; padding: 0 14px; border: 1px solid var(--ig-line); border-radius: 999px; background: var(--ig-paper); color: inherit; font-weight: 600; white-space: nowrap; }

/* راهنما: ستون سرعت مجاز، سرعت کاربر و «GPS ضعیف» (جای قبلی تابلوی سرعت مجاز) */
.ig-map-speedo { position: absolute; z-index: 5; top: var(--ig-below, 150px); inset-inline-start: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ig-map-speedo .ig-map-limit { position: static; }
.ig-map-speed { width: 56px; height: 56px; box-sizing: border-box; display: grid; place-content: center; text-align: center; border-radius: 50%; background: #1f2933; color: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); line-height: 1; }
.ig-map-speed b { font: 800 21px/1 "Vazirmatn", Tahoma, sans-serif; }
.ig-map-speed small { font-size: 9.5px; opacity: .8; margin-top: 2px; }
.ig-map-speed.is-over { background: #d62828; }
.ig-map-gpsweak { padding: 2px 8px; border-radius: 999px; background: #f59e0b; color: #1f1300; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ig-map-gpsweak[hidden] { display: none; }

/* «کجا می‌روید؟» پایین صفحه (فقط گوشی) */
.ig-where { display: none; }
@media (max-width: 720px) {
  .ig-map-bar .ig-map-search { display: none; }
  .ig-where {
    display: block; position: absolute; z-index: 6; left: 0; right: 0; bottom: 0;
    padding: 12px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--ig-paper); color: var(--ig-ink, inherit);
    border-radius: 18px 18px 0 0; box-shadow: 0 -4px 18px rgba(20, 34, 42, .18);
  }
  body.ig-routing .ig-where, body.ig-guiding .ig-where, body.ig-where-search .ig-where, #ig-map.ig-has-panel .ig-where, #ig-map[data-preview] .ig-where { display: none; }
}
.ig-where__q {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; box-sizing: border-box; padding: 0 16px;
  border: 1px solid var(--ig-line); border-radius: 14px; background: var(--ig-soft-bg, #f1f5f4); color: var(--ig-muted, #56656b);
  font: 600 16px "Vazirmatn", Tahoma, sans-serif; text-align: right; cursor: pointer;
}
.ig-where__chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.ig-where__chips::-webkit-scrollbar { display: none; }
.ig-where__chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 1px solid var(--ig-line);
  border-radius: 12px; background: var(--ig-paper); color: inherit; font: 700 14px "Vazirmatn", Tahoma, sans-serif; white-space: nowrap; cursor: pointer;
}
.ig-where__chip svg { width: 18px; height: 18px; color: var(--ig-accent); }
.ig-where__chip.is-unset { color: var(--ig-muted, #56656b); border-style: dashed; }
.ig-where__chip.is-new { color: var(--ig-accent); }
.ig-where__chip span { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.ig-where__pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; font-size: 13.5px; line-height: 1.7; }
.ig-where__pick > span { flex: 1 0 100%; }
.ig-where__head { margin: 10px 4px 2px; color: var(--ig-muted, #56656b); font-size: 12.5px; font-weight: 700; }
.ig-where__recent { margin: 0; padding: 0; list-style: none; }
.ig-where__recent button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 4px; border: 0; background: none; color: inherit;
  font: 500 14.5px "Vazirmatn", Tahoma, sans-serif; text-align: right; cursor: pointer;
}
.ig-where__recent button svg { flex: none; width: 18px; height: 18px; color: var(--ig-muted, #56656b); }
.ig-where__recent button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* راهنما: «ارسال زمان رسیدن» زیر دکمهٔ ۳بعدی */
.ig-map-eta {
  position: absolute; z-index: 5; top: calc(var(--ig-below, 140px) + 106px); inset-inline-end: 12px; width: 52px; height: 36px; padding: 0; border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px;
  background: rgba(31, 41, 51, .92); color: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); cursor: pointer; font: 700 12.5px "Vazirmatn", Tahoma, sans-serif;
}
/* «هنوز هست؟» بعد از رد شدن از کنار گزارش */
.ig-map-ask {
  position: absolute; z-index: 7; left: 12px; right: 12px; bottom: calc(var(--ig-sheet, 120px) + 12px); padding: 12px 14px;
  border-radius: 16px; background: #1f2933; color: #fff; box-shadow: 0 6px 22px rgba(0, 0, 0, .35); text-align: center;
}
.ig-map-ask b { display: block; font-size: 16px; margin-bottom: 10px; }
.ig-map-ask div { display: flex; gap: 10px; }
.ig-map-ask button { flex: 1; height: 48px; border: 0; border-radius: 12px; background: #2d3a45; color: #fff; font: 700 15px "Vazirmatn", Tahoma, sans-serif; cursor: pointer; }
.ig-map-ask button:first-child { background: #0f766e; }
/* خط‌های تقاطع پیش رو */
.ig-map-guide__lanes { display: flex; gap: 4px; margin-top: 8px; padding: 4px 6px; border-radius: 10px; background: #2d3a45; width: max-content; direction: ltr; }
.ig-map-guide__lanes[hidden] { display: none; }
.ig-map-guide__lanes span { display: grid; place-items: center; width: 30px; height: 30px; color: rgba(255, 255, 255, .35); }
.ig-map-guide__lanes span.is-on { color: #fff; }
/* کی راه بیفتم؟ */
.ig-map-route__leave-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; }
.ig-map-route__leave-row input { min-width: 9em; height: 36px; padding: 0 8px; direction: ltr; border: 1px solid var(--ig-line); border-radius: 10px; background: transparent; color: inherit; font: inherit; }
.ig-map-route__leave p { margin: 8px 0; font-size: 14px; line-height: 1.8; }
.ig-map-route .ig-map-route__leave-btn { min-height: 40px; margin-inline-start: 0; padding: 0 18px; border: 0; background: var(--ig-accent); color: var(--ig-accent-ink, #fff); font: 700 14px "Vazirmatn", Tahoma, sans-serif; }
.ig-map-route__leave-btn[hidden] { display: none; }

/* راهنما: «مسیرها» زیر «ارسال» و فهرست مسیرهای جایگزین */
.ig-map-alts { top: calc(var(--ig-below, 140px) + 150px); }
.ig-map-altsheet {
  position: absolute; z-index: 8; left: 12px; right: 12px; bottom: calc(var(--ig-sheet, 120px) + 12px); max-height: 50vh; overflow-y: auto;
  padding: 12px 14px; border-radius: 16px; background: var(--ig-paper); color: var(--ig-ink, inherit); box-shadow: 0 6px 22px rgba(0, 0, 0, .3);
}
.ig-map-altsheet > b { display: block; font-size: 15px; margin-bottom: 6px; }
.ig-map-altsheet p { margin: 4px 0 8px; font-size: 14px; }
.ig-map-altsheet ul { margin: 0; padding: 0; list-style: none; }
.ig-map-altsheet li button {
  display: block; width: 100%; margin: 6px 0; padding: 10px 12px; border: 1px solid var(--ig-line); border-radius: 12px; background: transparent;
  color: inherit; font: 700 14.5px "Vazirmatn", Tahoma, sans-serif; text-align: right; cursor: pointer;
}
.ig-map-altsheet li button small { display: block; margin-top: 2px; font-weight: 500; font-size: 12.5px; color: var(--ig-muted, #56656b); }
.ig-map-altsheet__close { width: 100%; min-height: 40px; margin-top: 4px; border: 0; border-radius: 999px; background: var(--ig-soft-bg, #eef2f1); color: inherit; font: 700 14px "Vazirmatn", Tahoma, sans-serif; cursor: pointer; }

/* انتخاب روی نقشه: نشانهٔ وسط صفحه و نوار تأیید */
.ig-pickmap { position: absolute; inset: 0; z-index: 9; pointer-events: none; }
.ig-pickmap__pin { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -40px 0 0 -20px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.ig-pickmap__bar {
  pointer-events: auto; position: absolute; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 12px 14px;
  border-radius: 16px; background: var(--ig-paper); color: var(--ig-ink, inherit); box-shadow: 0 6px 22px rgba(0, 0, 0, .3); text-align: center;
}
.ig-pickmap__bar b { display: block; margin-bottom: 10px; font-size: 15px; }
.ig-pickmap__bar div { display: flex; gap: 10px; }
.ig-pickmap__bar button { flex: 1; min-height: 46px; border: 0; border-radius: 12px; background: var(--ig-soft-bg, #eef2f1); color: inherit; font: 700 15px "Vazirmatn", Tahoma, sans-serif; cursor: pointer; }
.ig-pickmap__bar button.is-ok { background: var(--ig-accent); color: var(--ig-accent-ink, #fff); }
body.ig-picking-map .ig-where, body.ig-picking-map .ig-map-route { visibility: hidden; }

/* نام مکان تازه */
.ig-namebox {
  position: absolute; z-index: 10; left: 16px; right: 16px; top: 30%; max-width: 420px; margin: 0 auto; padding: 16px;
  border-radius: 18px; background: var(--ig-paper); color: var(--ig-ink, inherit); box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.ig-namebox b { display: block; margin-bottom: 10px; font-size: 16px; }
.ig-namebox input { width: 100%; box-sizing: border-box; height: 46px; padding: 0 12px; border: 1px solid var(--ig-line); border-radius: 12px; background: transparent; color: inherit; font: 500 15px "Vazirmatn", Tahoma, sans-serif; }
.ig-namebox div { display: flex; gap: 10px; margin-top: 12px; }
.ig-namebox button { flex: 1; min-height: 44px; border: 0; border-radius: 12px; background: var(--ig-soft-bg, #eef2f1); color: inherit; font: 700 15px "Vazirmatn", Tahoma, sans-serif; cursor: pointer; }
.ig-namebox button[type="submit"] { background: var(--ig-accent); color: var(--ig-accent-ink, #fff); }

/* همهٔ مکان‌های ذخیره‌شده */
.ig-savedpage { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; background: var(--ig-paper); color: var(--ig-ink, inherit); }
.ig-savedpage header { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; border-bottom: 1px solid var(--ig-line); }
.ig-savedpage header b { font-size: 17px; }
.ig-savedpage__x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ig-soft-bg, #eef2f1); color: inherit; cursor: pointer; }
.ig-savedpage ul { flex: 1; margin: 0; padding: 6px 8px; overflow-y: auto; list-style: none; }
.ig-savedpage li { display: flex; align-items: center; border-bottom: 1px solid var(--ig-line); }
.ig-savedpage__go { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 4px 8px; border: 0; background: none; color: inherit; font: 600 15.5px "Vazirmatn", Tahoma, sans-serif; text-align: right; cursor: pointer; }
.ig-savedpage__go svg { flex: none; color: var(--ig-accent); }
.ig-savedpage__del { flex: none; width: 40px; height: 40px; border: 0; background: none; color: var(--ig-muted, #56656b); cursor: pointer; }
.ig-savedpage__empty { padding: 20px 8px; color: var(--ig-muted, #56656b); line-height: 1.9; border: 0 !important; }
.ig-savedpage__add { margin: 10px 16px calc(14px + env(safe-area-inset-bottom, 0px)); min-height: 48px; border: 0; border-radius: 999px; background: var(--ig-accent); color: var(--ig-accent-ink, #fff); font: 700 15px "Vazirmatn", Tahoma, sans-serif; cursor: pointer; }

/* «تماس با ما» و «حریم خصوصی» داخل نقشه */
.ig-infopage__body { flex: 1; overflow-y: auto; padding: 8px 18px calc(24px + env(safe-area-inset-bottom, 0px)); line-height: 2; font-size: 15px; }
.ig-infopage__body h3 { margin: 18px 0 2px; font-size: 16px; color: var(--ig-accent); }
.ig-infopage__body p { margin: 6px 0; }
.ig-infopage__row { display: block; margin: 8px 0; padding: 10px 14px; border: 1px solid var(--ig-line); border-radius: 12px; color: inherit; text-decoration: none; }
.ig-infopage__row small { display: block; color: var(--ig-muted, #56656b); font-size: 12.5px; line-height: 1.6; }
.ig-infopage__row b { font-size: 15.5px; overflow-wrap: anywhere; }
a.ig-infopage__row b { color: var(--ig-accent); }
.ig-infopage__more { display: inline-block; margin-top: 12px; color: var(--ig-accent); font-weight: 700; }
.ig-infopage__row b[dir="ltr"] { direction: ltr; text-align: right; }
/* نشان ایران‌گاه بالای صفحه می‌ماند؛ عنوان کنار آن بیاید */
.ig-savedpage header { padding-inline-start: 92px; }

/* سرعت کاربر در دایرهٔ بزرگ؛ سرعت مجاز در دایرهٔ کوچک‌تر با کادر قرمز، چسبیده به بالا-چپ آن (سند ۱۴۰۵۰۸۱۳) */
.ig-map-speedo { margin-top: 8px; }
.ig-map-speedo .ig-map-speed { position: relative; width: 66px; height: 66px; }
.ig-map-speedo .ig-map-speed b { font-size: 25px; }
.ig-map-speedo .ig-map-limit { position: absolute; top: -17px; left: -24px; z-index: 2; width: 36px; height: 36px; border-width: 4px; font-size: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.ig-map-route__zones [hidden], .ig-map-route__zones[hidden] { display: none !important; }

/* «باز کردن در برنامهٔ دیگر»: ردیف بازشوندهٔ برگهٔ مسیر، و پیام راهنما بعد از برگشتن به صفحهٔ پنهان */
.ig-map-route .ig-map-route__apps-box > small { display: block; color: var(--ig-muted); font-size: 12.5px; line-height: 1.8; }
.ig-map-route .ig-map-route__apps-box .ig-map-route__apps { margin: 8px 0 12px; }
.ig-map-route .ig-map-route__apps:has(> a:only-child) { grid-template-columns: 1fr; }
.ig-map-route .ig-map-guide__bgnote { margin: 4px 0; padding: 8px 10px; border-radius: 10px; background: var(--ig-soft-bg); color: var(--ig-ink); font-size: 13px; line-height: 1.8; }
.ig-map-route .ig-map-guide__bgnote p { margin: 0 0 6px; }
.ig-map-route .ig-map-guide__bgapps { display: flex; flex-wrap: wrap; gap: 6px; }
.ig-map-route .ig-map-guide__bgapps a, .ig-map-route .ig-map-guide__bgapps button {
  display: inline-flex; align-items: center; min-height: 36px; margin: 0; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--ig-accent);
  background: var(--ig-paper); color: var(--ig-accent); font: 700 13px "Vazirmatn", Tahoma, sans-serif; text-decoration: none; cursor: pointer;
}
.ig-map-route .ig-map-guide__bgapps button { border-color: var(--ig-line); color: var(--ig-muted); }

/* سند تغییرات ۱۴۰۵/۰۸/۱۴ */
/* راهنما فقط فلش خودش را دارد؛ نقطهٔ آبی «موقعیت من» (اگر پیش از مسیریابی روشن شده بود) دومین نشانگر نشود */
#ig-map[data-guide] .maplibregl-user-location-dot, #ig-map[data-guide] .maplibregl-user-location-accuracy-circle { display: none; }
/* گوشی: جستجو پایین صفحه است، پس ردیف دسته‌ها هم‌ردیف نشان ایران‌گاه و از کنار آن شروع می‌شود */
@media (max-width: 720px) {
  .ig-map-chips { top: calc(11px + env(safe-area-inset-top, 0px)); inset-inline-start: calc(48px + max(12px, env(safe-area-inset-right, 0px))); }
  .ig-map-chips.ig-map-chips--sub { top: calc(61px + env(safe-area-inset-top, 0px)); inset-inline-start: 0; }
}
/* عدد سرعت پایین‌تر از تابلوی سرعت مجاز، تا زیر آن نرود */
.ig-map-speedo .ig-map-speed { padding-top: 12px; }
.ig-map-speedo .ig-map-limit { top: -20px; }
/* مسیر خودرو خیلی بلندتر از فاصلهٔ مستقیم */
.ig-map-route .ig-map-route__detour {
  margin: 8px 0 4px; padding: 8px 12px; border-radius: 12px; border-inline-start: 3px solid #f59e0b; background: var(--ig-soft-bg);
  color: var(--ig-ink); font-size: 13px; line-height: 1.9;
}
.ig-map-route .ig-map-route__detour button {
  margin: 0; padding: 2px 12px; min-height: 30px; border: 1.5px solid var(--ig-accent); border-radius: 999px; background: var(--ig-paper);
  color: var(--ig-accent); font: 700 13px "Vazirmatn", Tahoma, sans-serif; cursor: pointer;
}
