* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green-dark: #1a3c34;
  --green: #2d6a4f;
  --green-light: #52b788;
  --gold: #d4a373;
  --gold-light: #e9c46a;
  --text: #e8f0ec;
  --text-muted: #9bb3a8;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,.5);
  --bg: #0d1f1a;
  --surface: rgba(255,255,255,.06);
}

html { scroll-behavior: smooth; -webkit-tap-highlight-color: rgba(82,183,136,.2); }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  background: var(--bg);
}

/* Thinking bar */
#thinking-bar {
  position: fixed; top: 0; left: 0; z-index: 1001;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--green-light), var(--gold), var(--green-light));
  background-size: 200% 100%;
  transition: width .4s ease, opacity .3s;
  opacity: 0;
  pointer-events: none;
}
#thinking-bar.active { opacity: 1; }
#thinking-bar.thinking {
  width: 70%;
  animation: thinkPulse 1.5s ease-in-out infinite, shimmer 2s linear infinite;
}
#thinking-bar.done {
  width: 100%;
  transition: width .3s ease;
}
@keyframes thinkPulse {
  0%,100% { opacity: 1; }
  50% { opacity: .7; }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
#bg-fixed {
  position: fixed; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
  transition: opacity 1.5s ease;
}
#bg-fixed::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
}

/* Loader */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity .6s, visibility .6s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-spinner {
  width: 50px; height: 50px;
  border: 4px solid var(--surface);
  border-top-color: var(--green-light);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loader p { margin-top: 20px; color: var(--green-light); font-weight: 600; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

/* Nav */
#navbar {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  padding: 12px 0;
  background: rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
  transition: background .3s, box-shadow .3s, transform .35s ease;
  will-change: transform;
}
#navbar.hidden { transform: translateY(-100%); }
#navbar.scrolled {
  background: rgba(0,0,0,.85);
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px;
}
.logo { text-decoration: none; display: flex; align-items: center; }
.logo-img { height: 64px; width: auto; display: block; }
@media (max-width: 768px) { .logo-img { height: 48px; } }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-weight: 500; font-size: .9rem;
  transition: color .3s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--green-light);
  transition: width .3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* Locations dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: none; border: none; color: var(--text-muted);
  font-weight: 500; font-size: .9rem; cursor: pointer;
  padding: 0; transition: color .3s; position: relative;
  display: flex; align-items: center; gap: 4px;
  font-family: inherit;
}
.nav-dropdown-btn::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--green-light);
  transition: width .3s;
}
.nav-dropdown-btn:hover { color: var(--text); }
.nav-dropdown-btn:hover::after { width: 100%; }
.nav-dropdown-arrow { font-size: .7rem; transition: transform .2s; }
.nav-dropdown-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; }
.nav-dropdown-backdrop.open { display: block; }
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%); min-width: 240px;
  background: rgba(15,26,20,.95); -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4); padding: 8px 0;
  z-index: 1001; max-height: 60vh; overflow-y: auto;
}
.nav-dropdown-menu.open { display: block; }
.nav-dropdown-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 18px; border: none; background: none;
  color: var(--text-muted); font-size: .88rem; cursor: pointer;
  text-align: left; transition: background .2s, color .2s;
  font-family: inherit;
}
.nav-dropdown-item:hover { background: rgba(255,255,255,.08); color: var(--text); }
.nav-dropdown-item.active { color: var(--green-light); font-weight: 600; }
.nav-dropdown-count {
  font-size: .75rem; opacity: .5; font-weight: 400;
}

@media (max-width: 768px) {
  .nav-dropdown-backdrop { display: none !important; }
  .nav-dropdown-menu {
    position: absolute; top: calc(100% + 8px); left: 50%;
    transform: translateX(-50%); width: 90vw; max-width: 320px;
    max-height: 50vh; background: rgba(15,26,20,.98);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.5);
    padding: 8px 0; overflow-y: auto; z-index: 1002;
  }
  .nav-dropdown-menu.open { display: block; }
  .nav-dropdown-btn { padding: 0; }
  .nav-dropdown-item { padding: 12px 18px; font-size: .85rem; }
}
#menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* Hero */
#hero {
  height: 100vh; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-content { position: relative; z-index: 1; text-align: center; padding: 0 24px; max-width: 800px; }
.hero-content h1 {
  margin: 0;
  line-height: 0;
  animation: fadeUp 1s ease-out;
}
.hero-logo-img {
  width: clamp(280px, 50vw, 600px);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,.6));
  animation: fadeUp 1s ease-out;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(255,255,255,.85);
  margin: 24px 0 40px;
  animation: fadeUp 1s .2s both;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; animation: fadeUp 1s .4s both; }
.hero-buttons .btn { padding: 14px 36px; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: .95rem; transition: transform .3s, box-shadow .3s; }
.hero-buttons .btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 20px rgba(45,106,79,.4); }
.btn-primary:hover { box-shadow: 0 8px 30px rgba(45,106,79,.5); }
.btn-outline { border: 2px solid var(--green-light); color: var(--green-light); }
.btn-outline:hover { background: var(--green-light); color: var(--bg); }
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.6); font-size: .85rem;
  animation: bounce 2s infinite;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-8px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Sections */
section { padding: 100px 24px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--green-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-header p { color: var(--text-muted); margin-top: 8px; font-size: 1.05rem; }

/* Region tabs */
.region-tabs {
  display: flex; gap: 14px; justify-content: center;
  margin-top: 24px; flex-wrap: wrap;
}
.region-tab {
  padding: 12px 32px; border-radius: 50px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.08);
  color: var(--text-muted); cursor: pointer;
  font-size: 1rem; font-weight: 600;
  transition: all .3s; font-family: inherit;
  letter-spacing: .3px;
}
.region-tab:hover { background: rgba(255,255,255,.12); color: var(--text); transform: translateY(-1px); }
.region-tab.active {
  background: rgba(82,183,136,.2);
  border-color: var(--green-light);
  color: var(--green-light);
  box-shadow: 0 0 20px rgba(82,183,136,.15);
}

/* Places grid */
.places-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 28px; }
.place-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 460px; display: flex; align-items: flex-end;
  border: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
}
.place-card-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 6s ease, opacity .35s ease;
  background-color: var(--green-dark);
}
.place-card:hover .place-card-img { transform: scale(1.08); }
.place-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.2) 100%);
  z-index: 1;
}
.place-card-badge {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  background: rgba(0,0,0,.55); color: var(--gold-light);
  padding: 4px 12px; border-radius: 20px; font-size: .72rem; font-weight: 600;
  backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.08);
  letter-spacing: .3px;
}
.place-card-img .badge { display: none; }
.place-card-img .badge--hub {
  display: inline-block;
  position: absolute; top: 14px; left: 14px; z-index: 3;
  background: rgba(82,183,136,.2); color: var(--green-light);
  padding: 4px 12px; border-radius: 20px; font-size: .72rem; font-weight: 600;
  border: 1px solid var(--green-light); backdrop-filter: blur(6px);
}
.photo-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.5); color: #fff; border: none;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.3rem; cursor: pointer; opacity: 0;
  transition: opacity .3s, background .3s, transform .2s; z-index: 3;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.1);
}
.place-card:hover .photo-nav { opacity: 1; }
.photo-nav:hover { background: rgba(0,0,0,.8); transform: translateY(-50%) scale(1.1); }
.place-card-body {
  position: relative; z-index: 2; padding: 24px; width: 100%;
}
.place-card-body h3 {
  font-size: 1.4rem; margin-bottom: 6px;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
  line-height: 1.3;
}
.place-card-body p {
  color: #d0e2da; font-size: .88rem; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
  margin-bottom: 10px;
}
.place-card-desc {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
.place-card-body .tag {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--green-light); font-size: .82rem; font-weight: 600;
  padding: 6px 14px; border-radius: 10px;
  background: rgba(82,183,136,.1); border: 1px solid rgba(82,183,136,.2);
  transition: background .2s, border-color .2s;
  margin-top: 4px;
}
.place-card:hover .place-card-body .tag {
  background: rgba(82,183,136,.18);
  border-color: rgba(82,183,136,.35);
}
/* Rating badge on place cards */
.place-rating {
  display: flex; align-items: center; gap: 4px;
  font-size: .78rem; margin: 4px 0;
}
.rating-stars { color: var(--gold); letter-spacing: 1px; }
.rating-avg { color: var(--text); font-weight: 600; }
.rating-count { color: var(--text-muted); font-size: .72rem; }
.place-route-link {
  color: var(--gold); text-decoration: none; padding: 3px 10px;
  border-radius: 8px; transition: background .2s;
  background: rgba(212,163,115,.08); border: 1px solid rgba(212,163,115,.12);
  font-size: .74rem;
}
.place-route-link:hover { background: rgba(212,163,115,.18); color: var(--gold-light); }
.place-map-link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  color: var(--green-light); font-size: .76rem; text-decoration: none;
  opacity: .65; transition: opacity .2s;
}
.place-map-link:hover { opacity: 1; }
.place-card-mini-map {
  margin-top: 8px; height: 80px; border-radius: 8px; overflow: hidden;
  cursor: pointer; position: relative;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  transition: border-color .2s;
}
.place-card-mini-map:hover { border-color: rgba(82,183,136,.3); }
.place-card-mini-map-img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.7) brightness(0.8);
}
.place-card-mini-map-pin {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -100%);
  font-size: 1.4rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}
