/* ========================================
   Seeds — Community Garden Sharing Map
   Design System & Styles
   ======================================== */

/* ── CSS Variables ── */
:root {
  --bg-deep: #050e05;
  --bg-dark: #0d1f0d;
  --bg-panel: rgba(10, 28, 10, 0.94);
  --bg-glass: rgba(15, 38, 15, 0.82);
  --bg-overlay: rgba(0, 0, 0, 0.6);

  --green-50: #E8F5E9;
  --green-100: #C8E6C9;
  --green-200: #A5D6A7;
  --green-300: #81C784;
  --green-400: #66BB6A;
  --green-500: #4CAF50;
  --green-600: #43A047;
  --green-700: #388E3C;
  --green-800: #2E7D32;
  --green-900: #1B5E20;

  --gold: #C8A951;
  --gold-light: #DFC77A;

  --plant-color: #43A047;
  --seeds-color: #7CB342;
  --tools-color: #546E7A;
  --fertilizer-color: #6D4C41;

  --text: #E8F5E9;
  --text-secondary: #A5D6A7;
  --text-muted: #5A7A5A;
  --danger: #EF5350;

  --border: rgba(76, 175, 80, 0.15);
  --border-light: rgba(76, 175, 80, 0.3);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);

  --radius: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}

/* ── Loading Screen ── */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  font-size: 64px;
  margin-bottom: 16px;
  animation: pulse-grow 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(76, 175, 80, 0.4));
}

.loading-text {
  font-size: 28px;
  font-weight: 700;
  color: var(--green-400);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.loading-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 1px;
}

.loading-bar {
  width: 140px;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 28px;
  overflow: hidden;
}

.loading-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--green-500), var(--gold));
  border-radius: 3px;
  animation: loading-slide 1.2s ease-in-out infinite;
}

/* ── Map ── */
#map {
  position: absolute;
  inset: 0;
}

.leaflet-tile-pane {
  filter: saturate(0.88) brightness(0.97);
}

/* ── App Header ── */
#app-header {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 1000;
  background: rgba(8, 23, 8, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), opacity var(--transition);
}

#app-header.hidden {
  transform: translateY(-100px);
  opacity: 0;
  pointer-events: none;
}

.header-logo {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(76, 175, 80, 0.3));
}

.header-info {
  flex: 1;
  min-width: 0;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--green-400);
  letter-spacing: 0.5px;
}

.header-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.header-count {
  background: rgba(76, 175, 80, 0.12);
  color: var(--green-300);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── FAB (Floating Action Button) ── */
#fab {
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 1000;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(76, 175, 80, 0.45), var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  animation: fab-pulse 3s ease-in-out infinite;
}

.fab-icon {
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  pointer-events: none;
}

#fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 32px rgba(76, 175, 80, 0.55), var(--shadow-lg);
}

#fab:active {
  transform: scale(0.95);
}

#fab.active {
  background: linear-gradient(135deg, var(--danger), #C62828);
  box-shadow: 0 4px 24px rgba(239, 83, 80, 0.45), var(--shadow-md);
  animation: none;
}

#fab.active .fab-icon {
  transform: rotate(90deg);
}

#fab.active:hover {
  transform: scale(1.08);
}

/* ── Locate Button ── */
#locate-btn {
  position: fixed;
  bottom: 32px;
  left: 24px;
  z-index: 1000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #081708; /* Solid dark background for zero rendering glitches */
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

#locate-btn svg {
  pointer-events: none;
}

/* ── Accessibility Settings Button ── */
#accessibility-btn {
  position: fixed;
  bottom: 90px;
  left: 24px;
  z-index: 1000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #081708; /* Solid dark background for zero rendering glitches */
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  transition: all var(--transition);
}

#accessibility-btn:hover {
  background: rgba(15, 38, 15, 0.82);
  color: var(--green-400);
  transform: scale(1.06);
  border-color: var(--border-light);
}

#accessibility-btn:active {
  transform: scale(0.94);
}

#locate-btn:hover {
  background: var(--bg-glass);
  color: var(--green-400);
  transform: scale(1.06);
  border-color: var(--border-light);
}

#locate-btn:active {
  transform: scale(0.94);
}

