/* ── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg-deep:       #0d0d0d;
  --bg-base:       #161616;
  --bg-card:       #1c1c1c;
  --bg-card-hover: #242424;
  --bg-surface:    #2a2a2a;
  --border:        #333333;
  --border-light:  #444444;

  --accent:        #3b82f6;
  --accent-dim:    #2563eb;
  --accent-glow:   rgba(59, 130, 246, 0.12);
  --coral:         #f59e0b;
  --coral-dim:     #d97706;
  --blue:          #60a5fa;
  --blue-dim:      #3b82f6;

  --text:          #f0f0f0;
  --text-muted:    #a0a0a0;
  --text-dim:      #606060;

  --font-display:  'Sora', system-ui, sans-serif;
  --font-body:     'DM Sans', system-ui, sans-serif;

  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     16px;

  --shadow:        0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg:     0 8px 40px rgba(0, 0, 0, 0.4);

  --on-accent:     #0d0d0d;
  --map-overlay-end: rgba(13, 13, 13, 0.92);
  --font-mono:     ui-monospace, monospace;
  --bg-elevated:   var(--bg-card-hover);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.header {
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.user-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.btn-logout:hover {
  background: var(--accent-glow);
  border-color: var(--accent-dim);
}

.btn-auth {
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-auth-register {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.btn-auth:hover {
  background: var(--accent-glow);
  border-color: var(--accent-dim);
  color: var(--text);
}

.btn-feedback {
  cursor: pointer;
  background: transparent;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.btn-feedback:focus-visible {
  outline: 2px solid var(--accent-dim);
  outline-offset: 2px;
}

/* Feedback modal — reuses .admin-modal* layout; only adds form-specific bits. */
.feedback-modal-panel {
  width: min(96vw, 560px);
  max-height: min(92vh, 640px);
}

.feedback-modal-body {
  padding: 14px;
  gap: 10px;
  background: var(--bg-card);
}

.feedback-textarea-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feedback-textarea {
  width: 100%;
  resize: vertical;
  min-height: 160px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.45;
  box-sizing: border-box;
}

