/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-dark:   #023e8a;
  --blue-main:   #0077b6;
  --blue-mid:    #0096c7;
  --blue-light:  #00b4d8;
  --blue-pale:   #90e0ef;
  --blue-ice:    #caf0f8;
  --bg:          #f0f8ff;
  --white:       #ffffff;
  --text-dark:   #1a2e3b;
  --text-mid:    #4a6274;
  --text-soft:   #7a95a5;
  --border:      rgba(0,119,182,0.15);
  --border-mid:  rgba(0,119,182,0.25);
  --shadow-sm:   0 2px 8px rgba(0,119,182,0.10);
  --shadow-md:   0 4px 16px rgba(0,119,182,0.15);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-h:    60px;
  --bottom-h:    64px;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-dark);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

button { font-family: var(--font); cursor: pointer; border: none; background: none; }
a { text-decoration: none; color: inherit; }
input, select, textarea { font-family: var(--font); }
img { max-width: 100%; display: block; }

/* ============================================================
   APP SHELL
   ============================================================ */
#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 0 40px rgba(0,0,0,0.08);
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  height: var(--header-h);
  background: var(--blue-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-logo-icon {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.header-logo-text {
  color: white;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== SPRACH-DROPDOWN ===== */
.lang-dropdown-wrap {
  position: relative;
}

.lang-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 20px;
  padding: 5px 10px 5px 8px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.lang-dropdown-btn:active { background: rgba(255,255,255,0.25); }

.lang-dropdown-btn span:first-child { display:inline-flex;align-items:center;line-height:1; }

#langDropdownChevron {
  font-size: 12px;
  transition: transform 0.2s;
}

#langDropdownChevron.open { transform: rotate(180deg); }

.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  overflow: hidden;
  min-width: 140px;
  z-index: 500;
}

.lang-dropdown-menu.open { display: block; }

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
  font-family: var(--font);
}

.lang-dropdown-item:active { background: var(--bg); }

.lang-dropdown-item.active {
  color: var(--blue-main);
  font-weight: 600;
  background: var(--blue-ice);
}

.lang-dropdown-item + .lang-dropdown-item {
  border-top: 1px solid var(--border);
}

.lang-flag-svg {
  width: 18px;
  height: 12px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
  object-fit: cover;
}
.lang-dropdown-btn .lang-flag-svg {
  width: 18px;
  height: 12px;
}
.lang-dropdown-item .lang-flag-svg {
  width: 20px;
  height: 14px;
}


.hamburger-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.hamburger-btn:active { background: rgba(255,255,255,0.25); }

/* ============================================================
   PAGES / SCROLL CONTAINER
   ============================================================ */
.page-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}

.page { display: none; }
.page.active { display: block; }

/* ============================================================
   HOME PAGE — HERO
   ============================================================ */
.hero {
  background: var(--blue-main);
  padding: 20px 16px 36px;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 28px;
  background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero-title {
  color: white;
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.hero-sub {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  margin-bottom: 16px;
}

.search-wrap {
  background: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 46px;
  gap: 10px;
  box-shadow: var(--shadow-md);
}

.search-wrap i { color: var(--blue-main); font-size: 19px; flex-shrink: 0; }

.search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-dark);
  background: transparent;
}

.search-wrap input::placeholder { color: var(--text-soft); }

.search-wrap .search-clear {
  color: var(--text-soft);
  font-size: 18px;
  display: none;
  cursor: pointer;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 10px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-main);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.section-link {
  font-size: 12px;
  color: var(--blue-light);
  font-weight: 500;
}

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 4px;
}

.cat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.cat-card:active {
  border-color: var(--blue-mid);
  box-shadow: var(--shadow-sm);
}

.cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  background: var(--blue-ice);
  color: var(--blue-main);
}

.cat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.3;
}

.cat-count {
  font-size: 11px;
  color: var(--blue-mid);
  margin-top: 2px;
}

/* ============================================================
   REGION FILTER TABS
   ============================================================ */
.region-tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.region-tabs::-webkit-scrollbar { display: none; }

.region-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-mid);
  cursor: pointer;
  background: var(--white);
  color: var(--text-mid);
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}

.region-tab.active {
  background: var(--blue-main);
  color: white;
  border-color: var(--blue-main);
}

/* ============================================================
   LISTING CARDS
   ============================================================ */
.listings-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.listing-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 12px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.listing-card:active {
  box-shadow: var(--shadow-sm);
  border-color: var(--blue-pale);
}

.listing-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  overflow: hidden;
  background: var(--blue-ice);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-main);
  font-size: 24px;
}

.listing-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-body { flex: 1; min-width: 0; }

.listing-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-meta {
  font-size: 12px;
  color: var(--blue-mid);
  margin-bottom: 5px;
}

.listing-location {
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-location i { font-size: 13px; }

.lang-badges {
  display: flex;
  gap: 4px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.lang-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--blue-ice);
  color: var(--blue-dark);
}