#category-panel,
#neighborhood-panel,
#radius-panel,
#accessibility-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1002; /* Floating above overlay (z-index: 1001) to remain 100% bright, readable, and interactive */
  background: rgba(8, 23, 8, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 16px 16px 36px;
  transform: translateY(100%);
  transition: transform var(--transition-bounce);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
}

#category-panel.visible,
#neighborhood-panel.visible,
#radius-panel.visible,
#accessibility-panel.visible {
  transform: translateY(0);
}

.panel-handle {
  width: 42px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 4px;
  margin: 0 auto 14px;
  opacity: 0.4;
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 8px 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.category-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.category-btn:active {
  transform: scale(0.96);
}

.category-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
}

.category-icon svg {
  width: 28px;
  height: 28px;
}

.category-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Category-specific icon ring colors via CSS */
.category-btn[data-category="plant"] .category-icon {
  background: rgba(67, 160, 71, 0.18);
  border: 2px solid rgba(67, 160, 71, 0.4);
}
.category-btn[data-category="seeds"] .category-icon {
  background: rgba(124, 179, 66, 0.18);
  border: 2px solid rgba(124, 179, 66, 0.4);
}
.category-btn[data-category="tools"] .category-icon {
  background: rgba(84, 110, 122, 0.18);
  border: 2px solid rgba(84, 110, 122, 0.4);
}
.category-btn[data-category="fertilizer"] .category-icon {
  background: rgba(109, 76, 65, 0.18);
  border: 2px solid rgba(109, 76, 65, 0.4);
}

/* Category hover glows */
.category-btn[data-category="plant"]:hover {
  border-color: rgba(67, 160, 71, 0.5);
  box-shadow: 0 4px 16px rgba(67, 160, 71, 0.15);
}
.category-btn[data-category="seeds"]:hover {
  border-color: rgba(124, 179, 66, 0.5);
  box-shadow: 0 4px 16px rgba(124, 179, 66, 0.15);
}
.category-btn[data-category="tools"]:hover {
  border-color: rgba(84, 110, 122, 0.5);
  box-shadow: 0 4px 16px rgba(84, 110, 122, 0.15);
}
.category-btn[data-category="fertilizer"]:hover {
  border-color: rgba(109, 76, 65, 0.5);
  box-shadow: 0 4px 16px rgba(109, 76, 65, 0.15);
}

/* ── Place Mode Banner ── */
#place-banner {
  position: fixed;
  top: 152px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 1000;
  background: #081708; /* Solid background to avoid hardware-accelerated text blurs */
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-light);
  box-shadow: 0 4px 24px rgba(200, 169, 81, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  white-space: nowrap;
  text-align: center;
  max-width: calc(100vw - 32px);
}

#place-banner.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── Form Overlay ── */
#form-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

#form-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* ── Form Modal ── */
#form-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 1002;
  background: rgba(8, 23, 8, 0.84);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: min(420px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-bounce);
}

#form-modal.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.form-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.form-category-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-category-badge svg {
  width: 24px;
  height: 24px;
}

.form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.form-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: all var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--green-500);
  background: rgba(76, 175, 80, 0.06);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  flex: 1;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.3px;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: white;
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(76, 175, 80, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-light);
}

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 40px);
}

.toast {
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green-200);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  animation: toast-in 0.4s ease-out, toast-out 0.4s ease-in 2.6s forwards;
}

/* ── Custom Leaflet Popup ── */
.leaflet-popup-content-wrapper {
  background: rgba(8, 23, 8, 0.84) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  min-width: 230px !important;
}

.leaflet-popup-tip {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: var(--shadow-sm) !important;
}

.leaflet-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 22px !important;
  top: 6px !important;
  right: 8px !important;
  width: 28px !important;
  height: 28px !important;
}

.leaflet-popup-close-button:hover {
  color: var(--text) !important;
}

/* Popup Content */
.popup-content {
  overflow: hidden;
}

.popup-body {
  padding: 18px;
}