.place-card-mini-map-label {
  position: absolute; bottom: 4px; right: 6px;
  font-size: .65rem; color: var(--text-muted);
  background: rgba(0,0,0,.5); padding: 1px 6px; border-radius: 4px;
  backdrop-filter: blur(4px);
}
.place-card-mini-map-static {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(82,183,136,.08) 0%, rgba(45,106,79,.12) 100%);
  display: flex; align-items: center; justify-content: center;
}

/* Place card facts accordion */
.place-facts { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 8px; }
.place-facts-toggle {
  background: none; border: 1px solid rgba(82,183,136,.2); color: var(--green-light);
  cursor: pointer; font-size: .78rem; padding: 4px 10px; border-radius: 8px;
  width: 100%; text-align: left; transition: background .2s;
  display: flex; align-items: center; gap: 6px;
}
.place-facts-toggle:hover { background: rgba(82,183,136,.08); }
.place-facts-arrow { transition: transform .3s; margin-left: auto; }
.place-facts.open .place-facts-arrow { transform: rotate(180deg); }
.place-facts-content {
  max-height: 0; overflow: hidden; transition: max-height .4s ease, padding .3s ease, margin .3s ease;
  padding: 0 4px; margin-top: 0;
}
.place-facts.open .place-facts-content {
  max-height: 300px; padding: 8px 4px; margin-top: 6px;
}
.place-facts-content ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.place-facts-content li {
  font-size: .78rem; color: var(--text-muted); line-height: 1.4;
  padding: 6px 8px; background: rgba(255,255,255,.02); border-radius: 6px;
  border-left: 2px solid var(--green-light);
}
.place-facts-content li strong { color: var(--gold); display: block; margin-bottom: 2px; }
.place-facts-more { font-size: .72rem; color: var(--text-muted); font-style: italic; margin-top: 4px; text-align: center; opacity: .7; }

/* Modal facts — карточки с иконками */
.modal-facts { margin: 20px 0; }
.modal-facts-heading {
  font-size: .9rem; color: var(--gold); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.modal-facts-cards { display: flex; flex-direction: column; gap: 8px; }

/* Карточка факта */
.fact-card {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  transition: border-color .3s, background .3s;
}
.fact-card:hover {
  border-color: rgba(82,183,136,.2);
  background: rgba(255,255,255,.05);
}
.facts-expand-btn {
  display: block; width: 100%; padding: 8px; margin-top: 8px;
  background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.12);
  border-radius: 8px; color: var(--text-muted); font-size: .82rem;
  cursor: pointer; transition: background .2s;
}
.facts-expand-btn:hover { background: rgba(255,255,255,.08); }
.facts-collapse-btn {
  display: block; width: 100%; padding: 6px; margin: 6px 0;
  background: none; border: none; color: var(--text-muted);
  font-size: .78rem; cursor: pointer; text-align: center;
  opacity: .6; transition: opacity .2s;
}
.facts-collapse-btn:hover { opacity: 1; }
.fact-card--hidden { display: none; }
.fact-card-icon {
  font-size: 1.3rem; flex-shrink: 0;
  width: 28px; text-align: center; line-height: 1.4;
}
.fact-card-body { flex: 1; min-width: 0; }
.fact-card-title {
  font-size: .85rem; font-weight: 600; color: var(--gold);
  margin-bottom: 3px; line-height: 1.3;
}
.fact-card-text {
  font-size: .82rem; color: var(--text-muted);
  line-height: 1.55;
}

/* Кнопка "Показать ещё" */
.fact-show-more {
  display: block; width: 100%; margin-top: 10px;
  padding: 8px 14px;
  background: rgba(82,183,136,.08);
  border: 1px solid rgba(82,183,136,.2);
  border-radius: 8px;
  color: var(--green-light);
  font-size: .82rem; font-weight: 600; cursor: pointer;
  text-align: center;
  transition: background .2s, border-color .2s;
  font-family: inherit;
}
.fact-show-more:hover {
  background: rgba(82,183,136,.15);
  border-color: rgba(82,183,136,.35);
}

/* Modal info section */
.modal-info-section { margin: 16px 0; padding: 14px; background: rgba(255,255,255,.02); border-radius: 12px; border: 1px solid rgba(255,255,255,.06); }
.modal-info-section h3 { font-size: .9rem; margin-bottom: 10px; color: var(--gold); }
.modal-info-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.modal-info-table td { padding: 6px 4px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: top; }
.modal-info-table td:first-child { color: var(--text-muted); white-space: nowrap; padding-right: 12px; width: 1%; }
.modal-info-table td:last-child { color: var(--text); }
.modal-tips { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.modal-tips strong { display: block; margin-bottom: 6px; font-size: .84rem; color: var(--gold-light); }
.modal-tips ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.modal-tips li {
  font-size: .82rem; color: var(--text-muted); padding: 4px 8px 4px 20px;
  position: relative; line-height: 1.4;
}
.modal-tips li::before { content: '✨'; position: absolute; left: 0; top: 4px; font-size: .7rem; }

/* Modal links */
.modal-routes { margin: 16px 0; }
.modal-routes strong { display: block; margin-bottom: 8px; color: var(--green-light); font-size: .9rem; }
.modal-routes-list { display: flex; flex-direction: column; gap: 6px; }
.modal-route-link {
  display: block; padding: 8px 12px; border-radius: 10px;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.06);
  color: var(--text); text-decoration: none; font-size: .85rem;
  transition: background .2s, border-color .2s;
}
.modal-route-link:hover { background: rgba(82,183,136,.1); border-color: var(--green-light); }
/* Route card place links */
.route-places-links {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0;
}
.route-place-link {
  font-size: .72rem; color: var(--text-muted); text-decoration: none;
  padding: 2px 8px; border-radius: 8px;
  background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.06);
  transition: all .2s;
}
.route-place-link:hover { color: var(--gold); border-color: var(--gold); }
/* Route modal places */

/* Map */
#mapContainer { height: 500px; width: 100%; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,.06); background: #1a2e27; }
#mapContainer .leaflet-control-zoom a {
  background: rgba(15,26,20,.9); color: var(--text);
  border: 1px solid rgba(255,255,255,.1); border-radius: 6px;
}
#mapContainer .leaflet-control-zoom a:hover { background: rgba(45,106,79,.8); }
#mapContainer .leaflet-control-attribution {
  background: rgba(15,26,20,.8); color: var(--text-muted);
  border-radius: 6px 0 0 0; font-size: .7rem;
}
#mapContainer .leaflet-control-attribution a { color: var(--green-light); }
.map-marker {
  background: rgba(45,106,79,.85);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(82,183,136,.4);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  cursor: pointer;
  transition: all .2s;
}
.map-marker:hover {
  background: var(--green-light);
  border-color: var(--green-light);
  transform: scale(1.05);
}
.map-user-dot {
  width: 16px; height: 16px;
  background: #4285f4;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #4285f4, 0 2px 8px rgba(0,0,0,.4);
  animation: userPulse 2s ease-in-out infinite;
}
@keyframes userPulse {
  0%, 100% { box-shadow: 0 0 0 2px #4285f4, 0 2px 8px rgba(0,0,0,.4); }
  50% { box-shadow: 0 0 0 8px rgba(66,133,244,.2), 0 2px 8px rgba(0,0,0,.4); }
}
.place-card-dist {
  font-size: .75rem;
  color: var(--gold);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
#mapSearchBar { margin-bottom: 12px; }
#locateMeBtn {
  display: inline-block; margin-top: 12px; padding: 10px 20px;
  background: var(--primary, #2d6a4f); color: #fff; border: none;
  border-radius: 8px; cursor: pointer; font-size: 0.95rem;
  transition: background .2s;
}
#locateMeBtn:hover { background: var(--green-light, #52b788); }
#locateMeBtn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Pulsing user location marker */
@keyframes userPulse {
  0%, 100% { r: 10; opacity: 0.7; }
  50% { r: 18; opacity: 0.3; }
}

/* Routes */
.routes-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

@keyframes hubFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.airport-flight-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px; align-items: center;
  padding: 8px 12px; border-radius: 10px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.04);
  font-size: .82rem;
  transition: background .2s;
}
.airport-flight-row:hover { background: rgba(82,183,136,.08); }
@media (max-width: 600px) {
  .airport-flight-row {
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px; font-size: .78rem;
  }
  .af-freq { grid-column: 1 / -1; }
}

