* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; }
#map { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; }

#topbar {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 500;
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: none;
}
#app-title {
  background: rgba(20, 30, 20, 0.85); color: #fff; font-weight: 700;
  padding: 8px 14px; border-radius: 10px; font-size: 15px; pointer-events: auto;
}
#gps-btn {
  pointer-events: auto; width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(20, 30, 20, 0.85); color: #fff;
  font-size: 22px; cursor: pointer; flex: 0 0 auto;
}
#search-wrap { position: relative; flex: 1; margin: 0 8px; pointer-events: auto; }
#addr-search {
  width: 100%; padding: 10px 12px; font-size: 15px; border: none;
  border-radius: 10px; background: rgba(255,255,255,0.95); outline: none;
}
#search-results {
  display: none; position: absolute; top: 46px; left: 0; right: 0;
  background: #fff; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  overflow: hidden; max-height: 260px; overflow-y: auto;
}
.sr-item { padding: 10px 12px; font-size: 14px; border-bottom: 1px solid #eee; cursor: pointer; }
.sr-item:last-child { border-bottom: none; }
.sr-item:active { background: #eef6ee; }

#sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 500;
  background: #fff; border-top-left-radius: 14px; border-top-right-radius: 14px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.25); max-height: 46%; display: flex; flex-direction: column;
}
#sheet-tabs { display: flex; border-bottom: 1px solid #ddd; }
#sheet-tabs .tab {
  flex: 1; padding: 12px; border: none; background: #f4f4f4; font-size: 15px;
  font-weight: 600; cursor: pointer; color: #444;
}
#sheet-tabs .tab.active { background: #fff; color: #1a5c1a; border-bottom: 3px solid #1a5c1a; }
#sheet-body { overflow-y: auto; padding: 12px 14px 20px; }
.tabpane { display: none; }
.tabpane.active { display: block; }