/* Popup Image (photo) */
.popup-image {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.popup-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.popup-badge svg {
  width: 20px;
  height: 20px;
}

.popup-cat-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.popup-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.popup-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.popup-info {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.popup-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.popup-label {
  color: var(--text-muted);
  font-weight: 600;
  min-width: 58px;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.popup-value {
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

.popup-collect-btn {
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--gold), #A07A28);
  color: white;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.3px;
}

.popup-collect-btn:hover {
  box-shadow: 0 4px 16px rgba(200, 169, 81, 0.35);
  transform: translateY(-1px);
}

.popup-collect-btn:active {
  transform: translateY(0);
}

/* Owner Actions in Popup */
.popup-owner-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.popup-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.popup-edit-btn {
  background: rgba(76, 175, 80, 0.15);
  color: var(--green-300);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.popup-edit-btn:hover {
  background: rgba(76, 175, 80, 0.25);
  border-color: rgba(76, 175, 80, 0.5);
}

.popup-delete-btn {
  background: rgba(239, 83, 80, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 83, 80, 0.25);
}

.popup-delete-btn:hover {
  background: rgba(239, 83, 80, 0.2);
  border-color: rgba(239, 83, 80, 0.4);
}

.popup-owner-tag {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ── Photo Upload (Form) ── */
.label-optional {
  text-transform: none;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

.photo-upload {
  position: relative;
  width: 100%;
  min-height: 100px;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
}

.photo-upload:hover {
  border-color: var(--green-500);
  background: rgba(76, 175, 80, 0.04);
}

.photo-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--text-muted);
}

.photo-upload-placeholder svg {
  opacity: 0.5;
}

.photo-upload-placeholder span {
  font-size: 13px;
  font-weight: 500;
}

.photo-preview {
  display: none;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}

.photo-remove-btn {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  line-height: 1;
  z-index: 2;
}

.photo-remove-btn:hover {
  background: var(--danger);
  transform: scale(1.1);
}

/* ── Custom Map Markers ── */
.custom-marker {
  background: none !important;
  border: none !important;
}

.marker-wrapper {
  position: relative;
  animation: marker-drop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.marker-pin {
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
  border: 3px solid rgba(255, 255, 255, 0.92);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.marker-pin:hover {
  transform: rotate(-45deg) scale(1.18);
}

.marker-icon {
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.marker-icon svg {
  width: 20px;
  height: 20px;
}

.marker-shadow {
  width: 18px;
  height: 5px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  margin: 5px auto 0;
}

/* ── Place Mode Cursor ── */
#map.place-mode {
  cursor: crosshair !important;
}

#map.place-mode .leaflet-grab {
  cursor: crosshair !important;
}

#map.place-mode .leaflet-interactive {
  cursor: crosshair !important;
}

/* ── Leaflet Control Overrides ── */
.leaflet-top {
  top: 152px !important;
  transition: top var(--transition);
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--bg-panel) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  font-size: 17px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-glass) !important;
  color: var(--green-400) !important;
}

.leaflet-control-attribution {
  display: none !important;
}

.leaflet-control-attribution a {
  color: var(--text-secondary) !important;
}

/* ── Animations ── */
@keyframes pulse-grow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(76, 175, 80, 0.45), 0 8px 24px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 0 4px 36px rgba(76, 175, 80, 0.65), 0 8px 24px rgba(0, 0, 0, 0.4); }
}

@keyframes loading-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

@keyframes marker-drop {
  0% { transform: translateY(-40px); opacity: 0; }
  60% { transform: translateY(5px); opacity: 1; }
  100% { transform: translateY(0); }
}

@keyframes toast-in {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes toast-out {
  0% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-12px); }
}

/* ── Legal Footer ── */
#app-footer {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  padding: 6px 18px;
  border-radius: 30px;
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  pointer-events: auto;
  transition: all var(--transition);
}

#app-footer a {
  color: var(--gold-light);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

#app-footer a:hover {
  color: var(--green-300);
}

/* ── Information Modal ── */
#info-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 1002;
  background: rgba(8, 23, 8, 0.84);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-bounce);
}

#info-modal.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.info-content-wrapper {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.info-content-wrapper h3 {
  font-size: 15px;
  color: var(--green-300);
  margin: 18px 0 8px;
  font-weight: 600;
}

.info-content-wrapper p {
  margin-bottom: 12px;
}