.filter-chip {
  padding: 5px 14px; border-radius: 50px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text-muted); cursor: pointer;
  font-size: .78rem; font-weight: 500; font-family: inherit;
  transition: all .25s; white-space: nowrap;
}
.filter-chip:hover {
  background: rgba(255,255,255,.12);
  color: var(--text);
}
.filter-chip.active {
  background: rgba(82,183,136,.2);
  border-color: var(--green-light);
  color: var(--green-light);
}
.route-road-badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: .7rem; font-weight: 600; letter-spacing: .3px;
}

/* Route map */

/* Photo modal — gallery inside place card */
.modal-gallery { margin: 16px 0; position: relative; }
.modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.modal.active { opacity: 1; visibility: visible; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.modal-content {
  position: relative; max-width: 600px; width: 90%;
  max-height: 85vh; overflow-y: auto;
  background: rgba(0,0,0,.8); border-radius: var(--radius);
  padding: 40px; border: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transform: scale(.9); transition: transform .3s;
}
.modal.active .modal-content { transform: scale(1); }
.modal-close {
  position: sticky; top: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto; margin-right: -14px; margin-top: -14px;
  z-index: 100;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: var(--text); font-size: 1.05rem; cursor: pointer; padding: 0;
  transition: background .2s, transform .2s;
}
.modal-close:hover { color: var(--text); }
.modal-body h2 { font-size: 1.5rem; margin-bottom: 8px; }
.modal-body .modal-img {
  width: 100%; height: 240px; border-radius: 12px; margin: 16px 0;
  background-size: cover; background-position: center;
}
.modal-gallery-img .photo-nav { opacity: 1; }
.modal-gallery-counter {
  position: absolute; bottom: 12px; right: 12px;
  background: rgba(0,0,0,.5); color: #fff; padding: 4px 12px;
  border-radius: 16px; font-size: .8rem; z-index: 2;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.modal-gallery-caption {
  text-align: center; color: var(--text-muted);
  font-size: .82rem; margin-top: 8px; font-weight: 500;
  transition: opacity .3s;
}
.modal-gallery-dots {
  display: flex; gap: 8px; justify-content: center; margin-top: 10px;
}
.modal-gallery-dots .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.25); transition: background .3s, transform .3s;
  cursor: pointer;
}
.modal-gallery-dots .dot:hover { background: rgba(255,255,255,.5); transform: scale(1.2); }
.modal-gallery-dots .dot.active {
  background: var(--green-light); transform: scale(1.3);
  box-shadow: 0 0 8px rgba(82,183,136,.4);
}
.modal-body p { color: var(--text-muted); line-height: 1.7; }

#placesHeader {
  font-size: 1.05rem;
  text-align: center;
}
#placesHeader .places-hdr-title {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
#placesHeader .places-hdr-desc {
  display: block;
  font-size: .92rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font-main);
  line-height: 1.5;
}

.modal-content--wide { max-width: 800px; max-height: 90vh; overflow-y: auto; }
.rstep {
  background: rgba(0,0,0,.35); border-radius: 12px; padding: 16px;
  margin-bottom: 12px; border: 1px solid rgba(255,255,255,.04);
}
.rstep p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

.nearby-item { display: flex; align-items: center; gap: 6px; }

/* Sidebar */
#sidebar {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  z-index: 998; display: flex; flex-direction: column; gap: 4px;
  padding: 12px 8px;
  background: rgba(0,0,0,.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 0 16px 16px 0;
  border: 1px solid rgba(255,255,255,.06);
  border-left: none;
  transition: transform .3s ease, opacity .3s ease;
}
#sidebar.hidden {
  transform: translateY(-50%) translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.sidebar-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 8px; border: none; border-radius: 12px;
  background: transparent; color: var(--text-muted);
  cursor: pointer; transition: all .25s; font-family: inherit;
  min-width: 64px;
}
.sidebar-btn:hover { background: rgba(255,255,255,.08); color: var(--text); }
.sidebar-btn.active {
  background: rgba(82,183,136,.18);
  color: var(--green-light);
  box-shadow: inset 0 0 0 1px rgba(82,183,136,.25);
}
.sidebar-icon { font-size: 1.3rem; line-height: 1; }
.sidebar-label { font-size: .68rem; font-weight: 600; white-space: nowrap; }
.sidebar-badge {
  font-size: .58rem; color: var(--text-muted);
  background: rgba(255,255,255,.06);
  padding: 1px 6px; border-radius: 6px;
  margin-top: 1px;
}
.sidebar-btn.active .sidebar-badge { color: var(--green-light); }
.sidebar-line {
  width: 28px; height: 1px; margin: 4px auto;
  background: rgba(255,255,255,.1);
}
#sidebar-toggle {
  position: fixed; left: 0; top: 50%; z-index: 999;
  transform: translateY(-50%);
  width: 32px; height: 48px; border: none;
  background: rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text-muted); font-size: .9rem;
  cursor: pointer; border-radius: 0 10px 10px 0;
  transition: all .3s; display: none;
  border: 1px solid rgba(255,255,255,.06);
  border-left: none;
}
#sidebar-toggle:hover { color: var(--text); background: rgba(0,0,0,.6); }
#sidebar-toggle.open { left: 80px; }
@media (max-width: 768px) {
  #sidebar { transform: translateY(-50%) translateX(-100%); opacity: 0; pointer-events: none; }
  #sidebar.open { transform: translateY(-50%) translateX(0); opacity: 1; pointer-events: auto; }
  #sidebar-toggle { display: flex; align-items: center; justify-content: center; }
}

/* Scroll to top */
#scroll-top {
  position: fixed; bottom: 32px; right: 24px; z-index: 999;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--green); color: #fff; border: 2px solid var(--green-light);
  font-size: 1.4rem; cursor: pointer;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: all .3s; box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
#scroll-top.visible { opacity: 1; visibility: visible; pointer-events: auto; }
#scroll-top:hover {
  background: var(--green-light); transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(82,183,136,.3);
}

/* Community */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.community-card {
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius); padding: 32px 24px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .4s;
}
.community-card:hover { transform: translateY(-4px); }
.community-card--share { cursor: pointer; }
.community-card--share:hover { border-color: var(--green-light); box-shadow: 0 0 0 1px var(--green-light), var(--shadow); }
.community-icon { font-size: 2.5rem; margin-bottom: 12px; }
.community-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.community-card p { color: var(--text-muted); font-size: .9rem; line-height: 1.6; }

