:root {
  --bg: #f6f4f1;
  --bg-2: #ffffff;
  --card: #ffffff;
  --rail: #ffffff;
  --line: rgba(43, 38, 34, 0.1);
  --text: #2b2622;
  --muted: #6b7280;
  --primary: #25a06b;
  --primary-soft: rgba(37, 160, 107, 0.12);
  --radius: 14px;
  --rail-w: 232px;
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.app {
  min-height: 100%;
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background: var(--rail);
  border-right: 1px solid var(--line);
  padding: 18px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 20;
}

.brand img {
  display: block;
  height: 28px;
  width: auto;
  margin: 4px 8px 8px;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.rail-nav a,
.more-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background .15s ease, color .15s ease;
}

.rail-nav a:hover,
.more-btn:hover {
  background: rgba(43, 38, 34, 0.04);
  color: var(--text);
}

.rail-nav a.active {
  background: var(--primary-soft);
  color: #1a7a50;
  font-weight: 600;
}

.ico {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(43, 38, 34, 0.06);
  position: relative;
  flex: 0 0 auto;
}
.ico::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 3px;
  background: currentColor;
  opacity: .75;
}
.ico[data-i="map"]::before {
  border-radius: 50%;
  inset: 4px;
  box-shadow: inset 0 0 0 2px currentColor;
  background: transparent;
}
.ico[data-i="more"]::before {
  inset: 9px 5px;
  height: 3px;
  border-radius: 2px;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.more-panel {
  margin: 4px 0 8px 12px;
  padding: 8px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.more-panel a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
}
.more-panel a:hover {
  background: rgba(43, 38, 34, 0.04);
  color: var(--text);
}

.login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
}
.login.pill { padding: 8px 14px; font-size: 14px; }
.rail-login { margin-top: auto; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 15;
}
.top-title { font-weight: 600; letter-spacing: .01em; }
.top-logo { height: 22px; width: auto; display: block; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.map-wrap {
  position: relative;
  height: min(72vh, 760px);
  min-height: 420px;
  border-bottom: 1px solid var(--line);
}
#map {
  position: absolute;
  inset: 0;
  background: #e8eee9;
}

.map-tools {
  position: absolute;
  right: 14px;
  bottom: 18px;
  z-index: 500;
  display: grid;
  gap: 8px;
}
.tool {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.tool:hover { border-color: rgba(37,160,107,.45); }

.search-chip {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  z-index: 500;
  width: min(440px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0,0,0,.1);
}
.search-chip input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
.search-ico { color: var(--muted); }

.spot-card {
  position: absolute;
  left: 14px;
  bottom: 18px;
  z-index: 500;
  width: min(340px, calc(100% - 80px));
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 50px rgba(0,0,0,.12);
}
.spot-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.spot-card h2 { margin: 6px 0 4px; font-size: 18px; }
.spot-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.spot-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.spot-tags span {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #1a7a50;
}
.spot-close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
}
.btn-primary {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  opacity: .55;
  cursor: not-allowed;
}

.regions {
  padding: 28px 20px 12px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.regions h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 12px;
}
.region-grid a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #4b5563;
  border: 1px solid transparent;
}
.region-grid a:hover {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.footer {
  padding: 28px 20px 96px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 16px;
}
.footer-links a:hover { color: var(--text); }
.stores { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.store {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.copy { margin: 0; }

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
  padding: 6px 2px;
}
.bottom-nav a.active { color: var(--primary); font-weight: 600; }
.bottom-nav span { font-size: 16px; line-height: 1; }

.mobile-only { display: none !important; }
.desktop-only { display: inline !important; }

.leaflet-container { background: #e8eee9; font: inherit; }
.leaflet-control-attribution {
  background: rgba(255,255,255,.75) !important;
  color: #6b7280 !important;
  border: 0 !important;
}
.pin {
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(37,160,107,.35);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 25;
}

@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .rail {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 20px 0 60px rgba(0,0,0,.15);
  }
  .rail.open { transform: translateX(0); }
  .mobile-only { display: flex !important; }
  .desktop-only { display: none !important; }
  .top-title { display: flex; align-items: center; gap: 10px; }
  .map-wrap { height: 62vh; min-height: 360px; }
  .spot-card { left: 10px; right: 10px; width: auto; }
  .footer { padding-bottom: 110px; }
}
