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

:root {
  --green: #2d9e58;
  --green-light: #e4f5eb;
  --green-dark: #1a5c30;
  --yellow: #e09400;
  --red: #dc2626;
  --bg: #f6faf7;
  --surface: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --radius: 14px;
  --header-h: 54px;
  --nav-h: 62px;
}

html, body, #app {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

#app { display: flex; flex-direction: column; }

/* ── Header ── */
#header {
  height: var(--header-h);
  background: var(--green-dark);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.logo { font-size: 18px; font-weight: 700; color: white; letter-spacing: -0.2px; }

/* ── Buttons ── */
.btn-ghost {
  background: none;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-ghost:hover { background: rgba(255,255,255,0.15); }

.btn-primary {
  background: var(--green);
  color: white;
  border: none;
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
  box-shadow: 0 2px 6px rgba(45,158,88,0.30);
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: default; box-shadow: none; }

.btn-secondary {
  background: var(--green-light);
  color: var(--green-dark);
  border: 1px solid #b5dfc4;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-secondary:hover { background: #d0edda; }

.btn-danger {
  background: #fef2f2;
  color: var(--red);
  border: 1px solid #fecaca;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger:hover { background: #fee2e2; }

/* ── Main & tabs ── */
#main { flex: 1; position: relative; overflow: hidden; }

.tab-content { display: none; height: 100%; overflow-y: auto; }
.tab-content.active { display: block; }

/* ── Map ── */
#map { height: 100%; width: 100%; }

.fab {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  border: none;
  font-size: 30px;
  font-weight: 300;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.fab:hover { background: var(--green-dark); }

.fab-hint {
  position: absolute;
  bottom: 88px;
  right: 12px;
  background: rgba(0,0,0,0.75);
  color: white;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Bottom nav ── */
#bottom-nav {
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  flex-shrink: 0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.07);
}

.nav-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 8px 0;
  transition: color 0.15s;
}
.nav-btn.active { color: var(--green-dark); }
.nav-icon { font-size: 22px; line-height: 1; }
.nav-label { font-size: 11px; font-weight: 600; }

/* ── Bottom sheet (playground detail) ── */
.bottom-sheet {
  position: fixed;
  bottom: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.14);
  z-index: 1050;
  max-height: 75vh;
  overflow-y: auto;
  visibility: visible;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), visibility 0s linear;
}
.bottom-sheet.hidden {
  transform: translateY(100vh);
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.31s;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--green);
  opacity: 0.25;
  border-radius: 2px;
  margin: 12px auto 4px;
}

/* ── Filter panel (compact floating, top-left) ── */
.filter-panel {
  position: fixed;
  top: 0; /* overridden dynamically in showFilterSheet() */
  left: 8px;
  width: 268px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  z-index: 1060;
  overflow: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.filter-panel.hidden {
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.16s;
}

/* ── Restroom banner ── */
.restroom-banner {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #1d72b8;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.22);
  z-index: 1080;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.restroom-banner.hidden { display: none; }

/* ── Modals & overlay ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1500;
  backdrop-filter: blur(2px);
}
.overlay.hidden { display: none; }

/* ── Directions picker (action sheet) ── */
.dir-picker {
  position: fixed;
  bottom: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
  z-index: 1600;
  padding: 8px 16px 16px;
  max-width: 480px;
  margin: 0 auto;
}
.dir-picker.hidden { display: none; }

.dir-picker-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0 12px;
  letter-spacing: 0.02em;
}
.dir-picker-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 16px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: var(--bg);
  margin-bottom: 8px;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.dir-picker-option:active { background: var(--border); }
.dir-picker-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.dir-picker-cancel {
  display: block;
  width: 100%;
  padding: 15px;
  margin-top: 4px;
  border: none;
  border-radius: 12px;
  background: var(--bg);
  font-size: 17px;
  font-weight: 600;
  color: var(--red);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.dir-picker-cancel:active { background: var(--border); }

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1700;
  padding: 0;
  pointer-events: none;
}
.modal.hidden { display: none; }
.modal:not(.hidden) { pointer-events: all; }

.modal-box {
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 24px 20px 32px;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
}

.modal-box h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--bg);
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.modal-close:hover { background: var(--border); }

/* ── Forms ── */
form { display: flex; flex-direction: column; gap: 8px; }

label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--green); background: white; }
textarea { resize: vertical; min-height: 80px; }
.optional { font-weight: 400; color: var(--text-muted); }

