@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --bg: #FBF6EE;
  --surface: #FFFFFF;
  --surface-soft: #F3EAD9;
  --teal: #1F3A3D;
  --terracotta: #C85A32;
  --gold: #E3A024;
  --ink: #1C2729;
  --muted: #6A7678;
  --mint: #2E7D5B;
  --border: #E4D9C5;
  --radius: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', 'Cairo', system-ui, sans-serif;
  padding-bottom: 84px;
}

[dir="rtl"] body { font-family: 'Cairo', 'Plus Jakarta Sans', system-ui, sans-serif; }

.topbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(31, 58, 61, 0.96);
  color: #fff;
  backdrop-filter: blur(12px);
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

body.in-apk .topbar { padding-top: 38px; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo-wrap {
  width: 38px; height: 38px; border-radius: 11px; overflow: hidden;
  background: #F3EAD9; display: grid; place-items: center; flex-shrink: 0;
}
.brand-logo { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-title { font-family: 'Playfair Display', 'Cairo', serif; font-size: 1.15rem; font-weight: 700; margin: 0; }
.brand-sub { font-size: 0.72rem; opacity: 0.82; }

.top-actions { display: flex; gap: 7px; align-items: center; }
.pill {
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.76rem; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.pill.accent { background: var(--gold); color: #1C2729; border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #A0B0B2; }
.dot.live { background: #52E09D; box-shadow: 0 0 0 4px rgba(82, 224, 157, 0.25); }

.container { max-width: 720px; margin: 0 auto; padding: 14px; }
.hidden { display: none !important; }

.weather-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.w-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 11px 12px;
  box-shadow: 0 6px 18px rgba(31, 58, 61, 0.06);
}
.w-city { font-size: 0.74rem; font-weight: 700; color: var(--terracotta); }
.w-temp { font-size: 1.05rem; font-weight: 800; margin: 2px 0; }
.w-meta { font-size: 0.72rem; color: var(--muted); }

.fly-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.fly-btn {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  padding: 8px 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.fly-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }

#mapWrap {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 0 12px 30px rgba(31, 58, 61, 0.12);
  height: 54vh;
  min-height: 320px;
}
#map { width: 100%; height: 100%; }

.tap-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.pin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}
.pin-ico {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--surface-soft);
  display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0;
}
.pin-thumb {
  width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
}

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 8px 6px max(8px, env(safe-area-inset-bottom));
  z-index: 1000;
}
.nav-btn {
  border: none; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 0.72rem; font-weight: 700; cursor: pointer;
}
.nav-btn.active { color: var(--terracotta); }
.nav-btn .ico { font-size: 1.2rem; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(20, 32, 34, 0.55);
  display: flex; align-items: flex-end; justify-content: center; padding: 12px;
}
.modal-sheet {
  width: 100%; max-width: 500px;
  background: var(--surface);
  border-radius: 22px; padding: 20px;
  max-height: 86vh; overflow-y: auto;
}
.form-field { margin-bottom: 10px; }
.form-field label { display: block; font-size: 0.8rem; font-weight: 700; margin-bottom: 4px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; font-size: 0.9rem; font-family: inherit;
}
.primary-btn {
  width: 100%; border: none; background: var(--terracotta); color: #fff;
  border-radius: 14px; padding: 12px; font-size: 0.94rem; font-weight: 700; cursor: pointer;
}