.info-content-wrapper ul {
  margin-left: 20px;
  margin-bottom: 14px;
}

.info-content-wrapper li {
  margin-bottom: 6px;
}

/* ── Category Filter Bar ── */
#filter-bar {
  position: fixed;
  top: 92px;
  left: 16px;
  right: 16px;
  z-index: 999;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}

#filter-bar::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.filter-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.filter-pill-icon svg {
  width: 14px;
  height: 14px;
}

.filter-pill:hover {
  background: var(--bg-glass);
  color: var(--green-300);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: white;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(67, 160, 71, 0.25);
}

/* ── Ethical Ads Styling ── */
#ethical-ad-container {
  margin-top: 20px;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}

.ad-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition);
}

.ad-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-light);
}

.ad-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.ad-inner {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ad-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 8px rgba(76, 175, 80, 0.25));
}

.ad-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ad-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.ad-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Admin Panel Styling ── */
#admin-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 1002;
  background: rgba(8, 23, 8, 0.84);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(200, 169, 81, 0.15), var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-bounce);
}

#admin-panel.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.admin-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  transition: transform var(--transition);
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
}

.stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Joyful Animated Pins ── */
.marker-wrapper {
  position: relative;
  animation: marker-bounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes marker-bounce {
  0% { transform: scale(0) translateY(-60px); opacity: 0; }
  60% { transform: scale(1.15) translateY(5px); opacity: 1; }
  80% { transform: scale(0.92) translateY(-2px); }
  100% { transform: scale(1) translateY(0); }
}

.marker-pin {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Collected Marker Styling ── */
.marker-collected {
  opacity: 0.6;
  filter: saturate(0.5) contrast(0.9);
}

.badge-collected {
  background: rgba(76, 175, 80, 0.15) !important;
  border: 1px solid var(--green-500) !important;
  color: var(--green-300) !important;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  vertical-align: middle;
}

.popup-collected-status {
  background: rgba(76, 175, 80, 0.12);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: var(--green-300);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
}

/* Gentle floating balloon idle effect on markers */
.custom-marker:hover .marker-pin {
  transform: rotate(-45deg) scale(1.18) translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: balloon-float 1.8s ease-in-out infinite alternate;
}

@keyframes balloon-float {
  0% { transform: rotate(-45deg) scale(1.18) translateY(-4px); }
  100% { transform: rotate(-43deg) scale(1.18) translateY(-10px); }
}

/* ── Map Vignette Effect ── */
#map-vignette {
  position: fixed;
  inset: 0;
  z-index: 650; /* Floating above map layers (tiles, markers) but below popups, controls, and UI overlays */
  pointer-events: none; /* Allow clicks to pass through to Leaflet map */
  background: radial-gradient(
    circle, 
    transparent 45%, 
    rgba(5, 14, 5, 0.12) 70%, 
    rgba(5, 14, 5, 0.45) 90%, 
    rgba(5, 14, 5, 0.65) 100%
  );
  box-shadow: inset 0 0 80px rgba(5, 14, 5, 0.68);
  transition: all var(--transition);
}

/* ── Watering Can Custom Cursors ── */
#map {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%23A5D6A7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M5 16c0 2.2 1.8 4 4 4h4c2.2 0 4-1.8 4-4v-5c0-2.2-1.8-3-4-3H9c-2.2 0-4 .8-4 3v5z' fill='rgba(165,214,167,0.15)'/><path d='M17 12l4.5-4.5'/><path d='M21 6.5l1 1'/><path d='M20.5 6l1 1'/><path d='M9 8c0-3 3-4 4-4s4 2 4 5v5'/><circle cx='23' cy='4' r='0.5' fill='%23A5D6A7'/><circle cx='21' cy='3' r='0.5' fill='%23A5D6A7'/></svg>") 33 6, auto;
}

#map.place-mode {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%23DFC77A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M5 16c0 2.2 1.8 4 4 4h4c2.2 0 4-1.8 4-4v-5c0-2.2-1.8-3-4-3H9c-2.2 0-4 .8-4 3v5z' fill='rgba(223,199,122,0.15)'/><path d='M17 12l4.5-4.5'/><path d='M21 6.5l1 1'/><path d='M20.5 6l1 1'/><path d='M9 8c0-3 3-4 4-4s4 2 4 5v5'/><circle cx='23' cy='4' r='0.5' fill='%23DFC77A'/><circle cx='21' cy='3' r='0.5' fill='%23DFC77A'/></svg>") 33 6, crosshair !important;
}

