@import "theme.css";

* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
}

/* Auto-hiding scrollbars for small internal panels only (modals, photo
   strips): invisible at rest, a thin rounded bar on hover/scroll. */
.modal,
.edible-photo-strip {
  scrollbar-width: none;
}

.modal:hover, .modal:focus-within,
.edible-photo-strip:hover, .edible-photo-strip:focus-within {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
}

.modal::-webkit-scrollbar,
.edible-photo-strip::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}

.modal::-webkit-scrollbar-thumb,
.edible-photo-strip::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
}

.modal:hover::-webkit-scrollbar-thumb, .modal:active::-webkit-scrollbar-thumb,
.edible-photo-strip:hover::-webkit-scrollbar-thumb, .edible-photo-strip:active::-webkit-scrollbar-thumb {
  background: rgba(85, 107, 47, 0.35);
}

/* Page scrollbar: permanent and discreet, and flush against the real edge
   of the screen — the scroll container is the full-width `.page`, not the
   inset centered `.page-content` box, and it never appears/disappears so
   it can't shift the layout. */
.page {
  scrollbar-width: thin;
  scrollbar-color: rgba(85, 107, 47, 0.35) transparent;
}

.page::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}

.page::-webkit-scrollbar-thumb {
  background: rgba(85, 107, 47, 0.35);
  border-radius: 999px;
}

.page::-webkit-scrollbar-thumb:hover {
  background: rgba(85, 107, 47, 0.55);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
}

/* Navigation Bar */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: var(--shadow-md);
  z-index: 2000;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 600;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  color: var(--color-accent-contrast);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hamburger-btn {
  display: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger-btn span {
  width: 20px;
  height: 2px;
  background: var(--color-accent-contrast);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--nav-height);
  right: 0;
  min-width: 220px;
  background: #1c1f16;
  box-shadow: var(--shadow-lg);
  z-index: 1999;
}

.nav-mobile-menu.open {
  display: flex;
}

.nav-mobile-menu .nav-link {
  color: #fdfcf8;
  border-radius: 0;
  padding: 14px 20px;
}

.nav-mobile-menu .nav-link:hover,
.nav-mobile-menu .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.22);
  font-weight: 600;
}

/* Page container */
.page {
  display: none;
  padding-top: var(--nav-height);
  height: 100vh;
  width: 100%;
  overflow-y: auto;
}

.page.active {
  display: block;
}

/* Map page specific */
#map-page {
  padding-top: 0;
}

#map-page #map {
  height: 100vh;
  width: 100%;
  padding-top: var(--nav-height);
  background: var(--color-bg);
}

/* "My location" map control — Leaflet's topright corner is flush with
   the very top of #map, which sits directly under the fixed navbar
   (z-index 2000); without this the control renders underneath it and
   the navbar swallows the click. */
.locate-control {
  margin-top: calc(var(--nav-height) + 12px) !important;
}

.locate-control-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.locate-control-btn.active {
  color: #4285f4;
}

/* "My location" dot + heading cone (the divIcon built in mapConfig.js).
   The cone starts hidden and is only revealed once a real device
   orientation reading comes in, via its own inline style.display. */
.locate-dot-icon .locate-heading {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  transform-origin: center center;
  pointer-events: none;
}

.locate-dot-icon .locate-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  background: #4285f4;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Map controls (season filter + basemap toggle) */
#map-controls {
  position: absolute;
  top: calc(var(--nav-height) + 12px);
  left: 12px;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

#filter-container {
  background: var(--color-surface);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

#filter-container label {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
}

#season-filter {
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

#basemap-toggle {
  display: flex;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 4px;
  gap: 4px;
}

#basemap-toggle button {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-text-muted);
  cursor: pointer;
}

#basemap-toggle button:hover {
  color: var(--color-text);
}

#basemap-toggle button.active {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

/* "Showing: <fruit> only" badge, shown when Find on Map filters the map
   down to a single species. */
#type-filter-badge {
  display: none;
  position: absolute;
  top: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding: 8px 8px 8px 16px;
  border-radius: 30px;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

#clearTypeFilterBtn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: inherit;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

#clearTypeFilterBtn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Non-blocking substitute for alert() when a fetch fails — a real dialog
   would freeze the page for every visitor until dismissed. */
#load-error-banner {
  display: none;
  position: absolute;
  top: calc(var(--nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-danger);
  color: var(--color-accent-contrast);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 1600;
  font-size: 14px;
  font-weight: 600;
  max-width: 90vw;
  text-align: center;
}

/* Content pages */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Gallery-style pages (Fruit Gallery, Edible Plants) get a wider column so
   cards can lay out four-across on a typical desktop instead of three. */
.page-content.wide {
  max-width: 1300px;
}

.page-content h1 {
  color: var(--color-primary);
  margin-bottom: 8px;
  font-size: 32px;
}

