:root {
  --bg: #0f1712;
  --bg-panel: #16211a;
  --bg-panel-alt: #1c2a21;
  --border: #2a3b30;
  --text: #e7efe8;
  --text-dim: #9db3a4;
  --accent: #4fb477;
  --accent-strong: #6fd996;
  --accent-water: #3f92c9;
  --poor: #d5605a;
  --fair: #e0a83e;
  --good: #5bb85e;
  --prime: #38c98f;
  --trophy-gold: #e3b341;
  --quality-green: #4fb477;
  --medium-silver: #a9b8c2;
  --standard-bronze: #c08552;
  --marker-trophy: #e3b341;
  --marker-large: #2ecc71;
  --marker-medium: #2f9bd6;
  --marker-standard: #64748b;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: linear-gradient(90deg, #0d1712, #16261c);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 20;
  position: relative;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.brand-name { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: 0.3px; }
.tagline { margin: 2px 0 0; font-size: 12px; color: var(--text-dim); }

.sidebar-toggle {
  display: none;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 19px;
  line-height: 1;
  padding: 8px 11px;
  border-radius: 10px;
  cursor: pointer;
  margin-right: 4px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}
.sidebar-toggle:active {
  transform: scale(0.95);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pro-btn {
  background: linear-gradient(135deg, #e3b341, #f2d27a);
  color: #241a04;
  border: none;
  padding: 9px 18px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(227, 179, 65, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.pro-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(227, 179, 65, 0.45); }

.pro-btn.pro-active-btn {
  background: var(--bg-panel-alt);
  color: var(--trophy-gold);
  border: 1px solid var(--trophy-gold);
  box-shadow: none;
}

.donate-btn, .auth-btn {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.donate-btn {
  color: var(--fair);
  border-color: rgba(224, 168, 62, 0.4);
}
.donate-btn:hover { border-color: var(--fair); }

.auth-btn:hover { border-color: var(--accent-water); color: var(--accent-water); }

.auth-btn.authed {
  color: var(--accent-strong);
  border-color: rgba(79, 180, 119, 0.4);
  background: rgba(79, 180, 119, 0.12);
  padding: 0;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.auth-btn.authed:hover {
  background: rgba(79, 180, 119, 0.22);
  border-color: var(--accent);
  transform: scale(1.06);
}

.logout-btn {
  color: var(--poor);
  border-color: rgba(213, 96, 90, 0.4);
}
.logout-btn:hover { border-color: var(--poor); }
.logout-btn.hidden { display: none; }

.main-nav {
  display: flex;
  gap: 4px;
  padding: 8px 20px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-tab:hover { color: var(--text); }

.nav-tab.active {
  background: var(--accent);
  color: #08120d;
}

.layout {
  display: flex;
  height: calc(100vh - 106px);
  position: relative;
}

.layout.hidden { display: none; }

.guest-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 18, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.2s ease;
}

.guest-lock-overlay.hidden { display: none; }

.guest-lock-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
}

.guest-lock-icon { font-size: 40px; margin-bottom: 12px; }

.guest-lock-card h2 {
  font-size: 20px;
  margin: 0 0 10px;
}

.guest-lock-card p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 22px;
}

.sidebar {
  width: 320px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filters {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.filter-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  accent-color: var(--trophy-gold);
  cursor: pointer;
}

input, select {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  width: 100%;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

.ad-slot {
  position: relative;
  margin: 0 14px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px 14px 14px;
  text-align: center;
  background: var(--bg-panel-alt);
}

.sponsored-badge {
  position: absolute;
  top: -9px;
  left: 12px;
  background: var(--fair);
  color: #241a04;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 9px;
  border-radius: 10px;
  text-transform: uppercase;
}

.ad-placeholder {
  color: var(--text-dim);
  font-size: 12px;
  padding: 22px 8px;
}

.forecast-ad { margin: 20px 0 0; }

body.pro-active .ad-slot { display: none; }

.lake-count {
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.lake-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.lake-list-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.lake-list-item:hover { background: var(--bg-panel-alt); }
.lake-list-item.active {
  background: #1e3327;
  border-left: 3px solid var(--accent-strong);
}

.lake-list-item .name { font-weight: 600; font-size: 14px; }
.lake-list-item .region { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.lake-list-item .meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
}

.chip {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  color: var(--text-dim);
}

.size-chip {
  font-weight: 700;
  border-width: 1px;
  border-style: solid;
}

.size-chip.size-trophy { color: var(--trophy-gold); border-color: var(--trophy-gold); background: rgba(227, 179, 65, 0.12); }
.size-chip.size-large { color: var(--quality-green); border-color: var(--quality-green); background: rgba(79, 180, 119, 0.12); }
.size-chip.size-medium { color: var(--medium-silver); border-color: var(--medium-silver); background: rgba(169, 184, 194, 0.12); }
.size-chip.size-standard { color: var(--standard-bronze); border-color: var(--standard-bronze); background: rgba(192, 133, 82, 0.12); }

.main {
  flex: 1;
  position: relative;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.pills-bar-wrap {
  overflow-x: auto;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  scrollbar-width: thin;
}

.pills-bar {
  display: flex;
  gap: 8px;
  width: max-content;
}

.pill {
  flex-shrink: 0;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pill:hover { border-color: var(--accent); color: var(--text); }

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #08120d;
}

.pill[data-pill="trophy"].active,
.pill[data-pill="favorites"].active {
  background: var(--trophy-gold);
  border-color: var(--trophy-gold);
}

.pill-count { opacity: 0.8; font-weight: 400; margin-left: 2px; }

#map {
  height: 46vh;
  min-height: 280px;
  width: 100%;
  z-index: 1;
  background: #0a100c;
}

.trout-pin {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.trout-pin.selected { font-size: 16px; border-width: 3px; }

.marker-cluster-bctf {
  background: transparent;
}
.marker-cluster-bctf div {
  background: var(--accent);
  color: #08120d;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  width: 100%;
  height: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.welcome-panel {
  margin: 40px auto;
  max-width: 480px;
  text-align: center;
  color: var(--text-dim);
  padding: 20px;
}

.lake-detail {
  padding: 20px 24px 40px;
  position: relative;
}

.lake-detail.hidden { display: none; }

.close-btn {
  position: absolute;
  top: 14px;
  right: 20px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-header h2 { margin: 0; font-size: 24px; }

.favorite-btn {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.favorite-btn:hover { border-color: var(--trophy-gold); color: var(--trophy-gold); }

.favorite-btn.active {
  background: rgba(227, 179, 65, 0.15);
  border-color: var(--trophy-gold);
  color: var(--trophy-gold);
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.trophy-badge {
  background: rgba(79, 180, 119, 0.15);
  color: var(--accent-strong);
  border: 1px solid rgba(79, 180, 119, 0.4);
}

.detail-region { color: var(--accent-water); margin: 4px 0; font-size: 13px; }
.detail-description { color: var(--text-dim); max-width: 760px; line-height: 1.5; }

.size-highlight-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.size-card {
  background: var(--bg-panel);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.size-card-value {
  font-size: 16px;
  font-weight: 700;
}

.size-card.size-trophy { border-color: var(--trophy-gold); box-shadow: 0 0 0 1px rgba(227, 179, 65, 0.25); }
.size-card.size-trophy .size-card-value { color: var(--trophy-gold); }

.size-card.size-large { border-color: var(--quality-green); box-shadow: 0 0 0 1px rgba(79, 180, 119, 0.25); }
.size-card.size-large .size-card-value { color: var(--quality-green); }

.size-card.size-medium { border-color: var(--medium-silver); box-shadow: 0 0 0 1px rgba(169, 184, 194, 0.2); }
.size-card.size-medium .size-card-value { color: var(--medium-silver); }

.size-card.size-standard { border-color: var(--standard-bronze); box-shadow: 0 0 0 1px rgba(192, 133, 82, 0.2); }
.size-card.size-standard .size-card-value { color: var(--standard-bronze); }

.size-card.cr-active { border-color: var(--trophy-gold); box-shadow: 0 0 0 1px rgba(227, 179, 65, 0.25); }
.size-card.cr-active .size-card-value { color: var(--trophy-gold); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.detail-item {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.detail-item.wide { grid-column: 1 / -1; }

.detail-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.detail-value { font-size: 14px; line-height: 1.5; }

.map-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.map-links a {
  color: var(--accent-water);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.map-links a:hover { text-decoration: underline; }

.directions-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 12px;
  background: var(--accent);
  color: #08120d;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 20px;
  transition: background 0.15s;
}
.directions-btn:hover { background: var(--accent-strong); }

.mu-badge {
  background: rgba(63, 146, 201, 0.15);
  color: var(--accent-water);
  border: 1px solid rgba(63, 146, 201, 0.4);
}

.stocking-value {
  color: var(--accent-strong);
  font-weight: 600;
}

.regulations-item {
  background: rgba(224, 168, 62, 0.08);
  border-color: rgba(224, 168, 62, 0.35);
}

.regulations-value {
  color: var(--fair);
  line-height: 1.5;
}

.rec-site-section {
  margin-top: 22px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.rec-site-section h3 { margin: 0 0 12px; font-size: 16px; }

.rec-site-card {
  background: linear-gradient(160deg, rgba(79, 180, 119, 0.08), var(--bg-panel));
  border: 1px solid rgba(79, 180, 119, 0.35);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.rec-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.rec-site-name { font-size: 15px; font-weight: 700; color: var(--accent-strong); }

.rec-site-campsites {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(79, 180, 119, 0.15);
  border: 1px solid rgba(79, 180, 119, 0.4);
  border-radius: 20px;
  padding: 3px 10px;
}

.rec-site-gps-row { margin-bottom: 14px; }

.rec-site-gps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.rec-site-gps-value { font-size: 14px; font-weight: 600; font-family: "SF Mono", Consolas, monospace; }

.copy-btn {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent-strong); }

.rec-site-facilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.rec-facility-chip {
  background: rgba(79, 180, 119, 0.12);
  border: 1px solid rgba(79, 180, 119, 0.35);
  color: var(--accent-strong);
  font-weight: 600;
}

.rec-site-road-access {
  font-size: 13px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rec-site-road-access .detail-label { margin: 0; }

.rec-site-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rec-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}
.rec-nav-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }

.rec-nav-google {
  background: var(--accent);
  color: #08120d;
}

.rec-nav-apple {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
}

.notes-section {
  margin-top: 22px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.notes-section h3 { margin: 0 0 12px; font-size: 16px; }

.notes-guest-prompt {
  background: var(--bg-panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.notes-guest-prompt p {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.5;
}

.notes-editor textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}
.notes-editor textarea:focus { outline: none; border-color: var(--accent); }

.notes-status {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
  min-height: 14px;
}

.wildfire-section {
  margin-top: 26px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.wildfire-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wildfire-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.wildfire-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wildfire-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.wildfire-status-badge.wildfire-clear {
  background: rgba(79, 180, 119, 0.12);
  color: var(--accent-strong);
  border: 1px solid rgba(79, 180, 119, 0.3);
}

.wildfire-status-badge.wildfire-alert {
  background: rgba(213, 96, 90, 0.15);
  color: #ff6b6b;
  border: 1px solid #ff6b6b;
  animation: pulse-fire 2s infinite;
}

@keyframes pulse-fire {
  0%, 100% { box-shadow: 0 0 0 0 rgba(213, 96, 90, 0.4); }
  50% { box-shadow: 0 0 10px 2px rgba(213, 96, 90, 0.6); }
}

.wildfire-feed-tag {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wildfire-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
}

.wildfire-incident-item {
  background: var(--bg-panel-alt);
  border: 1px solid rgba(213, 96, 90, 0.3);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.wildfire-incident-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.wildfire-incident-name {
  font-weight: 700;
  color: #ff6b6b;
  font-size: 13.5px;
}

.wildfire-incident-dist {
  font-weight: 800;
  color: var(--trophy-gold);
  font-size: 12px;
}

.wildfire-incident-meta {
  font-size: 12px;
  color: var(--text-dim);
}

.wildfire-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.wildfire-link {
  color: var(--accent-water);
  font-size: 12.5px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.wildfire-link:hover { text-decoration: underline; }

.forecast-section {
  margin-top: 26px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.forecast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.forecast-header h3 { margin: 0; font-size: 16px; }

.forecast-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.forecast-controls select { width: auto; }

.forecast-note {
  font-size: 12px;
  color: var(--text-dim);
  margin: 8px 0 0;
}

.forecast-status {
  font-size: 13px;
  color: var(--text-dim);
  padding: 6px 0;
}

.chart-wrap {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 14px;
  height: 220px;
  position: relative;
}

.barometer-guide {
  background: linear-gradient(135deg, rgba(63, 146, 201, 0.1), rgba(79, 180, 119, 0.08));
  border: 1px solid rgba(63, 146, 201, 0.3);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 16px;
}

.barometer-guide h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--accent-water);
}

.barometer-guide p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

.barometer-guide strong { color: var(--text); }

.forecast-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.forecast-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.forecast-card.estimated { opacity: 0.75; font-style: italic; }

.forecast-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.forecast-card-date { font-size: 13px; font-weight: 700; }

.forecast-card-rating {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: -4px;
}

.forecast-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.forecast-moon-row { color: var(--trophy-gold); }
.forecast-moon-illum { font-weight: 700; }

.solunar-peak-badge {
  background: rgba(227, 179, 65, 0.18);
  border: 1px solid var(--trophy-gold);
  color: var(--trophy-gold);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
}

.forecast-baro-row { color: var(--accent-water); }
.forecast-baro-trend { font-weight: 700; white-space: nowrap; }

.forecast-card-note {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.score-badge {
  display: inline-block;
  min-width: 34px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  color: #08120d;
}

.score-poor { background: var(--poor); }
.score-fair { background: var(--fair); }
.score-good { background: var(--good); }
.score-prime { background: var(--prime); }

@media (max-width: 900px) {
  .topbar {
    padding: 8px 12px;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    height: 54px;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }
  .tagline { display: none; }
  .brand-logo { width: 32px; height: 32px; flex-shrink: 0; }
  .brand-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    font-size: 17px;
    margin-right: 2px;
    flex-shrink: 0;
  }
  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-basis: auto;
    flex-wrap: nowrap;
  }
  .topbar-actions .pro-btn,
  .topbar-actions .donate-btn,
  .topbar-actions .logout-btn {
    display: none !important;
  }
  .auth-btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
  }
  .auth-btn.authed {
    padding: 0 !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
    background: rgba(79, 180, 119, 0.15) !important;
    border: 1px solid rgba(79, 180, 119, 0.4) !important;
  }
  .layout { position: relative; }
  .sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 15;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .main { width: 100%; }
}

/* -------------------------------------------------------------- */
/* PRO modal                                                       */
/* -------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 7, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }

.modal h2 { margin: 0 0 6px; font-size: 20px; }

.modal-subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0 0 18px;
  line-height: 1.5;
}

.pro-feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pro-feature-list li {
  font-size: 14px;
  line-height: 1.4;
}

.pro-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-panel-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

#proToggleLabel {
  font-size: 13px;
  font-weight: 600;
}

.modal-fineprint {
  font-size: 11px;
  color: var(--text-dim);
  margin: 10px 0 0;
  line-height: 1.5;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.2s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + .slider { background: var(--trophy-gold); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* -------------------------------------------------------------- */
/* Auth modal                                                       */
/* -------------------------------------------------------------- */

.auth-gate-banner {
  background: linear-gradient(135deg, rgba(79, 180, 119, 0.18), rgba(227, 179, 65, 0.18));
  border: 1px solid rgba(79, 180, 119, 0.4);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 16px;
}

.auth-gate-banner.hidden { display: none; }

.member-benefits { margin-bottom: 18px; }

.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px;
  margin-bottom: 18px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 10px;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-tab.active {
  background: var(--accent);
  color: #08120d;
}

.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form.hidden { display: none; }

.auth-submit {
  margin-top: 6px;
  background: linear-gradient(135deg, #4fb477, #6fd996);
  color: #08120d;
  border: none;
  padding: 10px 14px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.auth-submit:hover { filter: brightness(1.05); }

.auth-error {
  color: var(--poor);
  font-size: 12px;
  margin: 4px 0 0;
  min-height: 14px;
}

/* -------------------------------------------------------------- */
/* Donate modal                                                     */
/* -------------------------------------------------------------- */

.donate-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.donate-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.donate-tier:hover {
  border-color: var(--fair);
  transform: translateY(-2px);
}

.donate-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--fair);
}

.donate-label {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 480px) {
  .donate-tiers { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------- */
/* Homepage / landing page                                          */
/* -------------------------------------------------------------- */

.home-section {
  height: calc(100vh - 106px);
  overflow-y: auto;
  padding: 0 0 60px;
}

.home-section.hidden { display: none; }

.hero {
  text-align: center;
  padding: 72px 24px 48px;
  background: radial-gradient(ellipse at top, #1c3327 0%, var(--bg) 70%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-logo {
  width: 190px;
  height: 190px;
  border-radius: 24px;
  object-fit: cover;
  display: block;
  margin: 0 auto 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(89, 187, 131, 0.25);
  transition: transform 0.3s ease;
}
.hero-logo:hover {
  transform: scale(1.03);
}

.hero-title {
  font-size: clamp(26px, 4vw, 42px);
  margin: 0 0 14px;
  line-height: 1.2;
}

.hero-subtitle {
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 15px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 32px;
}

.hero-stat { display: flex; flex-direction: column; align-items: center; }

.hero-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-strong);
}

.hero-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.launch-map-btn {
  background: linear-gradient(135deg, #4fb477, #6fd996);
  color: #08120d;
  border: none;
  padding: 14px 28px;
  border-radius: 26px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(79, 180, 119, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.launch-map-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79, 180, 119, 0.4); }

.install-app-btn {
  background: var(--bg-panel-alt);
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}
.install-app-btn:hover {
  background: rgba(79, 180, 119, 0.15);
  box-shadow: 0 4px 14px rgba(79, 180, 119, 0.25);
}

.highlight-grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.highlight-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  backdrop-filter: blur(6px);
  transition: border-color 0.2s, transform 0.2s;
}
.highlight-card:hover {
  border-color: rgba(79, 180, 119, 0.35);
  transform: translateY(-2px);
}

.highlight-icon { font-size: 30px; margin-bottom: 14px; }
.highlight-card h3 { font-size: 15px; margin: 0 0 8px; letter-spacing: 0.2px; }
.highlight-card p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.score-legend, .tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.showcase {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.showcase-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  margin: 0 0 16px;
  text-align: center;
}

.showcase-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px;
  backdrop-filter: blur(6px);
}

.showcase-loading { color: var(--text-dim); text-align: center; margin: 0; }

.showcase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.showcase-header h3 { margin: 0; font-size: 20px; }

.showcase-region { color: var(--accent-water); font-size: 13px; margin: 6px 0 0; }
.showcase-description { color: var(--text-dim); line-height: 1.6; margin: 10px 0 0; }

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.showcase-grid p { font-size: 13px; line-height: 1.5; margin: 4px 0 0; }

.showcase-forecast {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.showcase-forecast-loading { color: var(--text-dim); font-size: 13px; margin: 6px 0 0; }

.showcase-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
}

.showcase-explore-btn {
  margin-top: 18px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--accent-water);
  color: var(--accent-water);
  padding: 9px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.showcase-explore-btn:hover { background: rgba(63, 146, 201, 0.12); }

.home-cta { text-align: center; padding: 0 24px; }

/* -------------------------------------------------------------- */
/* Social login buttons                                             */
/* -------------------------------------------------------------- */

.social-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-panel-alt);
  color: var(--text);
  transition: filter 0.15s;
}
.social-btn:hover { filter: brightness(1.1); }

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-weight: 800;
  font-size: 13px;
}

.social-google { border-color: #4285f4; color: #8ab4f8; }
.social-x { border-color: #1d1d1d; color: var(--text); }
.social-apple { border-color: #8a8a8a; color: var(--text); }

.social-auth-note {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  margin: 0 0 16px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.auth-divider span { padding: 0 10px; }

/* -------------------------------------------------------------- */
/* Profile modal                                                     */
/* -------------------------------------------------------------- */

.profile-summary {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}

.profile-label { color: var(--text-dim); }
.profile-value { font-weight: 700; }

.profile-stats {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-strong);
}

.profile-stat-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.profile-section-title { font-size: 15px; margin: 0 0 12px; }

.auth-success {
  color: var(--accent-strong);
  font-size: 12px;
  margin: 4px 0 0;
  min-height: 14px;
}

.profile-logout-btn {
  width: 100%;
  margin-top: 18px;
  background: transparent;
  border: 1px solid rgba(213, 96, 90, 0.4);
  color: var(--poor);
  padding: 10px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.profile-logout-btn:hover { background: rgba(213, 96, 90, 0.1); }

@media (max-width: 700px) {
  .hero-stats { gap: 18px; }
  .main-nav { overflow-x: auto; }
}

/* -------------------------------------------------------------- */
/* Community Angler Forum                                           */
/* -------------------------------------------------------------- */

.forum-section {
  height: calc(100vh - 106px);
  overflow-y: auto;
  padding: 32px 24px 60px;
}

.forum-section.hidden { display: none; }

.forum-header {
  max-width: 860px;
  margin: 0 auto 20px;
}

.forum-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.forum-page-title { font-size: 22px; margin: 0; }
.forum-header-subtitle { color: var(--text-dim); font-size: 13px; margin: 4px 0 0; max-width: 600px; line-height: 1.4; }

.forum-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.forum-pill {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.forum-pill:hover { border-color: var(--accent); color: var(--text); }
.forum-pill.active { background: var(--accent); border-color: var(--accent); color: #08120d; }

.forum-search {
  max-width: 400px;
}

.forum-thread-list-view.hidden { display: none; }

.forum-thread-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.forum-loading, .forum-empty {
  color: var(--text-dim);
  text-align: center;
  padding: 32px 16px;
  font-size: 13px;
}

.forum-thread-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.forum-thread-row:hover { border-color: rgba(79, 180, 119, 0.35); transform: translateY(-1px); }

.forum-thread-main { flex: 1; min-width: 0; }

.forum-thread-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.forum-category-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.forum-category-badge.cat-hatch { background: rgba(227, 179, 65, 0.15); color: var(--trophy-gold); border-color: rgba(227, 179, 65, 0.35); }
.forum-category-badge.cat-conditions { background: rgba(63, 146, 201, 0.15); color: var(--accent-water); border-color: rgba(63, 146, 201, 0.35); }
.forum-category-badge.cat-tactics { background: rgba(46, 204, 113, 0.15); color: var(--quality-green); border-color: rgba(46, 204, 113, 0.35); }
.forum-category-badge.cat-camping { background: rgba(79, 180, 119, 0.15); color: var(--accent-strong); border-color: rgba(79, 180, 119, 0.35); }
.forum-category-badge.cat-buysell { background: rgba(168, 85, 247, 0.15); color: #c084fc; border-color: rgba(168, 85, 247, 0.35); }
.forum-category-badge.cat-general { background: rgba(157, 179, 164, 0.15); color: var(--text-dim); border-color: rgba(157, 179, 164, 0.3); }

.forum-lake-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}

.forum-thread-title {
  font-size: 15px;
  margin: 0 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-thread-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
}

.forum-upvote-btn {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.forum-upvote-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.forum-upvote-btn.active { background: rgba(79, 180, 119, 0.15); border-color: var(--accent); color: var(--accent-strong); }

.forum-thread-detail-view.hidden { display: none; }

.forum-back-btn {
  display: block;
  max-width: 860px;
  margin: 0 auto 16px;
  background: none;
  border: none;
  color: var(--accent-water);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.forum-back-btn:hover { text-decoration: underline; }

.forum-thread-detail {
  max-width: 860px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px;
}

.forum-detail-title { font-size: 22px; margin: 10px 0 6px; }

.forum-detail-body {
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  margin: 16px 0 20px;
}

.forum-comments {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.forum-comments h3 { font-size: 15px; margin: 0 0 14px; }

.forum-comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.forum-comment {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.forum-comment p:last-child { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }

.forum-reply-form textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.forum-reply-form textarea:focus { outline: none; border-color: var(--accent); }

/* -------------------------------------------------------------- */
/* Lake detail: community reports mini-section                      */
/* -------------------------------------------------------------- */

.lake-forum-section {
  margin-top: 22px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.lake-forum-section h3 { margin: 0 0 12px; font-size: 16px; }

.lake-forum-threads { margin-bottom: 14px; }

.lake-forum-loading, .lake-forum-empty {
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
  padding: 16px;
  background: var(--bg-panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin: 0;
}

.lake-forum-thread {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.lake-forum-thread:hover { border-color: var(--accent); }

.lake-forum-thread-title {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  min-width: 120px;
}

/* -------------------------------------------------------------- */
/* Site Footer & Legal Modals                                      */
/* -------------------------------------------------------------- */

.site-footer {
  margin-top: 48px;
  padding: 24px 20px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-btn {
  background: none;
  border: none;
  color: var(--accent-water);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
}
.footer-btn:hover { color: var(--accent); }

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

.legal-modal {
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
}

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

.legal-content h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin: 18px 0 6px;
}

.legal-content p {
  margin: 0 0 10px;
  color: var(--text-dim);
}

.legal-content a {
  color: var(--accent-water);
}

/* -------------------------------------------------------------- */
/* Ultra-Slick Mobile & Tablet Responsive Polish                  */
/* -------------------------------------------------------------- */

@media (max-width: 768px) {
  .topbar {
    padding: 8px 12px;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
  }
  .tagline {
    display: none;
  }
  .brand-logo {
    width: 32px;
    height: 32px;
  }
  .brand-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    font-size: 17px;
    margin-right: 2px;
    flex-shrink: 0;
  }
  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-basis: auto;
    flex-wrap: nowrap;
  }
  .topbar-actions .pro-btn,
  .topbar-actions .donate-btn {
    display: none;
  }
  .auth-btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
  }
  .auth-btn.authed {
    padding: 0;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
  }


  .main-nav {
    padding: 6px 12px;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-tab {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 12px;
  }

  .hero {
    padding: 36px 16px 28px;
  }
  .hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    margin-bottom: 14px;
  }
  .hero-title {
    font-size: 24px;
    line-height: 1.25;
  }
  .hero-subtitle {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 320px;
    margin: 0 auto 24px;
  }
  .hero-stat {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 8px;
  }
  .hero-stat-value {
    font-size: 22px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 14px;
  }
  
  .pills-bar-wrap {
    padding: 8px 12px;
  }
  .pills-bar {
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pill {
    padding: 6px 12px;
    font-size: 12px;
  }

  .lake-detail {
    padding: 16px;
  }
  .detail-header h2 {
    font-size: 20px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .size-highlight-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .table-wrap {
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .forecast-table {
    font-size: 12px;
  }
  .forecast-table th, .forecast-table td {
    padding: 8px 10px;
  }

  .forum-feed {
    padding: 14px;
  }
  .forum-thread-card {
    padding: 14px 16px;
  }
}

/* -------------------------------------------------------------- */
/* Sleek Leaflet Map Popup Styling                                */
/* -------------------------------------------------------------- */

.leaflet-popup-content-wrapper {
  background: var(--bg-panel) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
  padding: 4px 6px !important;
}

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

.lake-map-popup {
  padding: 4px 6px;
  text-align: center;
  min-width: 140px;
}

.popup-lake-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.popup-lake-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.popup-lake-size {
  font-size: 11px;
  font-weight: 600;
  color: var(--trophy-gold);
}

/* -------------------------------------------------------------- */
/* Install App Modal Styling                                      */
/* -------------------------------------------------------------- */

.install-modal {
  max-width: 580px;
}

.install-guide-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0;
}

.install-platform-card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
}

.install-platform-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.install-platform-icon {
  font-size: 22px;
}

.install-platform-header h3 {
  margin: 0;
  font-size: 15px;
  color: var(--accent-strong);
}

.install-platform-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}

.install-platform-card p strong {
  color: var(--text);
}

.install-direct-btn {
  margin-top: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
}

.install-offline-note {
  background: rgba(79, 180, 119, 0.1);
  border: 1px solid rgba(79, 180, 119, 0.3);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--accent-strong);
  line-height: 1.5;
  text-align: left;
}