/* Submit modal */
.submit-hint { color: var(--text-muted); font-size: .85rem; margin-bottom: 16px; }
.submit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.submit-field--full { grid-column: 1 / -1; }
.submit-field label { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
.submit-field input,
.submit-field select {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: var(--text); font-size: .85rem; font-family: inherit; outline: none;
  transition: border-color .2s;
}
.submit-field input:focus,
.submit-field select:focus,
.submit-field textarea:focus { border-color: var(--green-light); }
.submit-field textarea { resize: vertical; min-height: 70px; }
.submit-field select option { background: #1a3c34; }
.submit-actions { margin-top: 20px; text-align: center; }
.submit-actions .btn { min-width: 200px; }
@media (max-width: 600px) { .submit-grid { grid-template-columns: 1fr; } }

@media (max-width: 768px) {
  .location-info { min-height: 280px; }
  .location-info-content { padding: 24px; }
  .location-info-header h3 { font-size: 1.5rem; }
  .location-info-stats { gap: 16px; }
  .loc-stat-value { font-size: 1.2rem; }
  .location-info-long { font-size: .85rem; }
  .location-info-long { font-size: .85rem; }
}

/* Footer */
footer {
  text-align: center; padding: 48px 24px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.4);
}
.footer-small { color: var(--text-muted); font-size: .8rem; margin-top: 4px; }
.footer-logo { display: inline-block; margin-bottom: 8px; }
.footer-logo img { height: 48px; width: auto; opacity: .7; transition: opacity .3s; }
.footer-logo:hover img { opacity: 1; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(15,26,20,.95); padding: 20px; gap: 16px; }
  .nav-links.open { display: flex; }
  #menu-toggle { display: block; }
  section { padding: 60px 16px; }
  .places-grid, .routes-container { grid-template-columns: 1fr; }
  .place-card { min-height: 400px; }
  .place-card-body { padding: 20px; }
  .place-card-body h3 { font-size: 1.25rem; }
  #mapContainer { height: 350px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .airport-hub { min-height: 240px; }
  .airport-hub-content { padding: 24px; }
  .airport-hub-content h3 { font-size: 1.3rem; }
  .airport-hub-meta span { width: 100%; }
  .location-info-content { padding: 20px; }
  .location-info-header h3 { font-size: 1.3rem; }
  .location-info-stats { gap: 12px; padding: 12px 0; }
  .loc-stat-value { font-size: 1.1rem; }
  .location-info-highlights { gap: 6px; }
  .loc-highlight { font-size: .75rem; padding: 4px 10px; }
  .location-info-long { font-size: .82rem; }
  .route-card { min-height: 300px; }
  .route-filters { flex-direction: column; align-items: stretch; gap: 10px; }
  .route-filters-count { margin-left: 0; text-align: right; }
  .route-card-footer { flex-wrap: wrap; gap: 6px; }
}

.route-photo-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.45); color: #fff; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; opacity: 0; transition: opacity .3s, background .3s; z-index: 3; display: flex; align-items: center; justify-content: center; line-height: 1; }
.route-photo-nav:hover { background: rgba(0,0,0,.7); }
.route-photo-nav--prev { left: 8px; }
.route-photo-nav--next { right: 8px; }
.route-photo-dots { position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.route-photo-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); transition: background .3s, transform .3s; cursor: pointer; }
.route-photo-dots .dot.active { background: #fff; transform: scale(1.3); }

/* ===== Enhanced Route Modal ===== */

/* Variant tabs */

/* Responsive rstep */
@media (max-width: 640px) {
  .rstep--enhanced { flex-direction: column; }
  .rstep--enhanced .rstep-img { width: 100%; min-height: 160px; }
  .rmodal-hero { height: 180px; margin: -20px -20px 0; }
  .rmodal-hero-content { padding: 20px; }
  .rmodal-hero-content h2 { font-size: 1.4rem; }
  .rmodal-info-grid { grid-template-columns: 1fr; }
}

/* ===== User Menu ===== */
.user-menu {
  display: flex; align-items: center; gap: 8px; margin-left: 12px;
  position: relative;
}
.user-menu-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid rgba(255,255,255,.15);
  color: var(--text); padding: 6px 12px; border-radius: 20px;
  cursor: pointer; font-size: .85rem; font-family: inherit;
  transition: all .2s;
}
.user-menu-btn:hover { border-color: var(--green-light); }
.user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--green); display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}
.auth-btn {
  background: var(--green); border: none; color: #fff;
  padding: 8px 16px; border-radius: 20px; cursor: pointer;
  font-size: .85rem; font-family: inherit; font-weight: 600;
  transition: all .2s;
}
.auth-btn:hover { background: var(--green-light); }
.user-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 8px;
  background: var(--bg); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 6px 0; min-width: 180px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4); z-index: 100;
}
.user-dropdown a {
  display: block; padding: 10px 16px; color: var(--text);
  text-decoration: none; font-size: .85rem; transition: background .15s;
}
.user-dropdown a:hover { background: rgba(255,255,255,.06); }

/* ===== Auth Modal ===== */
.auth-modal {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.7); z-index: 2000;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.auth-modal-content {
  background: var(--bg); border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 32px; width: 100%; max-width: 400px;
  position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.auth-modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.auth-modal-close:hover { color: var(--text); }
.auth-modal-content h2 {
  font-size: 1.4rem; margin-bottom: 20px; text-align: center;
}
.auth-modal-content input {
  width: 100%; padding: 12px 16px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; color: var(--text); font-size: .9rem;
  font-family: inherit; outline: none; transition: border-color .2s;
}
.auth-modal-content input:focus { border-color: var(--green-light); }
.auth-submit-btn {
  width: 100%; padding: 12px; margin-top: 4px;
  background: var(--green); border: none; color: #fff;
  border-radius: 10px; font-size: .95rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background .2s;
}
.auth-submit-btn:hover { background: var(--green-light); }
.auth-switch {
  text-align: center; margin-top: 16px; font-size: .85rem;
  color: var(--text-muted);
}
.auth-switch a { color: var(--green-light); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-error {
  margin-top: 12px; padding: 10px 14px; border-radius: 8px;
  background: rgba(220,53,69,.15); color: #f87171;
  font-size: .85rem; text-align: center;
}

/* ===== Cabinet ===== */
.cabinet-content {
  max-width: 500px; max-height: 80vh; overflow-y: auto;
}
.cabinet-info {
  text-align: center; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 20px;
}
.cabinet-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green); display: flex; align-items: center;
  justify-content: center; font-size: 2rem; margin: 0 auto 12px;
}
.cabinet-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.cabinet-email { font-size: .85rem; color: var(--text-muted); margin-bottom: 4px; }
.cabinet-role {
  display: inline-block; padding: 3px 12px; border-radius: 12px;
  background: rgba(82,183,136,.15); color: var(--green-light);
  font-size: .75rem; font-weight: 600; margin-top: 6px;
}
.cabinet-since { font-size: .75rem; color: var(--text-muted); margin-top: 8px; }
.cabinet-content h3 {
  font-size: 1rem; margin-bottom: 12px;
}
.cabinet-favorites { min-height: 40px; }
.cabinet-empty {
  color: var(--text-muted); font-size: .85rem; text-align: center;
  padding: 20px 0;
}
.cabinet-fav-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.cabinet-fav-card {
  background: var(--surface); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 12px;
}
.cabinet-fav-card h4 { font-size: .9rem; margin-bottom: 4px; }
.cabinet-fav-card p { font-size: .75rem; color: var(--text-muted); }

@media (max-width: 640px) {
  .user-menu { margin-left: 8px; }
  .auth-modal-content { margin: 16px; padding: 24px; }
  .cabinet-fav-grid { grid-template-columns: 1fr; }
}

/* Scroll animations */
.fade-in-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease, box-shadow .4s;
}
.fade-in-up.visible {
  opacity: 1; transform: translateY(0);
}
.fade-in-up.visible:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.fade-in-up:nth-child(2) { transition-delay: .08s; }
.fade-in-up:nth-child(3) { transition-delay: .16s; }
.fade-in-up:nth-child(4) { transition-delay: .24s; }
.fade-in-up:nth-child(5) { transition-delay: .32s; }
.fade-in-up:nth-child(6) { transition-delay: .4s; }

/* Nearby */
.nearby-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-light); color: var(--bg);
  border: none; padding: 9px 18px; border-radius: 10px;
  cursor: pointer; font-weight: 600; font-size: .85rem;
  transition: background .2s, transform .15s, opacity .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nearby-btn:hover { background: #5ecf97; transform: scale(1.03); }
.nearby-btn:active { transform: scale(.96); }
.nearby-btn:disabled { opacity: .6; cursor: default; transform: none; }
.nearby-btn .nearby-pulse {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; background: var(--bg);
  animation: nearbyPulse 1s ease-in-out infinite;
}
@keyframes nearbyPulse {
  0%,100% { opacity: .4; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.2); }
}
.nearby-btn .nearby-icon { font-size: 1.05rem; line-height: 1; }

#nearbySection {
  margin-top: 24px;
  animation: nearbyFadeIn .35s ease-out;
}
@keyframes nearbyFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
#nearbySection h3 {
  margin-bottom: 12px; font-size: 1rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