.listing-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  flex-shrink: 0;
}

.action-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: opacity 0.15s;
}

.action-btn:active { opacity: 0.7; }
.action-phone { background: var(--blue-ice); color: var(--blue-main); }
.action-wa    { background: #e8f8ef; color: #25D366; }

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.bottom-nav {
  height: var(--bottom-h);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 16px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn i { font-size: 22px; }

.nav-btn.active { color: var(--blue-main); }

/* ============================================================
   HAMBURGER MENU OVERLAY
   ============================================================ */
.menu-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,20,40,0.55);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.menu-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 78%;
  max-width: 300px;
  background: var(--white);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.menu-overlay.open .menu-panel {
  transform: translateX(0);
}

.menu-header {
  background: var(--blue-main);
  padding: 20px 20px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.menu-header-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
}

.menu-header-text { color: white; }
.menu-header-text .title { font-size: 16px; font-weight: 600; }
.menu-header-text .sub { font-size: 12px; opacity: 0.75; margin-top: 2px; }

.menu-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 16px 20px 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  cursor: pointer;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.menu-item:active { background: var(--bg); }

.menu-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--blue-ice);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-main);
  font-size: 18px;
  flex-shrink: 0;
}

.menu-item-icon.green { background: #e8f8ef; color: #1a8a4a; }
.menu-item-icon.orange { background: #fff3e8; color: #d07020; }
.menu-item-icon.purple { background: #f0ecff; color: #6040b0; }

.menu-item-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
}

.menu-item-sub {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 1px;
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 20px;
}

.menu-lang-row {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
}

.menu-lang-btn {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.menu-lang-btn.active {
  background: var(--blue-main);
  color: white;
  border-color: var(--blue-main);
}

.menu-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.menu-footer-text {
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.6;
}

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search-results-page {
  padding: 16px;
}

.search-results-title {
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 14px;
}

.no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-soft);
}

.no-results i {
  font-size: 48px;
  color: var(--blue-pale);
  display: block;
  margin-bottom: 12px;
}

.no-results p {
  font-size: 14px;
}

/* ============================================================
   CATEGORY PAGE
   ============================================================ */
.cat-page-header {
  background: var(--blue-main);
  padding: 16px 16px 28px;
  position: relative;
}

.cat-page-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 24px;
  background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  margin-bottom: 12px;
  cursor: pointer;
}

.back-btn i { font-size: 20px; }

.cat-page-title {
  color: white;
  font-size: 20px;
  font-weight: 600;
}

/* ===== SUBKAT DROPDOWN ===== */
.subcat-dropdown-wrap {
  position: relative;
}

.subcat-dropdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.subcat-dropdown i {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.subcat-dropdown i.open { transform: rotate(180deg); }

.subcat-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  overflow: hidden;
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
}

.subcat-dropdown-menu.open { display: block; }

.subcat-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dark);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.subcat-dropdown-item:active { background: var(--bg); }

.subcat-dropdown-item.active {
  color: var(--blue-main);
  font-weight: 600;
}

.subcat-dropdown-item .check-icon {
  color: var(--blue-main);
  font-size: 14px;
  display: none;
}

.subcat-dropdown-item.active .check-icon { display: block; }

.subcat-dropdown-item + .subcat-dropdown-item {
  border-top: 1px solid var(--border);
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-page { padding: 24px 16px; }
.about-page h2 { font-size: 20px; font-weight: 600; color: var(--blue-main); margin-bottom: 12px; }
.about-page p { font-size: 14px; color: var(--text-mid); line-height: 1.7; margin-bottom: 14px; }

.about-highlight {
  background: var(--blue-ice);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.about-highlight i { font-size: 22px; color: var(--blue-main); margin-top: 1px; flex-shrink: 0; }
.about-highlight p { margin-bottom: 0; color: var(--text-dark); font-size: 13px; }

.cta-btn {
  display: block;
  background: var(--blue-main);
  color: white;
  border-radius: var(--radius-md);
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.15s;
  border: none;
  width: 100%;
  margin-top: 8px;
}

.cta-btn:active { opacity: 0.85; }

/* ============================================================
   EMPTY STATE / LOADING
   ============================================================ */
.loading-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-soft);
}

.loading-state i {
  font-size: 36px;
  color: var(--blue-pale);
  display: block;
  margin-bottom: 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   BOTTOM SPACER
   ============================================================ */
.bottom-spacer { height: 24px; }

/* ============================================================
   NEARBY / IN MEINER NAEHE
   ============================================================ */
.nearby-wrap {
  padding: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nearby-btn {
  width: 100%;
  min-height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-mid);
  background: var(--white);
  color: var(--blue-main);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.nearby-btn.active {
  background: var(--blue-main);
  color: white;
  border-color: var(--blue-main);
}

.nearby-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.nearby-status {
  min-height: 14px;
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
}

/* ===== RADIUS-AUSWAHL ===== */
.nearby-radius-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 4px;
  flex-wrap: wrap;
}
.nearby-radius-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
  margin-right: 2px;
}
.nearby-radius-chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--border-mid);
  background: var(--white);
  color: var(--text-mid);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  white-space: nowrap;
}
.nearby-radius-chip.active {
  background: var(--blue-main);
  color: white;
  border-color: var(--blue-main);
}
.nearby-radius-chip:active { opacity: 0.8; }

