/* منيو غزة - الخريطة */
:root[data-theme="dark"] {
    --brand: #f28b05; --brand-2: #ff6a00;
    --brand-light: rgba(242, 139, 5, 0.14); --brand-border: rgba(242, 139, 5, 0.4);
    --bg: #090c10; --panel: rgba(16, 20, 28, 0.94); --panel-solid: #12161e;
    --border: rgba(255, 255, 255, 0.09); --text: #f8fafc; --muted: #94a3b8;
    --field: rgba(255, 255, 255, 0.06); --row: rgba(255, 255, 255, 0.05);
    --good: #22c55e; --bad: #ef4444; --blue: #3b82f6;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
:root[data-theme="light"] {
    --brand: #f28b05; --brand-2: #ff6a00;
    --brand-light: #fff3e3; --brand-border: rgba(242, 139, 5, 0.35);
    --bg: #eef1f5; --panel: rgba(255, 255, 255, 0.95); --panel-solid: #ffffff;
    --border: rgba(15, 23, 42, 0.1); --text: #0f172a; --muted: #64748b;
    --field: rgba(15, 23, 42, 0.05); --row: rgba(15, 23, 42, 0.04);
    --good: #16a34a; --bad: #dc2626; --blue: #2563eb;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'IBM Plex Sans Arabic', -apple-system, sans-serif; -webkit-tap-highlight-color: transparent; }
/* الأيقونات بس (مش طبقة رسم الخريطة) */
svg[viewBox="0 0 24 24"] { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.en { font-family: 'Plus Jakarta Sans', sans-serif; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes popIn { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }

#map { position: fixed; inset: 0; z-index: 1; background: var(--bg); }
.leaflet-container { font-family: inherit; background: var(--bg); }
.leaflet-control-attribution { font-size: 9px !important; background: var(--panel) !important; color: var(--muted) !important; border-radius: 8px 0 0 0; }
.leaflet-control-attribution a { color: var(--muted) !important; }
/* خريطة ليلية بفلتر (بدون مفتاح API) */
.dark-tiles .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.6); }
.leaflet-bottom.leaflet-left { margin-bottom: env(safe-area-inset-bottom); }

/* ===== التحميل ===== */
.map-loading { position: fixed; inset: 0; z-index: 3000; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; transition: opacity 0.4s ease; }
.map-loading.done { opacity: 0; pointer-events: none; }
.ml-logo { position: relative; width: 80px; height: 80px; margin-bottom: 6px; }
.ml-logo::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--brand); border-right-color: var(--brand); animation: spin 0.9s linear infinite; }
.ml-logo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.map-loading b { font-size: 16px; font-weight: 800; }
.map-loading span { font-size: 12.5px; color: var(--muted); }
.ml-retry { margin-top: 8px; background: var(--brand); color: #fff; border: none; font-size: 13px; font-weight: 800; padding: 10px 20px; border-radius: 12px; cursor: pointer; }

/* ===== الشريط العلوي ===== */
.map-top { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: calc(10px + env(safe-area-inset-top)) 10px 0; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.top-row { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto; }
.icon-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.theme span { display: flex; animation: themeSpin 0.4s ease; }
@keyframes themeSpin { from { transform: rotate(-90deg) scale(0.5); opacity: 0; } }
:root[data-theme="dark"] .icon-btn.theme .i-moon, :root[data-theme="light"] .icon-btn.theme .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn.theme .i-sun { color: #fbbf24; }
.search { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 14px; background: var(--panel); border: 1.5px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color 0.2s ease; }
.search:focus-within { border-color: var(--brand); }
.search > svg { color: var(--brand); width: 17px; height: 17px; stroke-width: 2.4; }
.search input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--text); font-size: 13.5px; font-weight: 600; }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { display: none; width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--row); color: var(--muted); cursor: pointer; align-items: center; justify-content: center; }
.search-clear svg { width: 13px; height: 13px; }
.search.has-text .search-clear { display: flex; }