/* Ensure grab cursors are overridden so custom cursor is active */
#map.place-mode .leaflet-grab,
#map.place-mode .leaflet-interactive,
#map.place-mode .leaflet-container {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%23DFC77A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M5 16c0 2.2 1.8 4 4 4h4c2.2 0 4-1.8 4-4v-5c0-2.2-1.8-3-4-3H9c-2.2 0-4 .8-4 3v5z' fill='rgba(223,199,122,0.15)'/><path d='M17 12l4.5-4.5'/><path d='M21 6.5l1 1'/><path d='M20.5 6l1 1'/><path d='M9 8c0-3 3-4 4-4s4 2 4 5v5'/><circle cx='23' cy='4' r='0.5' fill='%23DFC77A'/><circle cx='21' cy='3' r='0.5' fill='%23DFC77A'/></svg>") 33 6, crosshair !important;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  #app-header {
    top: 10px;
    left: 10px;
    right: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    gap: 10px;
  }

  .header-logo { font-size: 26px; }
  .header-title { font-size: 16px; }
  .header-subtitle { display: none; }
  .header-count { font-size: 10px; padding: 4px 10px; }

  #fab {
    bottom: 24px;
    right: 16px;
    width: 56px;
    height: 56px;
  }

  #fab svg { width: 24px; height: 24px; }

  #locate-btn {
    bottom: 24px;
    left: 16px;
    width: 42px;
    height: 42px;
  }

  .category-grid { gap: 8px; }
  .category-btn { padding: 14px 4px 10px; gap: 8px; }
  .category-icon { width: 46px; height: 46px; }
  .category-icon svg { width: 24px; height: 24px; }
  .category-label { font-size: 11px; }

  #form-modal { padding: 22px 18px; }
  .form-title { font-size: 16px; }

  #place-banner {
    top: 126px;
    font-size: 13px;
    padding: 10px 18px;
  }

  .leaflet-top {
    top: 126px !important;
  }

  #app-footer {
    gap: 8px;
    padding: 5px 12px;
    bottom: 10px;
    font-size: 10px;
  }

  #app-footer .footer-text {
    display: none;
  }

  #filter-bar {
    top: 68px;
    left: 10px;
    right: 10px;
    gap: 6px;
    padding: 2px;
  }

  .filter-pill {
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* ── Neighborhood Selector in Header ── */
.header-neighborhood-selector {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--gold-light);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.header-neighborhood-selector:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-light);
  transform: scale(1.04);
}

.header-neighborhood-selector:active {
  transform: scale(0.96);
}

/* ── Toggle Switch (Form Checkbox) ── */
.form-checkbox-group {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.toggle-switch-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  font-size: 13px !important;
  color: var(--text-secondary);
}

.toggle-switch-container input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 22px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  position: relative;
  transition: background-color 0.25s, border-color 0.25s;
  display: inline-block;
  vertical-align: middle;
}

.toggle-slider::after {
  content: '';
  width: 14px;
  height: 14px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  position: absolute;
  top: 2.5px;
  left: 3px;
  transition: transform 0.25s, background-color 0.25s;
}

.toggle-switch-container input:checked + .toggle-slider {
  background-color: rgba(76, 175, 80, 0.22);
  border-color: var(--green-500);
}

.toggle-switch-container input:checked + .toggle-slider::after {
  transform: translateX(21px);
  background-color: var(--green-300);
}

.toggle-label {
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0px !important;
}

/* ── Tabbed View inside Info Modal ── */
.info-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.info-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  font-family: inherit;
}

.info-tab-btn.active {
  color: var(--green-400);
}

.info-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -9.5px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--green-500);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--green-400);
}

.tab-content {
  display: none;
  animation: tab-fade-in 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes tab-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Notice Board ── */
.notices-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.notice-placeholder {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 24px 12px;
  font-style: italic;
}

.notice-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: transform var(--transition);
}