#nearbySection h3 .nearby-location {
  font-size: .8rem; font-weight: 400;
  color: var(--text-muted);
}
.nearby-hide-btn {
  margin-top: 12px; background: none;
  border: 1px solid var(--green-light); color: var(--green-light);
  padding: 8px 20px; border-radius: 8px; cursor: pointer;
  font-size: .82rem; transition: background .2s;
}
.nearby-hide-btn:hover { background: rgba(82,183,136,.1); }

.nearby-item-dist {
  display: inline-block; margin-top: 4px;
  color: var(--green-light); font-size: .82rem;
  background: rgba(82,183,136,.1); padding: 2px 10px;
  border-radius: 20px;
}
.nearby-item-route {
  display: inline-block; margin-top: 6px;
  color: var(--gold); font-size: .78rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
  transition: color .2s;
}
.nearby-item-route:hover { color: var(--gold-light); }

.nearby-error {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; background: rgba(212,163,115,.08);
  border-radius: 12px; border: 1px solid rgba(212,163,115,.2);
  color: var(--gold); font-size: .85rem;
}

/* Search bar — adjacent */
.search-bar {
  position: relative; max-width: 400px; margin: 0 auto 20px;
  display: flex; gap: 8px;
}
.search-bar .search-bar-wrap {
  position: relative; flex: 1;
}
.search-bar input {
  width: 100%; padding: 12px 16px 12px 42px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; color: var(--text); font-size: .9rem;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(82,183,136,.15);
}
.search-bar-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .9rem; pointer-events: none;
}
.search-bar-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: var(--text-muted);
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  font-size: .7rem; display: none; align-items: center; justify-content: center;
  transition: background .2s;
}
.search-bar-clear:hover { background: rgba(255,255,255,.2); }
.search-bar-clear.show { display: flex; }

/* Share */

.share-btn {
  background: linear-gradient(135deg, rgba(82,183,136,.12) 0%, rgba(212,163,115,.08) 100%);
  border: 1px solid rgba(82,183,136,.2); color: var(--green-light);
  padding: 7px 16px; border-radius: 10px; font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: all .25s;
  display: inline-flex; align-items: center; gap: 6px;
}
.share-btn:hover {
  background: linear-gradient(135deg, rgba(82,183,136,.22) 0%, rgba(212,163,115,.15) 100%);
  border-color: rgba(82,183,136,.4); color: #fff;
  box-shadow: 0 4px 16px rgba(82,183,136,.15);
  transform: translateY(-1px);
}
.share-panel {
  display: none; margin-top: 12px;
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 16px;
  backdrop-filter: blur(12px);
  animation: shareSlideIn .25s ease;
}
.share-panel.open { display: block; }
@keyframes shareSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.share-panel-title {
  font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: 12px;
}
.share-link-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 12px;
}
.share-link-input {
  flex: 1; padding: 8px 12px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); border-radius: 8px;
  color: var(--text); font-size: .78rem; font-family: monospace;
  outline: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.share-copy-btn {
  padding: 8px 14px; border-radius: 8px; border: none;
  background: var(--green-light); color: #fff; font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .2s; white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}
.share-copy-btn:hover { background: #45a076; }
.share-copy-btn.copied {
  background: var(--gold); color: #000;
}
.share-native-btn {
  width: 100%; padding: 10px; border-radius: 10px; border: none;
  background: rgba(82,183,136,.15); color: var(--green-light);
  font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.share-native-btn:hover {
  background: rgba(82,183,136,.25);
}
.share-social-row {
  display: flex; gap: 8px; margin-top: 10px;
}
.share-social-btn {
  flex: 1; padding: 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04); color: var(--text-muted);
  font-size: .75rem; cursor: pointer; text-decoration: none;
  text-align: center; transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.share-social-btn:hover {
  background: rgba(255,255,255,.08); color: var(--text);
  border-color: rgba(255,255,255,.15);
}
.share-social-icon { font-size: 1.2rem; }

/* PWA install banner */
.pwa-install-banner {
  position: fixed; bottom: 20px; right: 20px; z-index: 999;
  background: rgba(13,31,26,.95); border: 1px solid var(--green-light);
  border-radius: 12px; padding: 14px 20px;
  display: none; align-items: center; gap: 12px;
  backdrop-filter: blur(10px); box-shadow: 0 8px 32px rgba(0,0,0,.5);
  max-width: 320px;
}
.pwa-install-banner.show { display: flex; }
.pwa-install-banner p { font-size: .82rem; flex: 1; margin: 0; }
.pwa-install-banner button {
  background: var(--green-light); color: #fff; border: none;
  padding: 8px 16px; border-radius: 8px; font-size: .8rem; cursor: pointer;
  font-weight: 600; white-space: nowrap;
}
.pwa-install-banner .pwa-dismiss {
  background: none; color: var(--text-muted); padding: 4px 8px;
  font-size: .7rem;
}

/* Touch devices */
@media (pointer: coarse) {
  .photo-nav { width: 44px; height: 44px; font-size: 1.5rem; }
  .share-btn { padding: 10px 18px; font-size: .85rem; }
  .share-copy-btn { padding: 10px 16px; }
  .share-social-btn { padding: 12px; min-height: 44px; }
  .share-native-btn { padding: 14px; }
  .place-card-mini-map { min-height: 80px; }
  .admin-toggle { width: 48px; height: 26px; }
  .filter-chip { min-height: 36px; padding: 6px 14px; }
  .sidebar-btn { min-height: 48px; }
  .region-tab { min-height: 40px; }
  a, button { min-height: 44px; }
}

/* Nearby places section */
#nearbySection {
  animation: fadeInUp .4s ease;
}
#nearbySection h3 {
  font-size: 1.2rem; color: var(--green-light);
}
#nearbyBtn {
  transition: opacity .2s, transform .2s;
}
#nearbyBtn:hover {
  opacity: .85;
  transform: translateY(-1px);
}
#nearbyBtn:disabled {
  opacity: .6;
  cursor: wait;
}

.modal-map-link {
  font-size: .75rem;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(82,183,136,.1);
  border: 1px solid rgba(82,183,136,.2);
  color: var(--green-light);
  text-decoration: none;
  transition: background .3s;
  white-space: nowrap;
}
.modal-map-link:hover {
  background: rgba(82,183,136,.2);
}
/* Modal gallery image fix */
.modal-gallery-img {
  width: 100%;
  height: 400px;
  max-height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--green-dark);
  border-radius: 12px;
  position: relative;
}

/* Mobile modal fix — narrow screens */
@media (max-width: 600px) {
  .modal-content {
    width: 96%;
    padding: 20px;
    max-height: 90vh;
  }
  .modal-body h2 { font-size: 1.25rem; }
  .modal-body .modal-img { height: 180px; }
  .modal-gallery {
    margin: 12px 0;
  }
  .modal-gallery-img {
    height: 220px;
    max-height: 220px;
    background-size: cover;
    background-position: center;
  }
  .modal-body p { font-size: .88rem; }
  .modal-facts { margin: 14px 0; }
  .modal-facts-heading { font-size: .82rem; }
  .fact-card { padding: 8px 10px; }
  .fact-card-title { font-size: .8rem; }
  .fact-card-text { font-size: .78rem; }
  .modal-mini-map { height: 150px; }
  .modal-routes { margin: 10px 0; }
  .modal-actions, .rmodal-actions {
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
  }
}

/* Splash */
#splash {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: #0a0f0d;
  color: #e8f0ec;
  font-family: 'Inter', sans-serif;
  transition: opacity .6s ease, transform .6s ease;
  overflow: hidden;
}
#splash.splash-hide {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.splash-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(45,106,79,.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 60%, rgba(82,183,136,.08) 0%, transparent 50%),
              linear-gradient(135deg, #0a0f0d 0%, #141f1a 50%, #0a0f0d 100%);
  pointer-events: none;
}
.splash-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(82,183,136,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82,183,136,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.splash-particles {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.splash-particles::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(82,183,136,.12) 0%, transparent 70%);
  top: 20%; left: 15%;
  animation: splashFloat 20s ease-in-out infinite;
}
.splash-particles::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(45,106,79,.1) 0%, transparent 70%);
  bottom: 15%; right: 20%;
  animation: splashFloat 25s ease-in-out infinite reverse;
}

@keyframes splashFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.1); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.splash-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 500px;
  padding: 40px 32px;
}