.feedback-textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.feedback-modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.feedback-char-count {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.feedback-status {
  flex: 1;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.feedback-status.is-error {
  color: #f87171;
}

.feedback-status.is-success {
  color: #34d399;
}

/* Admin feedback table — keep long messages legible without blowing up row height. */
.fb-cell-message {
  max-width: 360px;
  max-height: 6.4em;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.4;
}

.fb-cell-note {
  width: 100%;
  min-width: 180px;
  resize: vertical;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.8rem;
  box-sizing: border-box;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.75rem;
}

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

.logo-icon { width: 40px; height: 40px; }

.logo h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ── Theme & layout pickers ────────────────────────────────────────────── */
.header-pickers {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.theme-picker,
.layout-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.layout-picker label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.theme-picker label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.theme-select {
  appearance: none;
  background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 32px 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  max-width: min(220px, 42vw);
  transition: border-color 0.2s;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Water Toggle ──────────────────────────────────────────────────────── */
.water-toggle {
  display: flex;
  background: var(--bg-deep);
  border-radius: 50px;
  padding: 4px;
  border: 1px solid var(--border);
}

.toggle-btn {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 20px;
  border: none;
  border-radius: 50px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.toggle-btn:hover {
  color: var(--text);
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: var(--on-accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.toggle-btn svg { flex-shrink: 0; }

/* ── Main Layout ───────────────────────────────────────────────────────── */
.main {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 0;
  min-height: calc(100vh - 65px);
}

.panel { padding: 24px; }

.panel-controls {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg-base);
}

.panel-results {
  background: var(--bg-deep);
  /*
   * AUDIT-2026-05 SPEC-04 (May 9, 2026 follow-up #8): the right panel used to
   * have its own ``overflow-y: auto`` + ``max-height: calc(100vh - 65px)``
   * scrollbar. When the AI response was taller than the viewport (almost
   * always — TODAY'S GAME PLAN + SOLUNAR + TECHNIQUES + TACKLE + RECENT
   * CATCHES easily run 2000-3000px), the user got a tiny inner scrollbar that
   * "ran out" before the page scroll did, while the left search panel kept
   * scrolling with the page. The asymmetry made it look like the response
   * was cut off. Drop the inner scroll and let the response participate in
   * the page's natural scroll like every other section does. The left
   * search panel + this right results panel both grow to fit their content
   * inside the same outer ``.main`` grid.
   */
}

/* ── Locate Button ─────────────────────────────────────────────────────── */
.btn-locate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-card);
  border: 1px dashed var(--accent-dim);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-locate:hover {
  background: var(--accent-glow);
  border-style: solid;
}

.btn-locate:disabled {
  color: var(--text-muted);
  border-color: var(--border);
  cursor: wait;
}

.place-autocomplete-wrap {
  position: relative;
  width: 100%;
}

.place-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 4px 0 0;
  padding: 4px 0;
  list-style: none;
  z-index: 3000;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.place-suggest-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}

.place-suggest-item:last-child {
  border-bottom: none;
}

.place-suggest-item:hover,
.place-suggest-item-active {
  background: var(--accent-glow);
  color: var(--text);
}

.place-suggest-main {
  display: block;
}

/* AUDIT-2026-05 MAP-31: distance_mi sub-line in water-body suggestions. */
.place-suggest-sub {
  display: block;
  font-size: 0.72rem;
  margin-top: 2px;
  opacity: 0.75;
}

/* AUDIT-2026-05 MAP-22: manual salt/fresh/brackish override segment. */
.water-type-override {
  margin: 6px 0 0;
  padding: 4px 0 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.water-type-override legend {
  padding: 0 6px 0 0;
  font-weight: 600;
  color: var(--text);
}
.water-type-override label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.water-type-override input[type="radio"] {
  margin: 0;
}

.zip-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.zip-row input {
  flex: 1;
  min-width: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color 0.2s;
}

.zip-row input::placeholder {
  color: var(--text-dim);
}

.zip-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-zip-go {
  flex-shrink: 0;
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-zip-go:hover:not(:disabled) {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-zip-go:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* ── Map ───────────────────────────────────────────────────────────────── */
.map-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.map-stage {
  position: relative;
  overflow: hidden;
}

#map {
  height: 320px;
  width: 100%;
  background: var(--bg-card);
}

.map-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, var(--map-overlay-end));
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 5;
}

.map-overlay.hidden { opacity: 0; }

.map-chart-toolbar {
  flex-shrink: 0;
  position: relative;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.74rem;
  color: var(--text-muted);
  pointer-events: auto;
}

.map-chart-toolbar-title {
  flex-basis: 100%;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

@media (min-width: 380px) {
  .map-chart-toolbar-title {
    flex-basis: auto;
    margin-right: 6px;
  }
}

.map-chart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.map-chart-toggle input {
  margin: 0;
  accent-color: var(--accent, #38bdf8);
}

.map-chart-toolbar .map-chart-subhint {
  flex-basis: 100%;
  margin-top: -2px;
  font-size: 0.62rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.map-chart-toolbar .map-chart-subhint:empty {
  display: none;
}

.water-field {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--accent-dim);
  background: var(--bg-card);
}

.water-field-hint {
  margin: 4px 0 0;
  font-size: 0.74rem;
  color: var(--text-dim);
  line-height: 1.35;
  min-height: 1.2em;
}

.trip-map-shell .trip-map-stage-with-toolbar {
  display: flex;
  flex-direction: column;
}

.trip-map-spot-toolbar {
  flex-shrink: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft, var(--border));
  background: var(--bg-card);
}

.trip-map-spot-toolbar.hidden {
  display: none;
}

.trip-map-spot-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.trip-map-spot-feedback {
  margin: 6px 0 0;
  min-height: 0.85em;
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.trip-map-spot-feedback:empty {
  display: none;
}

.reddit-reports-shell {
  margin: 0 0 18px;
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.reddit-reports-head {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.reddit-reports-note {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.reddit-post-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reddit-post-card {
  padding: 10px 12px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border-soft, var(--border));
  background: var(--bg, var(--bg-card));
}

.reddit-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.reddit-post-meta a {
  color: var(--accent-teal, #38bdf8);
  text-decoration: none;
}

.reddit-post-meta a:hover {
  text-decoration: underline;
}

.reddit-post-title {
  margin: 0 0 6px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.reddit-post-title a {
  color: var(--text);
  text-decoration: none;
}

.reddit-post-title a:hover {
  color: var(--accent-teal, #38bdf8);
}

.reddit-post-snippet {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trip-map-shell {
  margin: 22px 0 20px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
}

.trip-map-head {
  padding: 14px 18px 8px;
  border-bottom: 1px solid var(--border-soft, var(--border));
}

.trip-map-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.trip-map-sub {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.trip-map-el {
  width: 100%;
  min-height: min(55vh, 520px);
  height: min(55vh, 520px);
  background: var(--bg-card);
}

.trip-map-chart-toolbar {
  border-top-color: var(--border);
}

.trip-map-chart-toolbar .trip-map-attribution-hint {
  flex-basis: 100%;
  margin-top: 2px;
  font-size: 0.62rem;
  color: var(--text-dim);
  line-height: 1.3;
}

.spot-pin-label {
  background: transparent;
  border: none;
}

.spot-pin-label .spot-pin-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.95);
  border: 2px solid rgba(15, 15, 18, 0.9);
  color: rgba(17, 17, 22, 0.95);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* ── Controls ──────────────────────────────────────────────────────────── */
.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.location-display {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.location-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.location-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.location-coords {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  resize: vertical;
  line-height: 1.5;
  transition: border-color 0.2s;
}

.field textarea::placeholder { color: var(--text-dim); }
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Analyze Button ────────────────────────────────────────────────────── */
.btn-analyze {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: var(--on-accent);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-analyze::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-analyze:hover::before { opacity: 1; }
.btn-analyze:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }

.btn-analyze:disabled {
  background: var(--bg-surface);
  color: var(--text-dim);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-analyze:disabled::before { display: none; }

.btn-text, .btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.btn-loading { display: none; }

.btn-analyze.loading .btn-text { display: none; }
.btn-analyze.loading .btn-loading { display: flex; }
.btn-analyze.loading {
  background: var(--bg-surface);
  color: var(--accent);
  pointer-events: none;
}

/* ── Saved searches ─────────────────────────────────────────────────────── */
.saved-searches {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.saved-searches-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.saved-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.btn-saved-refresh {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.btn-saved-refresh:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.saved-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.4;
}

.saved-guest-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.45;
}

.saved-guest-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.saved-guest-note a:hover {
  text-decoration: underline;
}

.save-warning-banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--coral, #f97316);
  background: rgba(249, 115, 22, 0.12);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.4;
}

.saved-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.saved-list::-webkit-scrollbar { width: 4px; }
.saved-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.saved-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
}

.saved-item:hover {
  border-color: var(--accent-dim);
}

.saved-item-main {
  flex: 1;
  min-width: 0;
}

.saved-item-loc {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-item-meta {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.saved-item-del {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 1rem;
  line-height: 1;
  border-radius: 4px;
}

.saved-item-del:hover {
  color: var(--coral);
  background: rgba(239, 68, 68, 0.1);
}

.saved-empty {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 8px 0 0;
}

.cache-admin-output {
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Header nav: App | Admin (admins only) ──────────────────────────────── */
.header-main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.header-nav-tab {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
}

.header-nav-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.header-nav-tab.active {
  color: var(--text);
  background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--border-light);
}

/* ── Portal footer trademark ─────────────────────────────────────────────── */

.portal-footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 24px 28px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  line-height: 1.45;
  background: var(--bg-deep);
}

.portal-footer p {
  margin: 0;
}

/* ── Admin screen (full-page) ─────────────────────────────────────────── */

.admin-screen {
  background: var(--bg-base);
  min-height: calc(100vh - 56px);
  padding: 0 24px 48px;
}

.admin-screen-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
}

.admin-screen-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-screen-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.admin-screen-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.admin-screen-sub kbd {
  font-family: var(--font-mono);
  font-size: 0.72em;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
}

.btn-admin-back {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-admin-back:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.admin-main-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.admin-main-tab {
  padding: 10px 16px;
  margin-bottom: -1px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
}

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

.admin-main-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.admin-main-panel {
  animation: adminFade 0.2s ease;
}

@keyframes adminFade {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.admin-dash-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-select-sm {
  min-width: 120px;
  font-size: 0.78rem;
  padding: 6px 10px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stat-grid--cache {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.admin-stat-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.admin-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.admin-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text-muted);
}

.admin-chart-block {
  margin-bottom: 28px;
}

.admin-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-day-bar-row {
  display: grid;
  grid-template-columns: 52px 1fr 36px;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}

.admin-bar-label {
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.admin-bar-track {
  height: 10px;
  background: var(--bg-surface);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.admin-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  border-radius: 6px;
  min-width: 2px;
  transition: width 0.25s ease;
}

.admin-bar-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .admin-two-col {
    grid-template-columns: 1fr;
  }
}

.admin-two-col--cache {
  grid-template-columns: 1fr;
  max-width: 520px;
}

.admin-mini-panel {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.admin-hbar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-hbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2fr 32px;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}

.admin-hbar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
}

.admin-hbar-track {
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.admin-hbar-fill {
  height: 100%;
  background: var(--accent);
  opacity: 0.85;
  border-radius: 4px;
  min-width: 2px;
}

.admin-hbar-n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.admin-empty-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
}

.admin-qa-hint {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.admin-logs-block {
  margin-top: 8px;
}

.admin-logs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.admin-logs-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.admin-data-table th,
.admin-data-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.admin-data-table th {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.65rem;
  background: var(--bg-surface);
  white-space: nowrap;
}

.admin-data-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

.admin-cell-preview {
  max-width: 220px;
  word-break: break-word;
  color: var(--text-dim);
}

.admin-cell-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-dim);
}

.admin-cell-response-trigger {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  color: var(--accent-dim, #60a5fa);
}

.admin-cell-response-trigger:hover {
  color: var(--text);
}

/* Admin — full QA response modal */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 21000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.admin-modal.hidden {
  display: none !important;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(5, 12, 22, 0.72);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.admin-modal-panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 920px);
  max-height: min(92vh, 880px);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.admin-modal-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.admin-modal-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.admin-modal-close:hover {
  color: var(--text);
  background: var(--bg-card);
}

.admin-modal-hint {
  margin: 0;
  padding: 8px 14px;
  font-size: 0.72rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.admin-modal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep, #0a1628);
}

.admin-response-iframe {
  flex: 1;
  width: 100%;
  min-height: min(62vh, 520px);
  border: 0;
  background: #fafafa;
}

@media (max-width: 640px) {
  .admin-response-iframe {
    min-height: min(48vh, 420px);
  }
}

.admin-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-pill--allowed {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.admin-pill--blocked {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.admin-pill--error {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.admin-table-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.admin-page-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.cache-admin-output--wide {
  max-height: none;
  margin-top: 12px;
}

.admin-docs-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.45;
}

.admin-docs-hint code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.admin-docs-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  max-height: min(70vh, 720px);
  overflow: auto;
  margin: 0;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-glow);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ───────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  min-height: 60vh;
}

.empty-illustration { margin-bottom: 28px; opacity: 0.8; }

.empty-state h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.empty-state p {
  color: var(--text-muted);
  max-width: 440px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 32px;
  max-width: 420px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.feature-icon { font-size: 1.3rem; }
.feature-text { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* ── Loading State ─────────────────────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 60vh;
  padding: 40px;
}

.admin-request-timer {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  color: var(--accent-teal, #5eead4);
  font-weight: 600;
  letter-spacing: 0.02em;
  min-height: 1.4em;
}

.admin-last-request-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 10px;
  font-variant-numeric: tabular-nums;
}

.admin-timing-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.error-timing-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}

.loading-phases {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.phase {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.4s;
}

.phase.active { color: var(--accent); }
.phase.done   { color: var(--text-muted); }

.phase-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s;
}

.phase.active .phase-indicator {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse-ring 1.5s ease infinite;
}

.phase.active .phase-indicator::after {
  content: '';
  position: absolute;
  inset: 5px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease infinite;
}

.phase.done .phase-indicator {
  border-color: var(--accent-dim);
  background: var(--accent-dim);
}

.phase.done .phase-indicator::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--on-accent);
  font-weight: 700;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.7); }
}

.data-cards-dense.data-cards {
  gap: 8px;
  margin-bottom: 16px;
  align-items: stretch;
  grid-auto-rows: minmax(98px, 1fr);
}

.data-card.data-card-compact {
  padding: 8px 10px;
  min-height: 98px;
  height: 100%;
  align-self: stretch;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.data-card-compact .data-card-label {
  font-size: 0.56rem;
  margin-bottom: 3px;
  letter-spacing: 0.09em;
}

.data-card-compact .data-card-value {
  font-size: 0.88rem;
  line-height: 1.26;
  flex: 1 1 auto;
}

.data-card-compact .data-card-sub {
  margin-top: 2px;
  font-size: 0.61rem;
  line-height: 1.34;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.leaflet-tooltip.boat-ramp-tt {
  background: rgba(15, 18, 24, 0.92);
  color: rgba(229, 231, 235, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

/* ── Results ───────────────────────────────────────────────────────────── */
.results { padding: 0; }

.data-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.species-pin-feedback {
  margin: 0 0 12px;
  padding: 8px 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.species-pin-feedback .species-pin-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.species-pin-feedback button {
  font: inherit;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated, var(--bg-card-hover));
  color: var(--text);
}

.species-pin-feedback button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.species-pin-feedback.species-pin-feedback-done {
  opacity: 0.85;
}

.species-pin-feedback-note {
  font-size: 0.72rem;
  margin: 4px 0 0;
  opacity: 0.9;
}

.species-pin-feedback-err {
  font-size: 0.74rem;
  margin: 8px 0 0;
  color: var(--coral, #f59e0b);
  line-height: 1.35;
}

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

.data-card-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.data-card-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.data-card-sub {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.45;
}

.data-card-sub .data-card-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.data-card-sub .data-card-link:hover {
  text-decoration: underline;
}

.data-card.accent-teal   { border-left: 3px solid var(--accent); }
.data-card.accent-coral  { border-left: 3px solid var(--coral); }
.data-card.accent-blue   { border-left: 3px solid var(--blue); }

/* ── AI Recommendations Content ────────────────────────────────────────── */
.recommendations {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  line-height: 1.7;
}

.recommendations h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.recommendations h2:first-child { margin-top: 0; }

.recommendations h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}

.recommendations p {
  color: var(--text-muted);
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.recommendations ul {
  margin: 8px 0 16px 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.recommendations li { margin-bottom: 6px; }
.recommendations li::marker { color: var(--accent); }

.recommendations strong { color: var(--text); font-weight: 600; }

.recommendations p a,
.recommendations li a,
.recommendations .tip-card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.recommendations p a:hover,
.recommendations li a:hover {
  opacity: 0.92;
}

.recommendations .tip-card {
  background: var(--accent-glow);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
}

.recommendations .tip-card h3 {
  color: var(--accent);
  margin-top: 0;
  font-size: 0.95rem;
}

.recommendations .tip-card p,
.recommendations .tip-card li {
  color: var(--text);
}

/* Soft species-viability "heads-up" banner — prepended above the trip plan
 * when the requested species probably doesn't fit the area but the verdict
 * isn't strong enough to block the whole response. Visually borrows the
 * regulation-warning palette so it reads as an alert, not a generic tip. */
.recommendations .tip-card.species-viability-note {
  background: rgba(255, 107, 53, 0.12);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-left: 4px solid var(--coral);
}

.recommendations .tip-card.species-viability-note h3 {
  color: var(--coral);
  font-size: 1rem;
}

/* Embedded "Nearest plausible alternatives" list inside the soft banner
 * (AUDIT-2026-05 SPEC-04 — May 9, 2026). Borrows the soft-banner accent
 * but with slightly tighter spacing since it nests one level deeper. */
.recommendations .tip-card.species-viability-note .species-viability-alt-heading {
  margin: 14px 0 4px 0;
  color: var(--coral);
  font-size: 0.95rem;
  font-weight: 600;
}

.recommendations .tip-card.species-viability-note .species-viability-alt-sub {
  margin: 0 0 8px 0;
  font-size: 0.875rem;
  opacity: 0.85;
}

.recommendations .tip-card.species-viability-note .species-viability-alt-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.recommendations .tip-card.species-viability-note .species-viability-alt-list li {
  margin: 4px 0;
}

.recommendations .tip-card.species-viability-note .species-viability-alt-list .tier-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(255, 107, 53, 0.18);
  color: var(--coral);
}

.recommendations .reg-warning {
  background: rgba(255, 107, 53, 0.12);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 12px 0;
}

.recommendations .reg-warning h3 {
  color: var(--coral);
  margin-top: 0;
  font-size: 0.95rem;
}

.recommendations .reg-warning p,
.recommendations .reg-warning li {
  color: var(--text);
}

.recommendations .day-plan {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
}

.recommendations .day-plan h3 {
  font-size: 1.1rem;
  margin-top: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.recommendations .day-plan .time-slot,
.recommendations .day-plan .bait-rec {
  background: var(--bg-card);
}

.recommendations .spot-rec {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 10px 0;
  border-left: 3px solid var(--accent);
}

.recommendations .spot-rec h3 {
  color: var(--accent);
  margin-top: 0;
}

.recommendations .spot-rec h4.spot-rec-name {
  margin: 0 0 12px;
  padding: 0;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
}

.recommendations .spot-map-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.88rem;
}

.recommendations .spot-map-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.recommendations .spot-map-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.recommendations .spot-map-link:hover {
  text-decoration: underline;
}

.recommendations .spot-map-sep {
  opacity: 0.45;
  user-select: none;
}

.btn-spot-map {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-dim);
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-spot-map:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.22);
  border-color: var(--accent);
}

.btn-spot-map:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.recommendations .time-slot {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 10px 0;
  border-left: 3px solid var(--coral);
}

.recommendations .bait-rec {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 10px 0;
  border-left: 3px solid var(--blue);
}

/* Catch photo strip (injected after regulation alerts) */
.recommendations .catch-gallery {
  margin: 16px 0 20px;
  padding: 16px 18px;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.08), rgba(14, 165, 233, 0.06));
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.recommendations .catch-gallery-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

.recommendations .catch-gallery-sub {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.recommendations .catch-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.recommendations .catch-gallery-item {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  aspect-ratio: 4 / 3;
}

.recommendations .catch-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.recommendations .catch-gallery-item:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* Tackle: responsive card grid — thumbnail + buy stack above title (tight, scannable) */
.recommendations .bait-line-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.recommendations .bait-line {
  margin: 0;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.recommendations .bait-line-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex: 1 1 auto;
}

.recommendations .bait-line-aside {
  flex: 0 0 auto;
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  opacity: 0.95;
}

.recommendations .bait-line-body {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
}

.recommendations .bait-line-body p:last-child,
.recommendations .bait-line-body ul:last-child {
  margin-bottom: 0;
}

.recommendations .bait-aside-caption {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.3;
  text-align: center;
}

.recommendations .bait-product-thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  aspect-ratio: 1;
  max-height: 118px;
  max-width: 118px;
  width: 100%;
  margin: 0 auto;
}

.recommendations .bait-product-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-light);
}

.recommendations .bait-thumb-ph {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.recommendations .bait-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.recommendations .bait-product-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
  border-radius: inherit;
  outline: none;
}

.recommendations .bait-product-thumb-link:focus-visible {
  box-shadow: 0 0 0 2px var(--accent);
}

.recommendations .bait-product-thumb-link:hover img {
  opacity: 0.92;
}

.recommendations .bait-buy-link.bait-buy-search {
  border-style: dashed;
}

.recommendations .bait-buy-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.recommendations .local-intel-sources {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.recommendations .local-intel-sources-label {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.recommendations .local-intel-sources-links {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.recommendations .local-intel-sources-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.recommendations .bait-buy-heading {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.recommendations .bait-buy-link {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.recommendations .bait-buy-link:hover {
  border-color: var(--accent-dim);
  background: rgba(59, 130, 246, 0.08);
}

.recommendations .bait-buy-local {
  border-left: 3px solid var(--accent);
}

.recommendations .bait-buy-web {
  opacity: 0.95;
}

.recommendations .bait-buy-tag {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2px;
}

@media (max-width: 640px) {
  .recommendations .bait-line-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
  }

  .recommendations .bait-product-thumb,
  .recommendations .bait-product-thumb--empty {
    max-height: 104px;
    max-width: 104px;
  }
}

.recommendations code {
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--coral);
}

/* ── Utilities ─────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .main {
    grid-template-columns: 1fr;
  }

  .panel-controls {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .panel-results {
    max-height: none;
  }

  #map { height: 260px; }

  .empty-state { min-height: 40vh; padding: 40px 20px; }
  .features-grid { grid-template-columns: 1fr; }

  .header-inner { flex-direction: column; gap: 10px; }
}

@media (max-width: 500px) {
  .panel { padding: 16px; }
  .recommendations { padding: 20px; }
  .data-cards { grid-template-columns: 1fr 1fr; }
}

/* ── Spot preview map modal (Show on map) ──────────────────────────────── */
.spot-map-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.spot-map-modal.hidden {
  display: none !important;
}

.spot-map-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 22, 0.72);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.spot-map-modal-panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 1100px);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.spot-map-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  flex-shrink: 0;
}

.spot-map-modal-header h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.spot-map-modal-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.spot-map-modal-close:hover {
  color: var(--text);
  background: var(--bg-card);
}

.spot-map-modal-map {
  width: 100%;
  height: min(72vh, 640px);
  min-height: 420px;
  flex: 1;
  background: var(--bg-deep, #0a1628);
}

@media (max-width: 640px) {
  .spot-map-modal-map {
    height: min(58vh, 520px);
    min-height: 280px;
  }

  .spot-map-modal-panel {
    width: min(98vw, 1100px);
  }
}

/* ── Leaflet Overrides ─────────────────────────────────────────────────── */
.leaflet-container {
  font-family: var(--font-body);
}

.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-surface) !important;
}

.leaflet-control-attribution {
  background: rgba(11, 25, 41, 0.8) !important;
  color: var(--text-dim) !important;
  font-size: 0.65rem !important;
}

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

/* ── Custom Marker Pulse ───────────────────────────────────────────────── */
.marker-pulse {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: marker-pulse 2s ease infinite;
}

@keyframes marker-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
.panel-results::-webkit-scrollbar { width: 6px; }
.panel-results::-webkit-scrollbar-track { background: var(--bg-deep); }
.panel-results::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.panel-results::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ── Entrance Animation ────────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.results { animation: fade-up 0.5s ease; }

/* ── Follow-up Chat ────────────────────────────────────────────────────── */
.chat-section {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.chat-header svg { flex-shrink: 0; color: var(--accent); }

.chat-header h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.chat-header span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.chat-messages {
  max-height: 400px;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-messages:empty { display: none; }

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.6;
  animation: fade-up 0.3s ease;
}

.chat-user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.chat-assistant {
  align-self: flex-start;
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-assistant p { margin-bottom: 8px; color: var(--text-muted); font-size: 0.88rem; }
.chat-assistant p:last-child { margin-bottom: 0; }
.chat-assistant strong { color: var(--text); }
.chat-assistant ul { margin: 6px 0 10px 18px; color: var(--text-muted); font-size: 0.88rem; }
.chat-assistant li { margin-bottom: 4px; }
.chat-assistant li::marker { color: var(--accent); }
.chat-assistant .tip-card {
  background: var(--accent-glow);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 8px 0;
}

.chat-thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.chat-thinking .spinner { width: 14px; height: 14px; }

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-base);
}

.chat-input-row input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: border-color 0.2s;
}

.chat-input-row input::placeholder { color: var(--text-dim); }

.chat-input-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.chat-send:hover { background: var(--accent-dim); transform: scale(1.05); }

.chat-send:disabled {
  background: var(--bg-surface);
  color: var(--text-dim);
  cursor: not-allowed;
  transform: none;
}