.notice-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
  background: rgba(255, 255, 255, 0.05);
}

.notice-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.notice-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
}

.notice-card-date {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

.notice-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.notice-card-author {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
}

/* Preset buttons inside selector sheets */
.preset-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
}

.preset-btn.active {
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: white;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(67, 160, 71, 0.2);
}

/* Category grid adjustments for 2 new hubs */
.category-btn[data-category="hub"] .category-icon {
  background: rgba(255, 179, 0, 0.18);
  border: 2px solid rgba(255, 179, 0, 0.4);
}
.category-btn[data-category="hub"]:hover {
  border-color: rgba(255, 179, 0, 0.5);
  box-shadow: 0 4px 16px rgba(255, 179, 0, 0.15);
}

.category-btn[data-category="library"] .category-icon {
  background: rgba(0, 172, 193, 0.18);
  border: 2px solid rgba(0, 172, 193, 0.4);
}
.category-btn[data-category="library"]:hover {
  border-color: rgba(0, 172, 193, 0.5);
  box-shadow: 0 4px 16px rgba(0, 172, 193, 0.15);
}

/* ══════════════════════════════════
   ♿ HANDICAP ACCESSIBILITY OVERRIDES
   ══════════════════════════════════ */

body.handicap-mode {
  /* Elevate standard variables for maximum contrast */
  --text: #ffffff;
  --text-secondary: #c8e6c9;
  --text-muted: #a5d6a7;
  --border: rgba(255, 255, 255, 0.35);
  --border-light: rgba(255, 255, 255, 0.6);
}

/* Large typography & maximum contrast weight */
body.handicap-mode p,
body.handicap-mode span,
body.handicap-mode label,
body.handicap-mode button,
body.handicap-mode input,
body.handicap-mode textarea,
body.handicap-mode a {
  font-weight: 600 !important; /* Extremely bold, easy-to-read text */
  letter-spacing: 0.2px !important;
}

/* Base text scaling */
body.handicap-mode .header-title {
  font-size: 22px !important;
}

body.handicap-mode .header-subtitle {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
}

body.handicap-mode .header-neighborhood-selector {
  font-size: 13.5px !important;
  padding: 8px 18px !important;
  border-width: 2px !important;
}

body.handicap-mode .header-count {
  font-size: 13px !important;
  padding: 6px 14px !important;
  border-width: 2px !important;
}

/* Enlarge filter bar & pills for large tap targets */
body.handicap-mode #filter-bar {
  top: 86px !important;
  gap: 10px !important;
  padding: 6px !important;
  border-width: 2px !important;
}

body.handicap-mode .filter-pill {
  padding: 10px 20px !important;
  font-size: 14px !important;
  border-width: 2.5px !important;
}

/* Large bottom sheet categories and buttons */
body.handicap-mode .category-btn {
  padding: 24px 10px 18px !important;
  border-width: 3px !important;
}

body.handicap-mode .category-label {
  font-size: 14px !important;
}

body.handicap-mode .category-icon {
  width: 62px !important;
  height: 62px !important;
  font-size: 32px !important;
}

/* Enlarged forms & input fields */
body.handicap-mode .form-title {
  font-size: 22px !important;
}

body.handicap-mode .form-subtitle {
  font-size: 14px !important;
}

body.handicap-mode .form-group label {
  font-size: 14px !important;
  margin-bottom: 10px !important;
}

body.handicap-mode .form-group input,
body.handicap-mode .form-group textarea {
  font-size: 16px !important;
  padding: 16px 20px !important;
  border-width: 2px !important;
}

body.handicap-mode .btn {
  font-size: 16px !important;
  padding: 16px 24px !important;
  border-radius: var(--radius-sm) !important;
}

/* Large custom leaflet popups */
body.handicap-mode .leaflet-popup-content {
  font-size: 16px !important;
  line-height: 1.6 !important;
}

body.handicap-mode .popup-cat-name {
  font-size: 18px !important;
}

body.handicap-mode .popup-time {
  font-size: 12px !important;
}

body.handicap-mode .popup-desc {
  font-size: 15px !important;
}