.row { display: flex; gap: 12px; margin-bottom: 10px; }
.row label { font-size: 13px; font-weight: 600; color: #555; display: flex; flex-direction: column; gap: 4px; }
.row select, .row input[type="date"] {
  font-size: 15px; padding: 8px; border: 1px solid #ccc; border-radius: 8px; min-width: 0;
}
#wmu-banner {
  background: #eef6ee; border: 1px solid #bcd8bc; border-radius: 8px;
  padding: 8px 10px; font-size: 14px; margin-bottom: 10px; font-weight: 600; color: #1a5c1a;
}
.season {
  border: 1px solid #e0e0e0; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px;
}
.season.now { border-color: #1a5c1a; background: #f2faf2; }
.season .s-head { font-weight: 700; font-size: 14px; }
.season .s-method { font-size: 13px; color: #555; }
.season .s-dates { font-size: 13px; margin-top: 4px; }
.season .s-tag {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 10px; margin-left: 6px; vertical-align: middle;
}
.season .s-tag.open { background: #1a5c1a; color: #fff; }
.season .s-tag.soon { background: #e8a100; color: #fff; }
.season .s-tag.closed { background: #ccc; color: #555; }
.species-bar {
  display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.species-bar::-webkit-scrollbar { display: none; }
.sp-chip {
  flex: 0 0 auto; padding: 6px 12px; border-radius: 999px;
  border: 1px solid #2e7d32; background: #fff; color: #2e7d32;
  font-size: 13px; cursor: pointer; white-space: nowrap;
}
.sp-chip.active { background: #2e7d32; color: #fff; }
.offline-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid #ddd; }
.offline-section h4 { margin: 0 0 6px; }
.net-badge {
  font-size: 11px; font-weight: normal; padding: 2px 8px; border-radius: 999px;
  background: #1a5c1a; color: #fff; vertical-align: middle;
}
.net-badge.off { background: #b3261e; }
#offline-save { margin: 6px 0; }
#offline-progress { margin: 4px 0; min-height: 1.2em; }

#hours-output { font-size: 15px; line-height: 1.7; }
#hours-output .big { font-size: 20px; font-weight: 700; color: #1a5c1a; }
#hours-notes { font-size: 13px; color: #555; margin-top: 8px; line-height: 1.5; }

.layer-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 15px; font-weight: 600; }
#basemap-toggle { padding: 8px 14px; font-size: 14px; border-radius: 8px; border: 1px solid #1a5c1a; background: #fff; color: #1a5c1a; font-weight: 700; cursor: pointer; }
.check { display: block; font-size: 15px; margin-bottom: 8px; }
.check input { transform: scale(1.3); margin-right: 8px; }
.disclaimer { font-size: 12px; color: #777; line-height: 1.5; margin-top: 12px; }
.credit { font-size: 11px; color: #999; }

#wx-current { margin-bottom: 10px; }
.wx-big { font-size: 26px; font-weight: 800; }
.wx-sub { font-size: 14px; color: #555; line-height: 1.6; margin-top: 4px; }
#wx-hourly { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; margin-top: 6px; }
.wx-h {
  flex: 0 0 auto; text-align: center; font-size: 12px; background: #f4f7f4;
  border-radius: 8px; padding: 8px 10px; line-height: 1.7;
}
.wx-h .wx-pp { color: #2277ff; font-weight: 700; }

.leaflet-tooltip.wmu-label {
  background: transparent; border: none; box-shadow: none;
  font-weight: 800; font-size: 13px; color: #0d3b0d;
  text-shadow: 1px 1px 2px #fff, -1px -1px 2px #fff, 1px -1px 2px #fff, -1px 1px 2px #fff;
}
.leaflet-tooltip.wmu-label.wmu5c { color: #b30000; font-size: 15px; }
.leaflet-popup-content { font-size: 13px; line-height: 1.5; }
.leaflet-popup-content b { font-size: 14px; }

/* harvest tab */
#hv-species, #hv-method, #hv-wmu, #hv-name, #hv-caption, #hv-photo {
  padding: 8px; border: 1px solid #ccc; border-radius: 8px; font-size: 14px;
  background: #fff; max-width: 100%;
}
.hv-btn {
  background: #2e7d32; color: #fff; border: none; border-radius: 10px;
  padding: 10px 18px; font-size: 15px; font-weight: 700; margin: 6px 0 4px;
}
.hv-btn:disabled { opacity: .5; }
#hv-status { font-size: 13px; margin: 6px 0; min-height: 18px; }
#hv-status.ok { color: #2e7d32; }
#hv-status.err { color: #b30000; }
#cl-status { font-size: 13px; margin: 6px 0; min-height: 18px; }
#cl-status.ok { color: #2e7d32; }
#cl-status.err { color: #b30000; }
#cl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.gauge-legend { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 2px; font-size: 12px; }
.gauge-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 3px; }
.hv-card { background: #fff; border: 1px solid #e2e2e2; border-radius: 10px; overflow: hidden; }
.hv-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #eee; }
.hv-card .hv-meta { padding: 8px 10px; font-size: 12px; color: #444; }
.hv-card .hv-meta strong { font-size: 13px; color: #111; }
.hv-card .hv-cap { padding: 0 10px 10px; font-size: 12px; color: #666; font-style: italic; }
.s-orange { font-size: 12px; color: #b36a00; margin-top: 4px; }
.wx-wind { font-size: 11px; color: #666; }
.pin-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #eee; font-size: 13px; }
.pin-row button { padding: 4px 12px; border-radius: 8px; border: 1px solid #ccc; background: #fff; }
#pin-drop { padding: 8px 14px; border-radius: 10px; border: 1px solid #2e7d32; background: #e8f5e9; color: #1b5e20; font-weight: 600; }

/* map loading indicator (removed once the map initializes) */
#map-loading {
  position: absolute; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  background: #0e2a12; color: #cfe8d2;
  font-size: 17px; letter-spacing: 0.5px;
}

/* animated radar timestamp chip */
.radar-time {
  background: rgba(20, 20, 20, 0.72); color: #fff;
  font-size: 12px; padding: 3px 9px; border-radius: 10px;
  margin: 0 0 24px 8px; pointer-events: none;
}