/* ── Auth ── */
.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s;
}
.auth-tab.active { color: var(--green-dark); border-bottom-color: var(--green); }
.auth-privacy-note { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 4px; }
.auth-privacy-note a { color: var(--text-muted); }

/* ── Star rating ── */
.star-rating {
  display: flex;
  gap: 4px;
  font-size: 36px;
  cursor: pointer;
  margin: 4px 0;
  user-select: none;
}
.star-rating span { color: #d1d5db; transition: color 0.1s; }
.star-rating span.lit { color: var(--yellow); }

/* ── Age row ── */
.age-row { display: flex; align-items: center; gap: 10px; }
.age-row select { flex: 1; }

/* ── Checkbox row ── */
.checkbox-row { display: flex; gap: 20px; flex-wrap: wrap; }
.checkbox-row label { font-weight: 400; display: flex; align-items: center; gap: 6px; cursor: pointer; margin-top: 0; }

/* ── Location note ── */
.location-note { font-size: 13px; color: var(--text-muted); background: var(--bg); padding: 8px 10px; border-radius: 6px; }

/* ── Error ── */
.error-msg { color: var(--red); font-size: 14px; min-height: 18px; }

/* ── Playground panel ── */
.pg-header { padding: 4px 16px 12px; border-bottom: 1px solid var(--green-light); margin-bottom: 4px; }
.pg-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; line-height: 1.2; color: var(--text); }
/* ── Photo strip ── */
.pg-photo-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 16px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pg-photo-strip::-webkit-scrollbar { display: none; }
.pg-photo-wrap {
  position: relative;
  flex-shrink: 0;
}
.pg-photo {
  width: 260px;
  height: 195px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  cursor: zoom-in;
}