.page-content h2 {
  color: var(--color-primary);
  margin-top: 32px;
  margin-bottom: 14px;
  font-size: 22px;
}

.page-content h3 {
  color: var(--color-text);
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 17px;
}

.page-content p, .page-content li {
  line-height: 1.6;
  color: var(--color-text);
}

.subtitle {
  color: var(--color-text-muted);
  font-size: 17px;
  margin-bottom: 30px;
}

.empty-state {
  color: var(--color-text-muted);
  font-style: italic;
}

/* About page: a fixed background photo behind everything, so every block
   of content gets its own opaque, rounded card rather than sitting
   directly on the photo. */
#about-page {
  background-image: url('../../site-images/fig_about_page.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.about-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.about-header {
  padding-bottom: 12px;
}

.about-header h1 {
  margin-top: 0;
}

/* About sub-navigation */
.about-subnav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 4px;
}

.about-subnav button {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.about-subnav button:hover {
  background: var(--color-primary-tint);
  color: var(--color-text);
}

.about-subnav button.active {
  background: var(--color-primary-tint);
  color: var(--color-primary);
  font-weight: 600;
}

.about-subpage {
  display: none;
}

.about-subpage.active {
  display: block;
}

/* FAQ items */
.faq-item {
  margin-bottom: 20px;
  padding: 20px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  margin-top: 0;
}

.faq-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.faq-feedback-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.faq-feedback-btn:hover {
  background: var(--color-accent-hover);
}

/* About page: text sections, and a real photo next to the creator bio.
   Each is wrapped in .about-card for an opaque box over the background
   photo — these rules just handle layout within that box. */
.about-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.about-pair .about-section {
  margin-bottom: 0;
}

.about-section h2 {
  margin-top: 0;
}

.about-creator {
  display: flex;
  gap: 32px;
  align-items: center;
}

.about-creator-photo {
  flex: 0 0 320px;
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.about-creator h2 {
  margin-top: 0;
}

@media (max-width: 640px) {
  .about-pair {
    grid-template-columns: 1fr;
  }

  .about-creator {
    flex-direction: column;
  }

  .about-creator-photo {
    flex-basis: auto;
    width: 100%;
    height: auto;
  }
}

/* Fruit Gallery Grid */
#fruit-grid, #edible-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.fruit-card, .edible-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.fruit-card:hover, .edible-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.fruit-card img, .edible-tile img, .edible-tile-placeholder {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: var(--color-primary-tint);
}

.fruit-card-content, .edible-tile-content {
  padding: 16px 18px;
}

.fruit-card h3, .edible-tile-content h3 {
  margin: 0 0 6px 0;
  color: var(--color-primary);
  font-size: 17px;
}

.scientific-name {
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0;
}

.info-button {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-top: 6px;
}

.info-button:hover {
  background: var(--color-primary-hover);
}

/* Report a Sighting button */
#reportSightingBtn {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border: none;
  padding: 13px 22px;
  border-radius: 30px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

#reportSightingBtn:hover {
  background: var(--color-primary-hover);
}

/* Site-wide feedback/bug-report button, stacked directly above the
   coffee button with the same hover-tooltip mechanic. */
.feedback-wrap {
  position: fixed;
  bottom: 84px;
  left: 24px;
  z-index: 2000;
  display: flex;
  align-items: center;
}

.feedback-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.feedback-wrap:hover .feedback-button {
  background: var(--color-accent-hover);
}

.feedback-button svg {
  width: 22px;
  height: 22px;
}

.feedback-tooltip {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  padding: 0;
  margin-left: 0;
  transition: max-width 0.35s ease, opacity 0.3s ease, padding 0.35s ease, margin-left 0.35s ease;
}

.feedback-wrap:hover .feedback-tooltip {
  max-width: 340px;
  opacity: 1;
  padding: 10px 18px;
  margin-left: 12px;
}

/* Buy me a coffee — the tooltip is 0-width/hidden until the wrapper is
   hovered, then slides out to the right from behind the circle. */
.coffee-wrap {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 2000;
  display: flex;
  align-items: center;
}

.coffee-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.coffee-wrap:hover .coffee-button {
  background: var(--color-primary-hover);
}

.coffee-button svg {
  width: 22px;
  height: 22px;
}

.coffee-tooltip {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  padding: 0;
  margin-left: 0;
  transition: max-width 0.35s ease, opacity 0.3s ease, padding 0.35s ease, margin-left 0.35s ease;
}

.coffee-wrap:hover .coffee-tooltip {
  max-width: 340px;
  opacity: 1;
  padding: 10px 18px;
  margin-left: 12px;
}

/* Modals (Report a Sighting, Edible Plant detail) */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-sizing: border-box;
  box-shadow: var(--shadow-lg);
}

.modal.modal-wide {
  max-width: 640px;
}

/* Foraging warning — deliberately louder than the other modals (higher
   z-index, darker scrim, danger-colored border) since this one is a
   safety message, not just informational. */