.splash-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(82,183,136,.12);
  border: 1px solid rgba(82,183,136,.25);
  color: var(--green-light, #52b788);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 20px;
}

.splash-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e8f0ec;
  margin: 0 0 8px;
  line-height: 1.3;
}
.splash-sub {
  font-size: .95rem;
  color: rgba(232,240,236,.6);
  margin: 0 0 28px;
  line-height: 1.5;
}

.splash-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  background: var(--green-light, #52b788);
  border: none;
  color: #0a0f0d;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .3s;
}
.splash-btn:hover {
  background: #62d69a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(82,183,136,.3);
}

.splash-footnote {
  margin-top: 20px;
  font-size: .78rem;
  color: rgba(232,240,236,.35);
  line-height: 1.4;
}

/* Loader */
.splash-loader {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 480px;
  padding: 40px 32px;
}
.splash-loader-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #e8f0ec;
  margin: 0 0 4px;
}
.splash-loader-sub {
  font-size: .88rem;
  color: rgba(232,240,236,.5);
  margin: 0 0 24px;
}

.splash-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.splash-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.splash-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green-light, #52b788), #62d69a);
  transition: width .4s ease;
}
.splash-progress-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--green-light, #52b788);
  min-width: 36px;
  text-align: right;
}

.splash-log {
  text-align: left;
  font-size: .82rem;
  color: rgba(232,240,236,.5);
  font-family: 'JetBrains Mono', monospace;
  line-height: 2;
}
.splash-log-line.pending {
  color: var(--green-light, #52b788);
}
.splash-log-line.ok {
  color: rgba(232,240,236,.3);
}

@media (max-width: 600px) {
  .splash-title { font-size: 1.3rem; }
  .splash-btn { width: 100%; justify-content: center; }
  .splash-content { padding: 24px 20px; }
  .splash-loader { padding: 24px 20px; }
  .splash-bg {
    background: radial-gradient(ellipse at 30% 40%, rgba(45,106,79,.15) 0%, transparent 60%),
                #0a0f0d;
  }
}

#map-section {
  padding: 80px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
}
#mapContainer .leaflet-container {
  font-family: 'Inter', sans-serif;
}
#mapContainer .leaflet-popup-content-wrapper {
  background: #1a2e27;
  color: var(--text);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 24px rgba(0,0,0,.6);
}
#mapContainer .leaflet-popup-tip {
  background: #1a2e27;
  border: 1px solid rgba(255,255,255,.08);
}
#mapContainer .leaflet-popup-content {
  margin: 10px 14px;
  min-width: 180px;
}
#mapContainer .leaflet-popup-content h3 {
  font-size: .95rem;
  margin: 0 0 4px;
  color: var(--green-light);
}
#mapContainer .leaflet-popup-content p {
  color: var(--text-muted);
  font-size: .8rem;
  margin: 0;
}
.map-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.map-search {
  flex: 1;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .3s, box-shadow .3s;
}
.map-search:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 2px rgba(82,183,136,.15);
}
.map-search::placeholder { color: var(--text-muted); }
.btn-locate {
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(82,183,136,.15);
  border: 1px solid var(--green-light);
  color: var(--green-light);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  transition: all .3s;
  white-space: nowrap;
}
.btn-locate:hover {
  background: rgba(82,183,136,.25);
  box-shadow: 0 0 16px rgba(82,183,136,.2);
}
/* User location marker */
.user-location-marker {
  width: 20px;
  height: 20px;
  background: #4fc3f7;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(79,195,247,.3);
  animation: userPulse 2s ease-in-out infinite;
}
@keyframes userPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(79,195,247,.3); }
  50% { box-shadow: 0 0 0 10px rgba(79,195,247,.1); }
}
@media (max-width: 600px) {
  #mapContainer { height: 380px; }
}

/* ===== Tent (Auth Modal) ===== */
.tent {
  position: relative;
  background: linear-gradient(180deg, #0f2419 0%, #0d1f1a 100%);
  border-radius: 20px;
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(82,183,136,.12);
  overflow: hidden;
}
.tent-body {
  position: relative;
  z-index: 2;
}
.tent-flag {
  position: absolute;
  top: -8px;
  font-size: 1.8rem;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
  animation: tentFlagWave 4s ease-in-out infinite;
}
.tent-flag--left { left: 24px; }
.tent-flag--right { right: 24px; animation-delay: -2s; }
@keyframes tentFlagWave {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}
.tent-stars {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.tent-star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: tentStarTwinkle 3s ease-in-out infinite;
}
@keyframes tentStarTwinkle {
  0%, 100% { opacity: 0; }
  50% { opacity: .8; }
}
.tent-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid rgba(255,255,255,.08);
}
.tent-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  margin-bottom: -2px;
}
.tent-tab.active {
  color: var(--green-light);
  border-bottom-color: var(--green-light);
}
.tent-tab:hover:not(.active) {
  color: var(--text);
}
.tent-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  z-index: 3;
  transition: color .2s;
}
.tent-close:hover { color: var(--text); }
.tent-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tent-form.active { display: flex; }
.tent-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tent-field label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .3px;
}
.tent-field input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s;
}
.tent-field input:focus {
  border-color: var(--green-light);
  background: rgba(82,183,136,.05);
}
.tent-field input::placeholder { color: rgba(155,179,168,.5); }
.tent-error {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(220,53,69,.15);
  color: #f87171;
  font-size: .82rem;
  text-align: center;
}
.tent-submit {
  width: 100%;
  padding: 13px;
  background: var(--green);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.tent-submit:hover { background: var(--green-light); }
.tent-submit:active { transform: scale(.98); }

/* Password field with toggle */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s;
}
.password-wrap input:focus {
  border-color: var(--green-light);
  background: rgba(82,183,136,.05);
}
.password-wrap input::placeholder { color: rgba(155,179,168,.5); }
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  opacity: .6;
  transition: opacity .2s;
}
.password-toggle:hover { opacity: 1; }
.password-match-hint {
  font-size: .8rem;
  margin-top: 4px;
}

/* Notification badge */
.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--gold);
  color: #1a1a1a;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
  margin-left: 6px;
}

/* Footer inner */
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Submit form progress */
.submit-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.submit-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.submit-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green-light), var(--gold));
  transition: width .3s ease;
}
.submit-progress-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-light);
  min-width: 36px;
  text-align: right;
}

/* Submit form photo previews */
.sub-photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.sub-photo-previews img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
}

/* Submit form place-only fields */
.sub-place-field {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.sub-place-field .submit-field {
  flex: 1;
  min-width: 120px;
}

/* ===== Admin Panel ===== */
.admin-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: #1a2620;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  display: flex;
}
.admin-sidebar {
  width: 220px;
  min-width: 220px;
  background: #152521;
  border-right: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.admin-sidebar-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.admin-sidebar-tabs {
  padding: 12px;
  flex: 1;
  overflow-y: auto;
}
.admin-overlay.hidden { display: none; }

/* Login / Setup */
.admin-login {
  max-width: 400px; margin: 80px auto;
  background: #243530;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 40px 32px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow);
}
.admin-login h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; text-align: center; margin-bottom: 8px;
}
.admin-login-setup { max-width: 420px; }
.admin-login-setup p { font-size: .85rem; color: var(--text-muted); }
.admin-login-error {
  display: none; padding: 10px 14px; border-radius: 8px;
  background: rgba(212,115,115,.15); color: #d47373; font-size: .82rem; text-align: center;
}
.admin-login-hint { font-size: .75rem; color: var(--text-muted); text-align: center; margin-top: 4px; }
.admin-pw-wrap { position: relative; }
.admin-pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: .9rem; color: var(--text-muted); padding: 4px;
}
.admin-pw-toggle:hover { color: var(--text); }

/* Header */
.admin-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px;
  background: #1f2e28;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.admin-header-actions { display: flex; align-items: center; gap: 8px; }
.admin-version-badge {
  font-size: .65rem; padding: 2px 8px; border-radius: 10px;
  background: rgba(82,183,136,.12); color: var(--green-light);
  border: 1px solid rgba(82,183,136,.2);
  font-family: 'Inter', sans-serif; font-weight: 600;
}

/* Body layout */
.admin-body {
  display: flex; min-height: calc(100vh - 56px);
}