.search-results { max-width: 640px; margin: 6px auto 0; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; display: none; }
.search-results.show { display: block; animation: fadeUp 0.25s ease; }
.sr-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: none; border: none; border-bottom: 1px solid var(--border); color: var(--text); cursor: pointer; text-align: right; }
.sr-item:last-child { border-bottom: none; }
.sr-item:active, .sr-item:hover { background: var(--row); }
.sr-item .lg { width: 34px; height: 34px; border-radius: 10px; }
.sr-item b { display: block; font-size: 13px; }
.sr-item small { font-size: 11px; color: var(--muted); }
.sr-empty { padding: 14px; text-align: center; font-size: 12.5px; color: var(--muted); }

.chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; max-width: 640px; margin: 8px auto 0; padding: 2px 0 4px; }
.chips.cats { margin-top: 2px; padding-bottom: 8px; }
.cat-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; background: var(--panel-solid); border: 1.5px solid var(--border); color: var(--text); font-size: 12.5px; font-weight: 800; padding: 6px 12px 6px 7px; border-radius: 30px; cursor: pointer; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: all 0.2s ease; }
.cat-chip .ci { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--brand-light); color: var(--brand); }
.cat-chip .ci svg { width: 15px; height: 15px; }
.cat-chip small { font-size: 10.5px; color: var(--muted); font-family: 'Plus Jakarta Sans', sans-serif; }
.cat-chip.active { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.cat-chip.active .ci { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--border); color: var(--text); font-size: 12.5px; font-weight: 700; padding: 8px 13px; border-radius: 30px; cursor: pointer; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,0.15); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: all 0.2s ease; }
.chip svg { width: 15px; height: 15px; color: var(--brand); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.chip.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.chip.active svg { color: #fff; }
.chip.fav.active { background: linear-gradient(135deg, #ef4444, #f43f5e); }
.chip.fav.active svg { fill: currentColor; }

/* ===== العلامة ===== */
.watermark { position: fixed; z-index: 900; left: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; background: rgba(9,12,16,0.82); border: 1px solid rgba(255,255,255,0.14); padding: 4px 10px; border-radius: 20px; pointer-events: none; }
.watermark img { width: 16px; height: 16px; border-radius: 50%; background: #fff; object-fit: cover; }
.watermark span { font-size: 10px; font-weight: 800; color: #fff; }
.watermark b { color: var(--brand); }

/* ===== أزرار التحكم ===== */
.fabs { position: fixed; z-index: 950; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
body.sheet-open .fabs, body.sheet-open .watermark { bottom: calc(var(--sheet-h, 260px) + 14px); }
body.sheet-open .watermark { opacity: 0; }
.fab { width: 46px; height: 46px; border-radius: 15px; background: var(--panel); border: 1px solid var(--border); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.fab:active { transform: scale(0.9); }
.fab.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.fab.primary.locating svg { animation: spin 1s linear infinite; }
.fab-group { display: flex; flex-direction: column; border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); }
.fab-group .fab { border-radius: 0; box-shadow: none; }
.fab-group .fab + .fab { border-top: none; }
.layers-menu { position: fixed; z-index: 960; right: 66px; bottom: calc(240px + env(safe-area-inset-bottom)); background: var(--panel-solid); border: 1px solid var(--border); border-radius: 16px; padding: 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; animation: fadeUp 0.2s ease; }
.layers-menu button { background: none; border: none; color: var(--text); font-size: 12.5px; font-weight: 700; padding: 9px 14px; border-radius: 10px; cursor: pointer; text-align: right; white-space: nowrap; }
.layers-menu button.active { background: var(--brand-light); color: var(--brand); }

/* ===== زر القائمة ===== */
.list-toggle { position: fixed; z-index: 950; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 7px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: none; font-size: 13.5px; font-weight: 800; padding: 13px 22px; border-radius: 30px; cursor: pointer; box-shadow: 0 8px 24px rgba(242,139,5,0.45); transition: transform 0.3s ease, opacity 0.3s ease; }
.list-toggle b { background: rgba(255,255,255,0.25); padding: 1px 8px; border-radius: 10px; font-size: 12px; }
body.sheet-open .list-toggle, body.list-open .list-toggle { transform: translate(-50%, 120px); opacity: 0; }

/* ===== بطاقة المشروع ===== */
.sheet, .list-panel { position: fixed; z-index: 1100; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--panel-solid); border: 1px solid var(--border); border-bottom: none; border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.35); padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.sheet.open, .list-panel.open { transform: none; }
.sheet-handle { width: 42px; height: 5px; border-radius: 5px; background: var(--border); margin: 0 auto 10px; }
.sheet-close { position: absolute; top: 12px; left: 14px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--row); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sheet-close svg { width: 15px; height: 15px; }

.sh-head { display: flex; align-items: center; gap: 12px; padding-left: 40px; }
.lg { width: 58px; height: 58px; border-radius: 17px; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 22px; font-weight: 800; }
.lg img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.lg svg { width: 22px; height: 22px; }
.sh-title b { display: block; font-size: 17px; font-weight: 800; line-height: 1.3; }
.sh-cat { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 11.5px; font-weight: 700; color: var(--brand); background: var(--brand-light); padding: 2px 9px; border-radius: 9px; }
.sh-cat svg { width: 12px; height: 12px; }
.sh-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 10px; background: var(--row); color: var(--muted); }
.tag svg { width: 13px; height: 13px; }
.tag.open { background: rgba(34,197,94,0.12); color: var(--good); }
.tag.closed { background: rgba(239,68,68,0.12); color: var(--bad); }
.tag.dist { background: rgba(59,130,246,0.12); color: var(--blue); }
.tag .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sh-note { font-size: 11px; color: var(--muted); margin: -4px 0 10px; display: flex; align-items: center; gap: 5px; }
.sh-note svg { width: 13px; height: 13px; }
.sh-main { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sh-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-radius: 14px; font-size: 13px; font-weight: 800; text-decoration: none; cursor: pointer; border: 1px solid var(--border); background: var(--field); color: var(--text); }
.sh-btn svg { width: 16px; height: 16px; }
.sh-btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(242,139,5,0.3); }
.sh-btn.route { background: rgba(34,197,94,0.12); color: var(--good); border-color: rgba(34,197,94,0.3); }
.sh-btn:active { transform: scale(0.96); }
.sh-more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.sh-mini { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border-radius: 13px; background: var(--row); border: 1px solid var(--border); color: var(--text); font-size: 10.5px; font-weight: 700; text-decoration: none; cursor: pointer; }
.sh-mini svg { width: 18px; height: 18px; color: var(--brand); }
.sh-mini.is-fav { color: #ef4444; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.08); }
.sh-mini.is-fav svg { color: #ef4444; fill: currentColor; animation: popIn 0.4s ease; }
.sh-mini.disabled { opacity: 0.4; pointer-events: none; }

/* ===== القائمة ===== */
.list-panel { max-height: 70vh; display: flex; flex-direction: column; }
.lp-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 2px 10px; }
.lp-head b { font-size: 15px; font-weight: 800; }
.lp-head .sheet-close { position: static; }
.lp-items { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; }
.lp-item { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 16px; background: var(--row); border: 1px solid var(--border); cursor: pointer; text-align: right; color: var(--text); width: 100%; animation: fadeUp 0.3s ease both; }
.lp-item .lg { width: 44px; height: 44px; border-radius: 13px; font-size: 17px; }
.lp-item .lp-info { flex: 1; min-width: 0; }
.lp-item b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-item small { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.lp-item small .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.lp-item small .dot.off { background: var(--bad); }
.lp-dist { font-size: 11.5px; font-weight: 800; color: var(--blue); white-space: nowrap; }
.lp-empty { text-align: center; padding: 20px; font-size: 12.5px; color: var(--muted); }

/* ===== بطاقة المسار ===== */
.route-card { position: fixed; z-index: 1050; left: 10px; right: 10px; top: calc(150px + env(safe-area-inset-top)); max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; background: var(--panel-solid); border: 1.5px solid rgba(34,197,94,0.4); border-radius: 16px; padding: 9px 10px 9px 12px; box-shadow: var(--shadow); animation: fadeUp 0.3s ease; }
.rc-info { flex: 1; min-width: 0; }
.rc-info small { display: block; font-size: 10px; color: var(--muted); }
.rc-info b { display: block; font-size: 13px; color: var(--good); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-stats { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.rc-stats span { font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 8px; white-space: nowrap; }
.rc-dist { background: var(--brand-light); color: var(--brand); }
.rc-walk { background: rgba(34,197,94,0.14); color: var(--good); }
.rc-car { background: rgba(59,130,246,0.14); color: var(--blue); }
.rc-close { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; border: none; background: rgba(239,68,68,0.14); color: var(--bad); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rc-close svg { width: 14px; height: 14px; }
.route-line { stroke-dasharray: 10 10; animation: routeFlow 0.8s linear infinite; }
@keyframes routeFlow { to { stroke-dashoffset: -20; } }

/* ===== الدبابيس ===== */
.pin-anchor { position: relative; width: 0; height: 0; }
.pin { position: absolute; left: 0; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform 0.25s ease; }
.pin-drop { display: flex; flex-direction: column; align-items: center; animation: pinDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes pinDrop { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.pin-logo { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--panel-solid); border: 3px solid var(--brand); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--brand); box-shadow: 0 5px 14px rgba(0,0,0,0.4); }
.pin-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.pin-logo svg { width: 18px; height: 18px; }
.pin-closed .pin-logo { border-color: #9ca3af; filter: grayscale(0.6); }
.pin-name { margin-top: 3px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; background: var(--panel-solid); color: var(--text); font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 8px; white-space: nowrap; border: 1px solid var(--border); box-shadow: 0 3px 8px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 4px; }
.pin-name i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex-shrink: 0; }
.pin-closed .pin-name i { background: var(--bad); }
.pin-tip { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid var(--brand); margin-top: -1px; order: -1; display: none; }
.pin.active { transform: translateX(-50%) scale(1.18); z-index: 10; }
.pin.active .pin-logo { border-color: var(--brand-2); box-shadow: 0 0 0 6px rgba(242,139,5,0.3), 0 6px 18px rgba(0,0,0,0.45); }
.pin.active .pin-name { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.map-zoomed-out .pin-name { display: none; }

/* تجميع الدبابيس */
.cluster { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(242,139,5,0.25); }
.cluster span { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 4px 12px rgba(242,139,5,0.5); font-family: 'Plus Jakarta Sans', sans-serif; }


/* الوجهة المخصصة */
.dest-pin { position: absolute; left: 0; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.dest-pin span { background: #6366f1; color: #fff; font-size: 10.5px; font-weight: 800; padding: 4px 9px; border-radius: 10px; white-space: nowrap; box-shadow: 0 4px 12px rgba(99,102,241,0.5); animation: popIn 0.35s ease; }
.dest-pin i { width: 2px; height: 12px; background: #6366f1; }

/* ===== Toast ===== */
.toast { position: fixed; z-index: 4000; top: calc(160px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -10px); opacity: 0; pointer-events: none; background: var(--panel-solid); color: var(--text); border: 1px solid var(--border); font-size: 12.5px; font-weight: 700; padding: 9px 16px; border-radius: 30px; box-shadow: var(--shadow); transition: all 0.3s ease; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
    .sheet, .list-panel { bottom: 16px; border-radius: 24px; border-bottom: 1px solid var(--border); }
}

/* اختيار طريقة التنقل */
.rc-modes { display: flex; gap: 4px; background: var(--row); border-radius: 10px; padding: 3px; }
.rc-modes button { border: none; background: none; color: var(--muted); font-size: 11px; font-weight: 800; padding: 5px 9px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.rc-modes button svg { width: 13px; height: 13px; }
.rc-modes button.active { background: var(--good); color: #fff; }
.route-card { flex-wrap: wrap; }
.rc-bottom { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* زر "حدد موقعي" العائم */
.loc-prompt { position: fixed; z-index: 940; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 7px; background: var(--panel-solid); color: var(--text); border: 1.5px solid rgba(59,130,246,0.5); font-size: 12.5px; font-weight: 800; padding: 9px 14px; border-radius: 30px; cursor: pointer; box-shadow: var(--shadow); white-space: nowrap; animation: fadeUp 0.4s ease; }
.loc-prompt svg { width: 16px; height: 16px; color: var(--blue); }
body.sheet-open .loc-prompt, body.list-open .loc-prompt { display: none; }
.pick-banner { position: fixed; z-index: 1060; left: 10px; right: 10px; top: calc(150px + env(safe-area-inset-top)); max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #1d4ed8; color: #fff; font-size: 12.5px; font-weight: 800; padding: 10px 12px; border-radius: 14px; box-shadow: var(--shadow); animation: fadeUp 0.3s ease; }
.pick-banner button { background: rgba(255,255,255,0.2); border: none; color: #fff; font-size: 11.5px; font-weight: 800; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
body.picking-me #map { cursor: crosshair; }

/* ===== شريط الفلاتر ===== */
.fbar { max-width: 640px; margin: 8px auto 0; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; }
.fbar-track { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 7px 6px; }
.fbar-track::-webkit-scrollbar { display: none; }
.f-item { flex-shrink: 0; min-width: 58px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px 4px; border-radius: 14px; transition: color 0.2s ease; }
.f-item b { font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.fi { position: relative; width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--row); color: var(--text); transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.fi svg { width: 17px; height: 17px; }
.fi.open svg { color: var(--good); }
.fi em { position: absolute; top: -4px; left: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--panel-solid); border: 1px solid var(--border); color: var(--muted); font-size: 9.5px; font-style: normal; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.f-item:active .fi { transform: scale(0.9); }
.f-item.active { color: var(--brand); }
.f-item.active .fi { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 5px 14px rgba(242,139,5,0.4); transform: translateY(-1px); }
.f-item.active .fi svg { color: #fff; }
.f-item.active .fi em { background: #fff; color: var(--brand); border-color: transparent; }
.f-item.fav.active { color: #ef4444; }
.f-item.fav.active .fi { background: linear-gradient(135deg, #ef4444, #f43f5e); box-shadow: 0 5px 14px rgba(239,68,68,0.4); }
.f-item.fav.active .fi svg { fill: currentColor; }
.fbar-sep { flex-shrink: 0; width: 1px; height: 34px; background: var(--border); margin: 0 4px; }

/* ===== موقعي: أيقونة مستخدم + اتجاه ===== */
.me-pin { position: relative; width: 0; height: 0; }
.me-dot { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #1d4ed8); border: 3px solid #fff; box-shadow: 0 4px 14px rgba(29,78,216,0.5); display: flex; align-items: center; justify-content: center; color: #fff; z-index: 2; }
.me-dot svg { width: 17px; height: 17px; stroke-width: 2.4; }
.me-pulse { position: absolute; left: -30px; top: -30px; width: 60px; height: 60px; border-radius: 50%; background: rgba(59,130,246,0.3); animation: mePulse 2s ease-out infinite; }
@keyframes mePulse { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.me-dir { position: absolute; left: -48px; top: -48px; width: 96px; height: 96px; opacity: 0; transition: transform 0.25s ease-out, opacity 0.3s ease; z-index: 1; }
.me-dir.on { opacity: 1; }
.me-cone { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from -28deg, rgba(59,130,246,0.55), rgba(59,130,246,0) 56deg, transparent 56deg); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); }
.me-tip { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 10px solid #1d4ed8; filter: drop-shadow(0 0 2px #fff); }

/* ===== مصادر الخريطة (زر صغير) ===== */
.credits-btn { position: fixed; z-index: 900; left: 12px; bottom: calc(22px + env(safe-area-inset-bottom)); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 800; font-family: Georgia, serif; font-style: italic; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.credits-pop { position: fixed; z-index: 950; left: 12px; bottom: calc(52px + env(safe-area-inset-bottom)); max-width: 260px; background: var(--panel-solid); color: var(--muted); border: 1px solid var(--border); border-radius: 12px; padding: 9px 11px; font-size: 10.5px; line-height: 1.6; box-shadow: var(--shadow); animation: fadeUp 0.2s ease; }
.credits-pop a { color: var(--brand); }
body.sheet-open .credits-btn, body.list-open .credits-btn { display: none; }