/* ── Photo lightbox ── */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.photo-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}
.photo-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-menu-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.pg-photo-wrap:hover .photo-menu-btn { opacity: 1; }
@media (hover: none) { .photo-menu-btn { opacity: 1; } }
.photo-menu {
  position: absolute;
  top: 30px;
  right: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
  z-index: 600;
  overflow: hidden;
  min-width: 140px;
}
.photo-menu-action {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.photo-menu-action:hover { background: var(--bg); }
.photo-menu-delete { color: var(--red); }

/* ── Photo picker (review form) ── */
.photo-pick-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 4px;
}
.photo-pick-label:hover { border-color: var(--green); color: var(--green); }
.photo-pick-label input { display: none; }
.photo-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.preview-thumb {
  position: relative;
  width: 72px;
  height: 72px;
}
.preview-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.preview-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: none;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg-byline { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.pg-rating-row { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.pg-rating { font-size: 18px; font-weight: 700; color: var(--text); }
.pg-stars { color: var(--yellow); font-size: 16px; }
.pg-review-count { font-size: 14px; color: var(--text-muted); }

.pg-description { font-size: 14px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
.pg-description-owner { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.pg-description-owner .pg-description { margin-top: 0; flex: 1; }
.pg-description-empty { font-size: 14px; color: var(--text-muted); opacity: 0.5; flex: 1; font-style: italic; }

.pg-checkins {
  margin: 0 16px 12px;
  background: var(--green-light);
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 12px;
}
.pg-checkin-title { font-weight: 700; font-size: 14px; color: var(--green-dark); margin-bottom: 6px; }
.pg-checkin-names { font-size: 14px; color: var(--text); }

.pg-tags {
  padding: 0 16px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: var(--green-light);
  color: var(--green-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.tag.condition-excellent, .tag.condition-good { background: #d1fae5; color: #065f46; }
.tag.condition-fair { background: #fef3c7; color: #92400e; }
.tag.condition-poor { background: #fee2e2; color: #991b1b; }
.tag.tag-seasonal { background: #eff6ff; color: #1e40af; }

.pg-actions {
  padding: 4px 16px 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pg-actions .btn-primary { margin-top: 0; width: auto; flex: 1; }
.pg-actions .btn-secondary { flex-shrink: 0; }

.pg-reviews { padding: 0 16px 32px; }
.pg-reviews h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; border-top: 1px solid var(--border); padding-top: 16px; }

.review-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.review-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.review-author { font-weight: 600; font-size: 14px; }
.review-header-right { display: flex; align-items: center; gap: 2px; }
.review-date { font-size: 12px; color: var(--text-muted); }
.review-edit-btn { padding: 0; font-size: 12px; }
.review-stars { color: var(--yellow); font-size: 15px; }
.review-body { font-size: 14px; color: var(--text); margin-top: 6px; line-height: 1.5; }
.review-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.review-stale { font-size: 11px; color: var(--text-muted); font-style: italic; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--border); }

/* ── Feed ── */
.feed-header {
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.feed-header h2 { font-size: 20px; font-weight: 700; }

/* ── Push notification toggle ── */
.push-toggle-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.push-toggle-btn.push-btn-on {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green-dark);
}

.push-hint {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  line-height: 1.5;
}

.search-wrap { position: relative; }
#user-search { background: var(--bg); }

#search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 100;
  box-shadow: var(--shadow);
  overflow: hidden;
}
#search-results:empty { display: none; }

.search-result-item {
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg); }

.feed-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.feed-empty .feed-empty-icon { font-size: 48px; margin-bottom: 12px; }
.feed-empty strong { display: block; color: var(--text); margin-bottom: 6px; font-size: 16px; }

.feed-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.feed-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feed-body { flex: 1; min-width: 0; }
.feed-name { font-weight: 600; font-size: 15px; }
.feed-action { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.feed-playground { color: var(--green-dark); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; }
.feed-playground:hover { text-decoration-color: var(--green-dark); }
.feed-time { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.feed-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 10px;
}
.feed-badge.active { background: #d1fae5; color: #065f46; }
.feed-badge.past { background: var(--border); color: var(--text-muted); }

/* ── Profile ── */
.profile-hero {
  background: var(--green-light);
  color: var(--text);
  border-bottom: 2px solid #b8dfc6;
  padding: 28px 24px 24px;
  text-align: center;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  border: 3px solid white;
  box-shadow: 0 2px 10px rgba(45,158,88,0.25);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
}
.profile-name { font-size: 22px; font-weight: 700; color: var(--text); }
.profile-email { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.profile-stats { display: flex; justify-content: center; gap: 32px; margin-top: 16px; }
.profile-stat { text-align: center; }
.profile-stat-value { font-size: 24px; font-weight: 700; color: var(--green-dark); }
.profile-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.profile-body { padding: 20px; }

.checkin-active-card {
  background: var(--green-light);
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
.checkin-active-card .label { font-size: 12px; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.checkin-active-card .playground-name { font-size: 18px; font-weight: 700; margin-bottom: 12px; }

.profile-section { margin-bottom: 24px; }
.profile-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }

/* btn-ghost inside white profile body */
.profile-body .btn-ghost {
  border-color: var(--border);
  color: var(--text);
  border-radius: 8px;
  font-size: 15px;
  padding: 10px 16px;
}
.profile-body .btn-ghost:hover { background: var(--bg); }
.profile-body .account-danger-toggle { color: var(--red); border-color: #fecaca; }
.profile-body .account-danger-toggle:hover { background: #fef2f2; }

/* Account management */
.account-settings-toggle {
  width: 100%; text-align: left; background: none; border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: background 0.12s;
}
.account-settings-toggle:hover { background: var(--bg); }
.account-sub-form { margin-top: 12px; gap: 8px; }
.account-sub-form.hidden { display: none; }
.account-sub-form input { margin-bottom: 0; }
.account-sub-divider { height: 1px; background: var(--border); margin: 10px 0; }
.account-danger-toggle { color: var(--red); }
.account-delete-warning { font-size: 13px; color: var(--red); background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 12px; margin-bottom: 4px; }

.share-link-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.following-list { display: flex; flex-direction: column; gap: 8px; }
.following-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
}
.following-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.following-name { font-weight: 600; flex: 1; }
.following-unfollow {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
}
.following-unfollow:hover { color: var(--red); }

.not-logged-in {
  padding: 80px 24px 40px;
  text-align: center;
}
.not-logged-in h2 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.not-logged-in p { color: var(--text-muted); margin-bottom: 28px; font-size: 16px; line-height: 1.5; }
.not-logged-in .btn-primary { max-width: 240px; margin: 0 auto; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(0,0,0,0.82);
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 20px;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Hazard type grid ── */
.hazard-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0 12px;
}
.hazard-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 22px;
  transition: border-color 0.15s, background 0.15s;
}
.hazard-type-btn span { font-size: 12px; font-weight: 600; color: var(--text); text-align: center; line-height: 1.3; }
.hazard-type-btn:hover { background: var(--green-light); border-color: var(--green); }
.hazard-type-btn.selected { background: var(--green-light); border-color: var(--green-dark); }

/* ── Hazard panel ── */
.pg-hazards {
  margin: 0 16px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px;
}
.pg-hazard-title { font-weight: 700; font-size: 13px; color: #9a3412; margin-bottom: 8px; }
.hazard-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid #fed7aa;
}
.hazard-item:first-of-type { border-top: none; padding-top: 0; }
.hazard-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.hazard-body { flex: 1; min-width: 0; }
.hazard-label { font-weight: 600; font-size: 14px; }
.hazard-temp { font-size: 11px; color: #9a3412; background: #fed7aa; padding: 1px 6px; border-radius: 8px; margin-left: 6px; }
.hazard-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.hazard-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.hazard-resolve {
  background: none;
  border: 1px solid #86efac;
  color: var(--green-dark);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}
.hazard-resolve:hover { background: var(--green-light); }

/* ── Phone search bar ── */
.search-wrap { position: relative; }
#user-search {
  background: white;
  font-size: 16px;
  padding: 13px 14px;
}

/* ── Follow request card ── */
.follow-request-card {
  padding: 16px;
  border-bottom: 2px solid var(--green-light);
  background: #f0faf4;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.follow-request-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ── Locate button (map control) ── */
.geocoder-wrap {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  overflow: visible;
  width: 260px;
  margin-top: 8px;
  margin-left: 8px;
  position: relative;
  z-index: 1000;
}
@media (max-width: 640px) {
  .geocoder-wrap { width: calc(100vw - 100px); }
}
#geocoder-form {
  display: flex;
}
#geocoder-input {
  flex: 1;
  border: none;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 8px 0 0 8px;
  outline: none;
  min-width: 0;
}
#geocoder-form button {
  background: var(--green);
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
}
#geocoder-input:focus { box-shadow: inset 0 0 0 2px var(--green); border-radius: 8px 0 0 8px; }
#geocoder-results {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1001;
}
#geocoder-results:empty { display: none; }
#geocoder-results li {
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  border-top: 1px solid #f0f0f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}
#geocoder-results li:first-child { border-top: none; }
#geocoder-results li:hover, #geocoder-results li:focus { background: var(--green-light); }

.trip-input-wrap {
  position: relative;
}
.trip-geocoder-results {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}
.trip-geocoder-results:empty { display: none; }
.trip-geocoder-results li {
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  border-top: 1px solid #f0f0f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trip-geocoder-results li:first-child { border-top: none; }
.trip-geocoder-results li.no-results { color: var(--text-muted); cursor: default; }
.trip-geocoder-results li:hover:not(.no-results) { background: var(--green-light); }

.locate-btn {
  width: 34px;
  height: 34px;
  background: white;
  border: 2px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  margin-top: 6px;
}
.locate-btn:hover { background: var(--bg); }

/* ── Mobile location nudge ── */
.location-nudge {
  position: absolute;
  bottom: 80px;
  left: 12px;
  right: 12px;
  background: var(--green-dark);
  color: white;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
}
.location-nudge span { flex: 1; font-weight: 500; }
.location-nudge #nudge-locate-btn {
  background: white;
  color: var(--green-dark);
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.location-nudge #nudge-dismiss-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}

/* ── Search this area button ── */
.search-here-btn {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  background: white;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s ease, opacity 0.2s;
  opacity: 0;
  pointer-events: none;
}
.search-here-btn.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}
.search-here-btn:hover { background: var(--bg); }

/* ── Leaflet permanent label for top-5 markers ── */
.marker-label {
  background: white !important;
  border: none !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  white-space: nowrap;
}
.marker-label::before { display: none !important; }

/* ── Empty map hint ── */
.map-empty-hint {
  position: absolute;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.78);
  color: white;
  font-size: 14px;
  line-height: 1.5;
  padding: 14px 18px;
  border-radius: 12px;
  text-align: center;
  pointer-events: auto;
  z-index: 1000;
  min-width: 240px;
  max-width: 300px;
}
.empty-hint-msg { font-weight: 600; margin-bottom: 10px; }
.empty-hint-search {
  display: block; width: 100%;
  background: var(--green); color: white; border: none;
  border-radius: 20px; padding: 8px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 6px;
}
.empty-hint-search:hover { background: var(--green-dark); }
.empty-hint-or { font-size: 12px; color: rgba(255,255,255,0.5); margin: 4px 0; }
.empty-hint-add {
  display: block; width: 100%;
  background: transparent; color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px; padding: 7px 16px;
  font-size: 13px; cursor: pointer;
}
.empty-hint-add:hover { background: rgba(255,255,255,0.1); }

/* ── Playground panel minor actions (report + star) ── */
.pg-minor-actions {
  padding: 0 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-text-sm {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}
.btn-text-sm:hover { color: var(--text); }
a.btn-text-sm { text-decoration: none; display: inline-block; }

.star-btn {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.star-btn:hover { border-color: var(--yellow); color: var(--yellow); }
.star-btn.starred { border-color: var(--yellow); color: var(--yellow); background: #fef9e7; }

/* ── Trips log (profile) ── */
.trips-list { display: flex; flex-direction: column; gap: 2px; }
.trip-item {
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
}
.trip-item:hover { background: var(--green-light); }
.trip-name { font-weight: 600; font-size: 14px; }
.trip-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Road Trip Planner tab ── */
.trip-planner-wrap {
  padding: 20px 16px 32px;
  max-width: 560px;
  margin: 0 auto;
  overflow-y: auto;
  height: 100%;
}
.trip-planner-header { margin-bottom: 20px; }
.trip-planner-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.trip-planner-header p  { font-size: 14px; color: var(--text-muted); }

.trip-loading { padding: 32px; text-align: center; color: var(--text-muted); font-size: 15px; }

.trip-short {
  text-align: center;
  padding: 32px 16px;
}
.trip-stat-big { font-size: 36px; font-weight: 700; color: var(--green); }

/* Summary row */
.btn-ghost-inline {
  background: none; border: none; color: var(--text-muted);
  font-size: 13px; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.btn-ghost-inline:hover { background: var(--bg); color: var(--text); }

/* Data quality confirm button */
.btn-accuracy {
  font-size: 12px; padding: 4px 10px; cursor: pointer;
  border: 1.5px solid #d1fae5; border-radius: 20px;
  background: #f0fdf4; color: #15803d;
  transition: background 0.15s, border-color 0.15s;
  display: inline-flex; align-items: center; gap: 4px;
}
.btn-accuracy:hover { background: #dcfce7; border-color: #86efac; }
.btn-accuracy.confirmed { background: #dcfce7; border-color: #86efac; font-weight: 600; }
.accuracy-count {
  background: #bbf7d0; border-radius: 10px;
  padding: 0 5px; font-size: 11px; font-weight: 600;
}
.pg-accuracy-row { padding: 0 16px 12px; }
.accuracy-count-static { font-size: 12px; color: var(--text-muted); }

/* Review mode toggle */
.review-mode-toggle {
  display: flex; gap: 4px; margin-bottom: 14px;
  background: var(--bg); border-radius: 10px; padding: 3px;
}
.review-mode-btn {
  flex: 1; padding: 6px 10px; border-radius: 8px; border: none;
  background: transparent; font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.review-mode-btn.active {
  background: #fff; color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.trip-summary {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0 24px;
}
.trip-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-right: 1.5px solid var(--border);
}
.trip-stat:last-child { border-right: none; }
.trip-stat-val { font-size: 20px; font-weight: 700; }
.trip-stat-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }
.trip-stat-warn .trip-stat-val { color: var(--yellow); }

/* Itinerary */
.trip-itinerary { display: flex; flex-direction: column; }

.trip-node {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.trip-node-terminus { background: var(--bg); }
.trip-node-gap { border-color: #fcd34d; background: #fefce8; }
.trip-node-icon { font-size: 22px; line-height: 1; margin-top: 2px; flex-shrink: 0; }
.trip-node-body { flex: 1; min-width: 0; }
.trip-node-body strong { font-size: 15px; display: block; }
.trip-node-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.trip-pg-link { cursor: pointer; text-decoration: underline; }
.trip-pg-link:hover { color: var(--green); }

.trip-connector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.trip-connector span { background: var(--bg); padding: 2px 8px; border-radius: 20px; border: 1px solid var(--border); }
.trip-connector-play { color: var(--green-dark); font-style: italic; }
.trip-connector-play span { background: var(--green-light); border-color: #b5dfc4; color: var(--green-dark); }

/* ── Trip sliders ── */
.trip-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  margin: 8px 0 20px;
  cursor: pointer;
  display: block;
}
.trip-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
}
.trip-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
  border: none;
}

.trip-gap-note {
  margin-top: 16px;
  background: #fefce8;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #92400e;
}

/* ── Connection sections (profile) ── */
.connections-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; margin-top: -6px; }
.connections-empty { font-size: 14px; color: var(--text-muted); font-style: italic; }

/* ── Phone search row ── */
.phone-search-row {
  display: flex;
  gap: 0;
}
.phone-search-row input {
  flex: 1;
  border-radius: 8px 0 0 8px;
  border-right: none;
  background: white;
  font-size: 16px;
  padding: 13px 14px;
}
.phone-search-row input:focus {
  border-color: var(--green);
  border-right: none;
}
.phone-search-btn {
  background: var(--green);
  color: white;
  border: 1.5px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 0 18px;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.phone-search-btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
.phone-search-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Pending badge ── */
.pending-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--yellow);
  background: #fef9ec;
  border: 1px solid #fde68a;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── Profile search results (inline in profile) ── */
#profile-search-results:not(:empty) {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

/* ── Favorites list (profile) ── */
.favorites-list { display: flex; flex-direction: column; gap: 6px; }
.favorite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  gap: 10px;
}
.favorite-item:hover { background: var(--green-light); border-color: #b8dfc6; }
.favorite-info { flex: 1; min-width: 0; }
.favorite-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.favorite-rating { font-size: 12px; color: var(--yellow); margin-top: 2px; }
.fav-star { color: var(--yellow); font-size: 18px; flex-shrink: 0; }

/* ── Contributor leaderboard ── */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 6px;
}
.leaderboard-row.leaderboard-me {
  background: var(--green-light);
  border-color: #b8dfc6;
}
.leaderboard-rank { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-name { font-size: 14px; font-weight: 600; }
.leaderboard-you { font-size: 11px; font-weight: 600; background: var(--green); color: #fff; border-radius: 20px; padding: 1px 7px; margin-left: 4px; vertical-align: middle; }
.leaderboard-breakdown { font-size: 11px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaderboard-pts { font-size: 14px; font-weight: 700; color: var(--green-dark); flex-shrink: 0; }

/* ── Map crosshairs (shows center of current view) ── */
#map-crosshairs {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 24px; height: 24px;
  pointer-events: none;
  z-index: 500;
}
#map-crosshairs::before, #map-crosshairs::after {
  content: '';
  position: absolute;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 1px;
}
#map-crosshairs::before { width: 1.5px; height: 100%; left: 50%; top: 0; transform: translateX(-50%); }
#map-crosshairs::after  { width: 100%; height: 1.5px; top: 50%; left: 0; transform: translateY(-50%); }

/* ── Rename playground form ── */
.rename-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.rename-input {
  width: 100%; padding: 6px 10px; font-size: 15px; font-weight: 700;
  border: 2px solid var(--green); border-radius: 8px; outline: none;
}
.rename-actions { display: flex; gap: 8px; }

/* ── Location consent banner ── */
#locate-banner {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1100;
  max-width: min(420px, calc(100vw - 24px));
  width: max-content;
  animation: banner-in 0.25s ease;
}
@keyframes banner-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.locate-banner-text { font-size: 14px; font-weight: 600; line-height: 1.4; }
.locate-banner-btns { display: flex; gap: 8px; align-items: center; }
#locate-banner .btn-primary { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.locate-no { background: none; border: none; font-size: 13px; color: var(--text-muted); cursor: pointer; padding: 6px 4px; }
.locate-no:hover { color: var(--text); }

/* ── Marker cluster colors (spring green → hunter green) ── */
/* Heat blobs at low zoom — no number, just a glow */
.marker-cluster-heat div { display: none; }
.marker-cluster-small { background-color: rgba(110, 210, 140, 0.5); }
.marker-cluster-small div { background-color: rgba(110, 210, 140, 0.85); }

.marker-cluster-medium { background-color: rgba(45, 158, 88, 0.5); }
.marker-cluster-medium div { background-color: rgba(45, 158, 88, 0.85); }

.marker-cluster-large { background-color: rgba(26, 92, 48, 0.5); }
.marker-cluster-large div { background-color: rgba(26, 92, 48, 0.85); }

.marker-cluster div { color: #fff; font-weight: 700; }

/* ── Filter map button ── */
.filter-map-btn {
  background: white;
  border: 1.5px solid rgba(0,0,0,0.18);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  white-space: nowrap;
  color: var(--text);
  margin-top: 4px;
  margin-left: 8px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.filter-map-btn.has-filters {
  background: var(--green);
  border-color: var(--green-dark);
  color: white;
}

/* ── Filter sheet ── */
.filter-sheet-content {
  padding: 4px 20px 24px;
}
.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.filter-header h3 { font-size: 17px; font-weight: 700; }
.filter-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  margin-top: 18px;
}
.filter-rating-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-rating-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  transition: background 0.12s, border-color 0.12s;
}
.filter-rating-btn.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: white;
}
.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
  transition: background 0.12s, border-color 0.12s;
}
.filter-chip.active {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green-dark);
}
.filter-result-count {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  min-height: 18px;
}

/* ── Playground panel icon buttons (share + close) ── */
.pg-icon-btn {
  background: var(--bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}
.pg-icon-btn:hover { background: var(--border); }

/* ── PWA install banner ──────────────────────────────────────────────────────── */
.install-banner {
  position: fixed;
  bottom: calc(var(--nav-h) + 10px);
  left: 12px;
  right: 12px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 700;
}
.install-banner.hidden { display: none; }
.install-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.install-banner-icon { font-size: 28px; flex-shrink: 0; }
.install-banner-text { flex: 1; min-width: 0; }
.install-banner-text strong { display: block; font-size: 14px; }
.install-banner-text span { font-size: 12px; color: var(--text-muted); }
.install-banner-cta { padding: 8px 14px; font-size: 13px; flex-shrink: 0; width: auto; margin-top: 0; }
.install-banner-dismiss {
  background: none; border: none; font-size: 20px; color: var(--text-muted);
  cursor: pointer; padding: 4px; flex-shrink: 0; line-height: 1;
}

/* ── Post-checkin nudge ──────────────────────────────────────────────────── */
.checkin-nudge {
  position: fixed;
  bottom: calc(var(--nav-h) + 10px);
  left: 12px;
  right: 12px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 800;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
}
.checkin-nudge.hidden {
  display: none;
}
.checkin-nudge-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.checkin-nudge-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.checkin-nudge-copy strong {
  font-size: 14px;
  color: var(--text);
}
.checkin-nudge-copy span {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.checkin-nudge-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.checkin-nudge-action {
  padding: 7px 14px;
  font-size: 13px;
  white-space: nowrap;
}
.checkin-nudge-dismiss {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── First-run onboarding ─────────────────────────────────────────────────── */
.onboarding {
  position: fixed;
  inset: 0;
  background: var(--surface);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.onboarding.hidden { display: none; }

.onboarding-skip {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  z-index: 10;
  padding: 6px 10px;
}

/* Slide carousel */
.onboarding-slides {
  display: flex;
  flex: 1;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 0;
}
.onboarding-slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Illustration area */
.onboarding-art {
  flex: 0 0 42%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.onboarding-emoji-stack {
  position: relative;
  width: 120px;
  height: 120px;
}
.ob-emoji-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  line-height: 1;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
}
.ob-emoji-fg {
  position: absolute;
  bottom: -4px;
  right: -8px;
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

/* Text + actions */
.onboarding-body {
  flex: 1;
  padding: 32px 28px 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.onboarding-body h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 14px;
}
.onboarding-body p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 28px;
  flex: 1;
}
.ob-notify-btn { margin-bottom: 0; }
.ob-skip-push, .onboarding-body .btn-text-sm {
  text-align: center;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-weight: 500;
}

/* Dot indicators */
.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 max(20px, env(safe-area-inset-bottom));
  flex-shrink: 0;
}
.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, width 0.2s;
  cursor: pointer;
}
.ob-dot.active {
  background: var(--green);
  width: 22px;
  border-radius: 4px;
}

@media (min-width: 600px) {
  .modal-box { border-radius: var(--radius); max-width: 460px; margin: auto; }
  .modal { align-items: center; padding: 20px; }
  .bottom-sheet { max-width: 600px; left: 50%; right: auto; transform: translateX(-50%); border-radius: 18px 18px 0 0; }
  .bottom-sheet.hidden { transform: translateX(-50%) translateY(110%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.31s; }
  .onboarding-art { flex: 0 0 38%; }
  .onboarding-body { padding: 36px 40px 24px; }
  .onboarding-body h2 { font-size: 28px; }
}