/* Tabs sidebar */
.admin-tabs {
  flex-shrink: 0; width: 220px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 12px;
  border-right: 1px solid rgba(255,255,255,.1);
  background: #1f2e28;
  overflow-y: auto; max-height: calc(100vh - 56px);
  position: sticky; top: 56px;
}
.admin-tab-group { margin-bottom: 12px; }
.admin-tab-group-label {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted);
  padding: 6px 10px 4px;
}
.admin-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 8px;
  background: none; border: none;
  color: var(--text-muted); font-size: .82rem; font-weight: 500;
  cursor: pointer; transition: all .2s;
  font-family: 'Inter', sans-serif; text-align: left; width: 100%;
}
.admin-tab:hover { background: rgba(255,255,255,.08); color: var(--text); }
.admin-tab.active {
  background: rgba(82,183,136,.15); color: var(--green-light);
  font-weight: 600;
}
.admin-tab-hint { font-size: .68rem; color: var(--text-muted); margin-top: 2px; }

/* Content area */
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-content { flex: 1; padding: 24px; overflow-y: auto; max-width: 1100px; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.admin-section h2 { font-size: 1.2rem; margin-bottom: 12px; }
.admin-section-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }

/* Buttons */
.admin-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: #2a3d35;
  color: var(--text); font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  font-family: 'Inter', sans-serif; white-space: nowrap;
}
.admin-btn:hover { background: #345046; border-color: rgba(255,255,255,.25); }
.admin-btn-primary {
  background: var(--green); border-color: var(--green); color: #fff;
}
.admin-btn-primary:hover { background: var(--green-light); }
.admin-btn-ghost { background: transparent; border-color: rgba(255,255,255,.2); }
.admin-btn-ghost:hover { background: rgba(255,255,255,.08); }
.admin-btn-danger {
  background: #3b1a1a; border-color: rgba(220,38,38,.4); color: #f87171;
}
.admin-btn-danger:hover { background: rgba(220,38,38,.35); }
.admin-btn-sm { padding: 4px 10px; font-size: .75rem; }
.admin-btn-xs { padding: 2px 8px; font-size: .68rem; }
.admin-btn-add {
  background: rgba(82,183,136,.1); border: 1px dashed rgba(82,183,136,.3);
  color: var(--green-light); width: 100%; justify-content: center;
}
.admin-btn-add:hover { background: rgba(82,183,136,.15); }

/* Inputs */
.admin-input {
  width: 100%; padding: 9px 12px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.15);
  background: #111c17; color: var(--text);
  font-size: .82rem; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color .2s;
}
.admin-input:focus { border-color: var(--green-light); background: #16221c; }
.admin-input::placeholder { color: var(--text-muted); }
.admin-textarea { resize: vertical; min-height: 60px; line-height: 1.5; }
.admin-select {
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.3); color: var(--text);
  font-size: .82rem; font-family: 'Inter', sans-serif; outline: none;
}
.admin-select option { background: var(--bg); }

/* Row / Item layout */
.admin-row { display: flex; gap: 8px; align-items: center; }
.admin-row-2 { display: flex; gap: 8px; }
.admin-row-3 { display: flex; gap: 8px; }
.admin-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.04);
  margin-bottom: 6px;
}
.admin-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.admin-item-info { flex: 1; min-width: 0; }
.admin-hint {
  font-size: .72rem; color: var(--text-muted);
  padding: 6px 10px; margin-bottom: 12px;
  background: rgba(255,255,255,.03); border-radius: 6px;
  line-height: 1.5;
}
.admin-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.admin-field > label { font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.admin-empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--text-muted); font-size: .85rem;
}

/* Stats */
.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.admin-stat {
  background: #243530; border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 16px; text-align: center;
}
.admin-stat-value { font-size: 1.6rem; font-weight: 700; color: var(--green-light); }
.admin-stat-label { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }

/* Badge */
.admin-badge {
  display: inline-block; font-size: .65rem; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
}
.admin-badge-online { background: rgba(82,183,136,.15); color: var(--green-light); }
.admin-badge-offline { background: rgba(255,255,255,.06); color: var(--text-muted); }
.admin-badge-altai { background: rgba(82,183,136,.15); color: var(--green-light); }
.admin-badge-mari-el { background: rgba(212,163,115,.15); color: var(--gold); }
.admin-badge-new { background: var(--green); color: #fff; font-size: .6rem; }

/* Dialog */
.admin-dialog-backdrop {
  position: fixed; inset: 0; z-index: 10002;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.admin-dialog {
  background: var(--bg); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); padding: 24px;
  max-width: 500px; width: 100%; box-shadow: var(--shadow);
}
.admin-dialog h3 { font-size: 1.05rem; margin-bottom: 8px; }
.admin-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* Photo grid */
.admin-photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px; margin-top: 12px;
}
.admin-photo-grid-item {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
}
.admin-photo-grid-item img { width: 100%; height: 100%; object-fit: cover; }
.admin-photo-grid-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 4px 6px; font-size: .6rem; color: rgba(255,255,255,.7);
  background: linear-gradient(transparent, rgba(0,0,0,.8));
}

/* BG item */
.admin-bg-item {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: 12px;
  background: #243530; border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 8px;
}
.admin-bg-preview {
  width: 100%; aspect-ratio: 16/9; border-radius: 8px;
  background-size: cover; background-position: center;
}
.admin-bg-name { font-size: .8rem; font-weight: 600; }
.admin-bg-info { font-size: .72rem; color: var(--text-muted); }
.admin-image-tip { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }

/* Region group */
.admin-region-group { margin-bottom: 8px; }
.admin-region-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(255,255,255,.03);
  cursor: pointer; transition: background .2s;
}
.admin-region-header:hover { background: rgba(255,255,255,.06); }
.admin-rg-arrow { font-size: .7rem; transition: transform .2s; color: var(--text-muted); }
.admin-region-group.collapsed .admin-rg-arrow { transform: rotate(-90deg); }
.admin-rg-title { font-size: .82rem; font-weight: 600; flex: 1; }
.admin-rg-count { font-size: .68rem; color: var(--text-muted); }
.admin-rg-body { padding: 8px 0 8px 20px; display: flex; flex-direction: column; gap: 4px; }

/* Route cards */
.admin-route-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.admin-route-card {
  background: #243530; border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; overflow: hidden; transition: transform .2s, border-color .2s;
}
.admin-route-card:hover { transform: translateY(-2px); border-color: rgba(82,183,136,.3); }
.admin-route-card-body { padding: 16px; }
.admin-route-card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.admin-route-card-actions { display: flex; gap: 4px; margin-top: 12px; }

/* Editor subtabs */
.admin-editor-subtabs {
  display: flex; gap: 4px; margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.admin-editor-subtab {
  padding: 6px 14px; border-radius: 8px 8px 0 0;
  background: none; border: none;
  color: var(--text-muted); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .2s; font-family: 'Inter', sans-serif;
  border-bottom: 2px solid transparent;
}
.admin-editor-subtab:hover { color: var(--text); background: rgba(255,255,255,.04); }
.admin-editor-subtab.active { color: var(--green-light); border-bottom-color: var(--green-light); }
.admin-step-item {
  padding: 10px 14px; border-radius: 8px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.04);
  margin-bottom: 6px;
}

/* Toggle switch */
.admin-toggle {
  position: relative; display: inline-block;
  width: 44px; height: 24px; flex-shrink: 0;
  border-radius: 24px; cursor: pointer;
  background: #3a3a3a; transition: background .3s;
}
.admin-toggle.on { background: var(--green); }
.admin-toggle::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.admin-toggle.on::after { transform: translateX(20px); }
.admin-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.admin-toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #3a3a3a; border-radius: 24px; transition: .3s;
}
.admin-toggle-slider::before {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.admin-toggle input:checked + .admin-toggle-slider { background: var(--green); }
.admin-toggle input:checked + .admin-toggle-slider::before { transform: translateX(20px); }

/* Save / Storage indicators */
.admin-save-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; color: var(--text-muted);
  transition: opacity .3s;
}
.admin-storage-indicator { font-size: .72rem; color: var(--text-muted); }

/* Backup bar */
.admin-backup-bar {
  display: flex; flex-direction: column; gap: 12px;
  padding: 20px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.04);
}
.admin-backup-progress {
  width: 100%; height: 8px; border-radius: 4px;
  background: rgba(255,255,255,.06); overflow: hidden;
}
.admin-backup-progress > div { height: 100%; background: var(--green-light); transition: width .3s; }
.admin-backup-status { font-size: .78rem; color: var(--text-muted); }