body.handicap-mode .popup-row {
  font-size: 14px !important;
  margin-bottom: 4px !important;
}

body.handicap-mode .popup-label {
  font-size: 11px !important;
  min-width: 72px !important;
}

body.handicap-mode .popup-collect-btn,
body.handicap-mode .popup-btn {
  font-size: 15px !important;
  padding: 14px !important;
}

body.handicap-mode .popup-communal-tag {
  font-size: 13px !important;
  padding: 10px !important;
}

/* Larger floating buttons */
body.handicap-mode #fab {
  width: 76px !important;
  height: 76px !important;
}

body.handicap-mode .fab-icon {
  font-size: 34px !important;
}

body.handicap-mode #locate-btn,
body.handicap-mode #accessibility-btn {
  width: 58px !important;
  height: 58px !important;
  font-size: 24px !important;
}

body.handicap-mode #accessibility-btn {
  bottom: 108px !important;
}

/* Enlarge Notice board cards inside the modal */
body.handicap-mode .notice-card-title {
  font-size: 16px !important;
}

body.handicap-mode .notice-card-date {
  font-size: 11px !important;
}

body.handicap-mode .notice-card-desc {
  font-size: 14.5px !important;
}

body.handicap-mode .notice-card-author {
  font-size: 12px !important;
}

/* Enlarge map marker pins for easy tapping */
body.handicap-mode .marker-pin {
  width: 64px !important;
  height: 64px !important;
  border-width: 4.5px !important;
}

body.handicap-mode .marker-icon {
  font-size: 32px !important;
}

body.handicap-mode .marker-shadow {
  width: 28px !important;
  height: 8px !important;
}

/* 🚭 ── REDUCED MOTION OVERRIDES ── */
body.handicap-mode *,
body.handicap-mode *::before,
body.handicap-mode *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
  scroll-behavior: auto !important;
}

/* 🌳 ── Vignette Toggling Class ── */
.vignette-hidden #map-vignette {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* 🌿 ── Welcome / Onboarding Overlay ── */
#welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: #050e05; /* Deep rich forest green background */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#welcome-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.welcome-card {
  position: relative;
  background: rgba(8, 23, 8, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  padding: 38px 24px 32px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.welcome-header {
  margin-bottom: 24px;
}

.welcome-logo {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.welcome-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.welcome-tagline {
  font-size: 12.5px;
  color: var(--text-muted);
}

.welcome-slides {
  position: relative;
  width: 100%;
  min-height: 380px;
  margin-bottom: 16px;
  display: flex;
  overflow: hidden;
}

.welcome-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px);
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.welcome-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.welcome-slide.prev-slide {
  transform: translateX(-40px);
}

.welcome-illustration {
  height: 220px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-illustration img {
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.welcome-illustration svg {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 2px 8px rgba(165, 214, 167, 0.2));
}

.welcome-slide h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--green-300);
  margin-bottom: 10px;
}

.welcome-slide p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  padding: 0 10px;
}

.welcome-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.welcome-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.welcome-dots .dot.active {
  background: var(--green-400);
  transform: scale(1.2);
}

.welcome-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.welcome-actions button {
  flex: 1;
  padding: 12px 18px;
  font-size: 14.5px;
}

/* 🎨 ── Whimsical Map Scribble Markers ── */
.map-scribble-marker {
  background: none !important;
  border: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  pointer-events: auto !important;
}

.map-scribble-content {
  width: 100%;
  height: 100%;
  transition: transform 0.2s ease;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.map-scribble-content:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
}

/* Scribble Micro-Animations */
.scribble-anim-float {
  animation: scribble-float 5s ease-in-out infinite;
}

.scribble-anim-sway {
  animation: scribble-sway 6s ease-in-out infinite;
  transform-origin: bottom center;
}

.scribble-anim-breathe {
  animation: scribble-breathe 4s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes scribble-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes scribble-sway {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(3deg) scale(1.02);
  }
}

@keyframes scribble-breathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Custom styles for the scribble popups */
.scribble-popup .leaflet-popup-content-wrapper {
  border: 1px dashed var(--gold-light) !important;
  background: rgba(8, 23, 8, 0.96) !important;
  border-radius: var(--radius-sm) !important;
}