.listing-distance {
  margin-left: 6px;
  color: var(--blue-main);
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
   NEARBY MAP / OPENSTREETMAP
   ============================================================ */
.nearby-map-card {
  margin: 0 16px 14px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.nearby-map-head {
  min-height: 38px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-soft);
}

.nearby-map-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nearby-map-head i {
  color: var(--blue-main);
  font-size: 18px;
}

.nearby-map {
  width: 100%;
  height: 280px;
  background: #eef6fb;
}

.nearby-map-popup {
  min-width: 180px;
  max-width: 240px;
}

.nearby-map-popup-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.nearby-map-popup-meta {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.nearby-map-popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--blue-main);
  color: #fff !important;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.leaflet-container {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (max-width: 420px) {
  .nearby-map { height: 250px; }
}


/* ============================================================
   iOS / modern mobile hardening
   ============================================================ */
@supports (-webkit-touch-callout: none) {
  html { min-height: -webkit-fill-available; }
  body { min-height: -webkit-fill-available; }
}

@supports (height: 100dvh) {
  #app { height: 100dvh; }
}

.app-header {
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

.bottom-nav {
  min-height: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px));
}

input, select, textarea, button {
  font-size: 16px;
}

.search-wrap input {
  font-size: 16px;
}

.leaflet-container {
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-x pan-y;
}



/* ============================================================
   APP INSTALL DAILY BADGE
   ============================================================ */
.app-install-badge {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 950;
  display: none;
  align-items: center;
  gap: 8px;
  max-width: 430px;
  margin: 0 auto;
  background: rgba(6, 17, 31, 0.96);
  color: var(--white);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.32);
  padding: 8px;
  backdrop-filter: blur(12px);
}

.app-install-badge.open {
  display: flex;
}

.app-install-badge-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: inherit;
  min-width: 0;
}

.app-install-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 204, 21, 0.18);
  font-size: 22px;
  flex-shrink: 0;
}

.app-install-badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.app-install-badge-text strong {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
}

.app-install-badge-text small {
  font-size: 12px;
  color: rgba(255,255,255,0.76);
  line-height: 1.25;
}

.app-install-badge-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.12);
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

/* ============================================================
   APP INSTALL MODAL
   ============================================================ */
.install-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,20,40,0.58);
  z-index: 260;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.install-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.install-modal {
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: var(--white);
  border-radius: 22px;
  padding: 28px 28px 24px;
  position: relative;
  box-shadow: 0 18px 48px rgba(0,0,0,0.22);
  text-align: center;
}

.install-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 22px;
}

.install-modal-robot { font-size: 42px; line-height: 1; margin-bottom: 8px; }
.install-modal h2 { font-size: 21px; font-weight: 800; color: #06111f; margin-bottom: 8px; }
.install-modal-sub { font-size: 13px; color: var(--text-soft); margin-bottom: 20px; }

.install-benefits {
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
  margin-bottom: 16px;
}

.install-benefits div {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dark);
  line-height: 1.45;
  margin-bottom: 9px;
}
.install-benefits div:last-child { margin-bottom: 0; }
.install-benefits span:first-child { width: 20px; flex-shrink: 0; }

.install-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.install-tab {
  border-radius: 9px;
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  background: transparent;
}

.install-tab.active {
  color: var(--text-dark);
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.install-instructions {
  background: #fbfaf7;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: left;
}

.install-instructions h3 {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 12px;
}

.install-instructions ol { list-style: none; }
.install-instructions li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.install-step {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #facc15;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.install-main-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 800;
  color: var(--white);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.install-main-btn.android { background: #18d36b; }
.install-main-btn.ios { background: #262626; }
.install-note { text-align: center; color: var(--text-soft); font-size: 12px; margin-top: 14px; }

.install-close-bottom {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-soft);
}

/* ============================================================
   LEGAL PAGE
   ============================================================ */
.legal-page { padding-bottom: 34px; }
.legal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 0 0 14px;
  box-shadow: var(--shadow-soft);
}
.legal-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-main);
  margin: 0 0 10px;
}
.legal-card h3 i { font-size: 20px; }
.legal-card p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-mid);
  margin: 0 0 10px;
}
.legal-card p:last-child { margin-bottom: 0; }
.legal-card a { color: var(--blue-main); font-weight: 600; }
.legal-note {
  background: var(--blue-ice);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--text-dark) !important;
}