/* Responsive admin */
@media (max-width: 768px) {
  .admin-body { flex-direction: column; }
  .admin-tabs {
    width: 100%; max-height: none; position: static;
    flex-direction: row; flex-wrap: wrap; border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .admin-tab-group { margin-bottom: 0; }
  .admin-tab-group-label { display: none; }
  .admin-tab { width: auto; border-left: none; border-bottom: 2px solid transparent; }
  .admin-tab.active { border-left: none; border-bottom-color: var(--green-light); }
  .admin-content { padding: 16px; }
  .admin-header { padding: 10px 14px; }
  .admin-header h1 { font-size: 1rem; }
}

/* ===== Missing admin classes (recovered after CSS cleanup) ===== */

/* Login form inputs */
.admin-user-input { width: 100%; }
.admin-pw-input { width: 100%; padding-right: 36px; }
.admin-pw-confirm { width: 100%; padding-right: 36px; }
.admin-pw-submit { width: 100%; margin-top: 12px; }
.admin-pw-error {
  display: none; padding: 10px 14px; border-radius: 8px;
  background: rgba(212,115,115,.15); color: #d47373;
  font-size: .82rem; text-align: center; margin-top: 8px;
}

/* Reset password dialog inputs */
.admin-rp-old, .admin-rp-new, .admin-rp-confirm { width: 100%; }
.admin-rp-error {
  display: none; padding: 8px 12px; border-radius: 6px;
  background: rgba(212,115,115,.15); color: #d47373;
  font-size: .78rem; margin-top: 6px;
}

/* BG preview hover */
.admin-bg-preview-hover {
  position: relative; overflow: hidden; border-radius: 8px;
  cursor: pointer; transition: transform .15s ease;
}
.admin-bg-preview-hover:hover { transform: scale(1.03); }
.admin-bg-preview-hover::after {
  content: '👁'; position: absolute; top: 4px; right: 4px;
  font-size: .9rem; opacity: 0; transition: opacity .15s;
}
.admin-bg-preview-hover:hover::after { opacity: .7; }

/* Route card preview */
.admin-route-card-preview {
  width: 100%; aspect-ratio: 16/9;
  background-size: cover; background-position: center;
  border-radius: 8px 8px 0 0;
}

/* Photo upload zone in place editor */
.photo-upload-zone {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  background: rgba(82,183,136,.08); border: 1px dashed rgba(82,183,136,.3);
  color: var(--green-light); font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.photo-upload-zone:hover { background: rgba(82,183,136,.15); border-color: var(--green-light); }
.photo-upload-zone input[type="file"] { display: none; }

/* Route editor modal */
.admin-route-editor-wrap {
  position: fixed; inset: 0; z-index: 10002;
  background: rgba(0,0,0,.8); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.admin-route-editor {
  background: var(--bg, #0d1f1a); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; width: 100%; max-width: 700px; max-height: 90vh;
  overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.admin-route-editor-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-route-editor-header h3 { font-size: 1rem; }
.admin-route-editor-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.2rem; color: var(--text-muted); padding: 4px;
}
.admin-route-editor-close:hover { color: var(--text); }
.admin-route-editor-body { padding: 20px; }
.admin-route-editor-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08);
}

/* ===== Place modal — nav, rating, coords ===== */
.modal-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.modal-region-badge { font-size: .82rem; background: rgba(82,183,136,.15); color: var(--green-light); padding: 3px 10px; border-radius: 12px; }
.modal-rating-container { margin-bottom: 12px; }
.modal-rating { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.modal-rating .rating-text { color: var(--text-muted); }
.modal-nav-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.modal-nav-section h3 { font-size: .95rem; margin-bottom: 10px; }
.modal-nav-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-nav-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; font-size: .82rem; text-decoration: none; border: 1px solid rgba(255,255,255,.1); transition: all .2s; }
.modal-nav-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.modal-nav-yandex { background: rgba(255,204,0,.12); color: #ffcc00; border-color: rgba(255,204,0,.25); }
.modal-nav-yandex:hover { background: rgba(255,204,0,.2); }
.modal-nav-google { background: rgba(66,133,244,.12); color: #4285f4; border-color: rgba(66,133,244,.25); }
.modal-nav-google:hover { background: rgba(66,133,244,.2); }
.modal-nav-show { background: rgba(82,183,136,.12); color: var(--green-light); border-color: rgba(82,183,136,.25); }
.modal-nav-show:hover { background: rgba(82,183,136,.2); }
.modal-coords { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .78rem; color: var(--text-muted); }
.modal-copy-coords { background: none; border: 1px solid rgba(255,255,255,.1); color: var(--text-muted); padding: 3px 10px; border-radius: 6px; font-size: .72rem; cursor: pointer; transition: all .2s; }
.modal-copy-coords:hover { color: var(--green-light); border-color: rgba(82,183,136,.3); }
.modal-mini-map { margin-top: 12px; border-radius: 12px; overflow: hidden; }
.fact-card { margin-bottom: 8px; padding: 8px 12px; background: rgba(0,0,0,.2); border-radius: 8px; font-size: .85rem; }
.fact-title { font-weight: 600; color: var(--green-light); }
.modal-flights { margin-top: 16px; }
.modal-flights h3 { font-size: .92rem; margin-bottom: 8px; }
.flight-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: .82rem; border-bottom: 1px solid rgba(255,255,255,.05); }
.flight-from { font-weight: 600; }
.flight-price { color: var(--gold); margin-left: auto; }

/* Photo viewer */
.photo-viewer { display: none; position: fixed; inset: 0; z-index: 10000; align-items: center; justify-content: center; }
.photo-viewer.active { display: flex; }
.photo-viewer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.92); }
.photo-viewer-content { position: relative; max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.photo-viewer-content img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 8px; }
.photo-viewer-label { color: var(--text-muted); font-size: .82rem; margin-top: 8px; text-align: center; }
.photo-viewer-close { position: absolute; top: -40px; right: 0; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; padding: 0 8px; opacity: .7; transition: opacity .2s; }
.photo-viewer-close:hover { opacity: 1; }

/* Admin places tab */
.admin-place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 12px; }
.admin-place-card { position: relative; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; overflow: hidden; background: #131b16; display: flex; flex-direction: column; }
.admin-place-card .place-check { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; z-index: 2; cursor: pointer; }
.admin-place-thumb { width: 100%; height: 120px; object-fit: cover; display: block; background: #1c2820; }
.admin-place-thumb-empty { background: repeating-linear-gradient(45deg, #1c2820, #1c2820 8px, #18221c 8px, #18221c 16px); }
.admin-place-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.admin-place-title { font-weight: 600; font-size: .95rem; display: flex; align-items: center; gap: 6px; }
.admin-place-meta { font-size: .78rem; color: var(--text-muted); }
.admin-place-actions { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.admin-places-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.admin-places-toolbar .admin-input { flex: 1; min-width: 180px; }
.admin-check-all { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-muted); white-space: nowrap; cursor: pointer; }
.admin-places-count { font-size: .82rem; color: var(--text-muted); margin: 4px 0; }
.admin-pagination { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.admin-page-info { font-size: .82rem; color: var(--text-muted); }
.admin-bulk-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; border: 1px solid rgba(82,183,136,.4); border-radius: 10px; background: #15201a; }
.admin-bulk-bar.hidden { display: none; }
.admin-bulk-bar #places-bulk-count { font-size: .85rem; margin-right: auto; }
.admin-empty { padding: 30px; text-align: center; color: var(--text-muted); font-size: .9rem; }

/* History modal */
.admin-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; z-index: 1000; }
.admin-modal-overlay.active { display: flex; }
.admin-modal { width: min(520px, 92vw); max-height: 80vh; display: flex; flex-direction: column; background: var(--bg-card, #1a1a1a); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; overflow: hidden; }
.admin-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-modal-header h3 { margin: 0; font-size: 1rem; }
.admin-modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; }
.admin-modal-body { padding: 14px 16px; overflow-y: auto; }
.admin-history-list { display: flex; flex-direction: column; gap: 10px; }
.admin-history-item { border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 10px 12px; }
.admin-history-meta { font-size: .78rem; color: var(--text-muted); }
.admin-history-name { font-size: .92rem; margin: 4px 0 8px; }