.scribble-popup-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.scribble-popup-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  font-style: italic;
}

/* 🧺 ── Whimsical Harvest Trail Styles ── */
.popup-directions-btn {
  background: linear-gradient(135deg, #1976D2, #1565C0) !important;
  color: white !important;
  border: none !important;
  font-size: 11px !important;
  padding: 6px 12px !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.popup-directions-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.4);
}

.popup-trail-btn {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
  font-size: 11px !important;
  padding: 6px 12px !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
}
.popup-trail-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--border-light) !important;
}
.popup-trail-btn.active {
  background: rgba(200, 169, 81, 0.12) !important;
  color: var(--gold-light) !important;
  border-color: var(--border-light) !important;
}

#floating-trail-pill {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: linear-gradient(135deg, #b89a42, var(--gold));
  color: #050e05;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 12.5px;
  box-shadow: 0 4px 16px rgba(200, 169, 81, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-bounce);
  pointer-events: auto;
  animation: fab-pulse 3s ease-in-out infinite;
}
#floating-trail-pill:hover {
  transform: translateX(-50%) scale(1.06);
  box-shadow: 0 6px 20px rgba(200, 169, 81, 0.55);
}
#floating-trail-pill.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(30px);
}

#harvest-trail-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  background: rgba(8, 23, 8, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 16px 16px 36px;
  transform: translateY(100%);
  transition: transform var(--transition-bounce);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
}
#harvest-trail-panel.visible {
  transform: translateY(0);
}

.trail-stop-card {
  flex: 0 0 160px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: all var(--transition);
}
.trail-stop-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-light);
}
.trail-stop-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  background: var(--gold);
  color: #050e05;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #081708;
}
.trail-stop-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trail-stop-meta {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trail-stop-remove {
  font-size: 10px;
  color: var(--danger);
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  padding: 0;
  width: max-content;
  font-weight: 500;
  transition: opacity var(--transition);
}
.trail-stop-remove:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* 🛡️ ── Admin Moderation Dashboard Styles ── */
.admin-moderation-section {
  margin-top: 24px;
  border-top: 1px dashed var(--border);
  padding-top: 18px;
}

.admin-moderation-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-audit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
  padding: 8px;
}

.admin-audit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  gap: 12px;
  transition: all var(--transition);
}

.admin-audit-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-light);
}

.admin-audit-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-audit-desc {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-audit-meta {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-audit-delete-btn {
  background: rgba(239, 83, 80, 0.1) !important;
  color: var(--danger) !important;
  border: 1px solid rgba(239, 83, 80, 0.3) !important;
  padding: 6px 12px !important;
  font-size: 10.5px !important;
  border-radius: 20px !important;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 700;
  flex-shrink: 0;
}

.admin-audit-delete-btn:hover {
  background: var(--danger) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(239, 83, 80, 0.3);
  transform: scale(1.03);
}

/* ── Chat & Messaging UI ── */
.chats-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-thread-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.chat-thread-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.chat-thread-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.chat-thread-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread-lastmsg {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-thread-time {
  font-size: 9.5px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 8px;
}

.chat-thread-badge {
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  margin-left: 8px;
}

/* Chat Message Bubbles */
.message-bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.45;
  word-break: break-word;
  position: relative;
}

.message-bubble.incoming {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
}

.message-bubble.outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: white;
  border-bottom-right-radius: 2px;
}

.message-time {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
  text-align: right;
  display: block;
}

.message-bubble.incoming .message-time {
  color: var(--text-muted);
}

/* ── Listing Reservation Styles ── */
.badge-reserved {
  background: rgba(239, 83, 80, 0.15) !important;
  border: 1px solid var(--danger) !important;
  color: var(--danger) !important;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  vertical-align: middle;
}

.popup-reserved-status {
  background: rgba(239, 83, 80, 0.08);
  border: 1px solid rgba(239, 83, 80, 0.3);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
}

.popup-reserve-btn {
  background: linear-gradient(135deg, var(--gold), #8A6D28) !important;
  color: white !important;
}

.popup-reserve-btn.active {
  background: linear-gradient(135deg, var(--danger), #B71C1C) !important;
}