.warning-modal-overlay {
  z-index: 4000;
  background: rgba(43, 42, 36, 0.72);
}

.warning-modal {
  border: 3px solid var(--color-danger);
  text-align: center;
}

.warning-modal-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 10px;
}

.warning-modal-message {
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  margin: 0;
}

.warning-modal-message strong {
  color: var(--color-danger);
}

.warning-modal-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0;
  font-size: 14px;
  color: var(--color-text-muted);
  cursor: pointer;
}

.warning-modal-dismiss-btn {
  background: var(--color-danger);
  color: var(--color-primary-contrast);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.warning-modal-dismiss-btn:hover {
  background: var(--color-danger-hover);
}

.modal h2 {
  color: var(--color-primary);
  margin-top: 0;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: none;
  font-size: 1.3em;
  cursor: pointer;
  color: var(--color-text-muted);
}

.modal-close:hover {
  color: var(--color-text);
}

.info-box {
  background: var(--color-primary-tint);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-top: 16px;
}

.info-box h4 {
  margin: 0 0 8px 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info-box p {
  margin: 0;
  color: var(--color-text);
  line-height: 1.6;
}

.edible-photo-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
}

.edible-photo-strip img {
  height: 220px;
  width: auto;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  object-fit: cover;
}

.photo-strip-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
}

.photo-credit {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: left;
  overflow-wrap: break-word;
}

.photo-placeholder-lg {
  height: 220px;
  width: 180px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 10px;
}

.ripening-line {
  color: var(--color-text-muted);
  margin: 4px 0 0 0;
}

.find-on-map-btn {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 20px;
}

.find-on-map-btn:hover {
  background: var(--color-accent-hover);
}

.report-mode-toggle {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
}

.report-mode-toggle button {
  flex: 1;
  background: var(--color-primary-tint);
  border: none;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.report-mode-toggle button.active {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  font-weight: 600;
}

#reportForm,
#sharePhotoForm,
#funPhotoForm {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#reportForm label,
#sharePhotoForm label,
#funPhotoForm label {
  font-weight: 600;
  font-size: 14px;
  margin-top: 10px;
  color: var(--color-text);
}

#reportForm select,
#reportForm input[type="text"],
#reportForm input[type="number"],
#reportForm input[type="file"],
#reportForm textarea,
#sharePhotoForm select,
#sharePhotoForm input[type="file"],
#sharePhotoForm textarea,
#funPhotoForm input[type="text"],
#funPhotoForm input[type="file"] {
  padding: 9px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
}

.coord-divider {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  margin: 10px 0 2px;
}

.coord-input-row {
  display: flex;
  gap: 8px;
}

.coord-input-row input {
  flex: 1;
  min-width: 0;
}

#reportForm textarea,
#sharePhotoForm textarea {
  min-height: 60px;
  resize: vertical;
}

#reportNewSpeciesField {
  display: none;
}

#reportLocationStatus {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 4px 0;
}

#pickLocationBtn,
#reportSubmitBtn,
#reportDoneBtn,
#sharePhotoSubmitBtn,
#sharePhotoDoneBtn,
#funPhotoSubmitBtn,
#funPhotoDoneBtn {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border: none;
  padding: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  margin-top: 8px;
}

#pickLocationBtn:hover,
#reportSubmitBtn:hover,
#reportDoneBtn:hover,
#sharePhotoSubmitBtn:hover,
#sharePhotoDoneBtn:hover,
#funPhotoSubmitBtn:hover,
#funPhotoDoneBtn:hover {
  background: var(--color-primary-hover);
}

#reportSuccess,
#sharePhotoSuccess,
#funPhotoSuccess {
  display: none;
  text-align: center;
}

/* Share a Photo entry points */
.modal-subtext {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: -8px 0 16px;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.share-photo-open-btn {
  flex-shrink: 0;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.share-photo-open-btn:hover {
  background: var(--color-accent-hover);
}

.share-photo-link {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  margin: 10px 0 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.67;
  transition: opacity 0.2s ease;
}

.share-photo-link:hover {
  color: var(--color-primary-hover);
  opacity: 1;
}

.community-invite-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

.community-invite-link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* Community Finds gallery */
#community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.community-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.community-tile img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.community-tile-content {
  padding: 14px 16px;
}

.community-caption {
  margin: 0 0 6px 0;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.5;
}

.community-meta {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* Responsive design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger-btn {
    display: flex;
  }

  .nav-brand {
    font-size: 16px;
    line-height: 1.2;
  }

  .nav-brand-line1,
  .nav-brand-line2 {
    display: block;
  }

  .nav-right {
    gap: 10px;
  }

  .about-subnav {
    gap: 2px;
  }

  .about-subnav button {
    font-size: 12px;
    padding: 8px 8px;
  }

  #fruit-grid, #edible-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
