/* ── 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;
  overflow-x: clip;
}

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

/* ── Header ────────────────────────────────────────────────────────────── */
/* Full-screen gate while /app resolves Supabase session (avoids login redirect flash). */
.auth-boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
}

.auth-boot-screen.hidden {
  display: none;
}

.auth-boot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 320px;
  padding: 24px;
  text-align: center;
}

.auth-boot-msg {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-boot-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.auth-boot-actions.hidden {
  display: none;
}

.auth-boot-login {
  text-decoration: none;
}

.auth-boot-clear {
  background: none;
  border: none;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
}

.auth-boot-clear:hover {
  color: var(--text);
}

.auth-boot-spinner {
  width: 36px;
  height: 36px;
}

.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;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.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-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.admin-reward-ledger-block {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.admin-reward-ledger-toolbar .admin-subheading {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.admin-reward-ledger-hint {
  margin: 0 0 0.75rem;
  flex: 1 1 100%;
}

.btn-ghost.btn-zip-go {
  background: transparent;
  color: var(--text-muted, #64748b);
  border: 1px solid var(--border, #e2e8f0);
}

.btn-ghost.btn-zip-go:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--text, #0f172a);
}

.btn-danger.btn-zip-go {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.btn-danger.btn-zip-go:hover:not(:disabled) {
  background: #fee2e2;
  color: #991b1b;
}

.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;
}

.catch-admin-thumb {
  display: block;
  max-width: 88px;
  max-height: 66px;
  border-radius: 6px;
  object-fit: cover;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.logo-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: contain;
}

.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);
  letter-spacing: 0.02em;
  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);
}

/* Full-screen search flow: intro → wizard steps → results */
.main--phase-intro {
  grid-template-columns: 1fr;
  max-width: none;
}

.main--phase-wizard {
  grid-template-columns: 1fr;
  max-width: none;
}

.main--phase-results {
  grid-template-columns: 1fr;
  max-width: none;
}

.search-intro-screen {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 65px);
  padding: 48px 24px 64px;
  background: var(--bg-base);
}

.search-intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.search-intro-screen h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.search-intro-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 440px;
}

.search-intro-features {
  margin-top: 28px;
}

.btn-lets-fish {
  margin-top: 36px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 40px;
  border: none;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.3);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.btn-lets-fish:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.38);
}

.search-intro-screen.search-intro-exit {
  animation: searchIntroExit 0.38s ease forwards;
  pointer-events: none;
}

@keyframes searchIntroExit {
  to {
    opacity: 0;
    transform: translateY(-14px) scale(0.98);
  }
}

.search-flow {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 65px);
}

.search-flow.search-flow-enter {
  animation: searchFlowEnter 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes searchFlowEnter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main--phase-wizard .search-flow .panel-controls {
  flex: 1;
  min-height: 0;
  border-right: none;
  padding: 20px 24px 24px;
  display: grid;
  /* 3 direct children: step indicator (auto), body (flexible), nav (auto). */
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
}

.main--phase-wizard .search-flow .search-wizard-steps {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.main--phase-wizard .search-flow .search-flow-body {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 20px;
  min-height: 0;
  flex: 1;
  align-content: stretch;
}

.main--phase-wizard .search-flow-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}

.main--phase-wizard .search-flow-map-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  min-width: 0;
}

.main--phase-wizard .search-flow .map-container {
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.main--phase-wizard .search-flow .map-stage {
  flex: 1;
  min-height: 280px;
}

.main--phase-wizard .search-flow #map {
  height: 100%;
  min-height: 280px;
}

.main--phase-wizard .panel-controls[data-search-step="details"] .search-flow-body {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
  margin: 0 auto;
  width: 100%;
  max-width: 560px;
}

.main--phase-wizard .panel-controls[data-search-step="details"] .map-container,
.main--phase-wizard .panel-controls[data-search-step="details"] .location-display {
  display: none;
}

.main--phase-wizard .panel-controls[data-search-step="location"] .location-display {
  display: none;
}

.main--phase-wizard .search-wizard-nav {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.main--phase-results .search-intro-screen,
.main--phase-results .search-flow {
  display: none !important;
}

.main--phase-results .panel-results {
  grid-column: 1 / -1;
  min-height: calc(100vh - 65px);
}

.main--phase-intro .search-flow,
.main--phase-intro .panel-results {
  display: none !important;
}

.main--phase-wizard .panel-results {
  display: none !important;
}

@media (max-width: 900px) {
  /* Stack the wizard: form on top, map below, and let the page scroll
     naturally instead of trapping content in a viewport-height grid. */
  .main--phase-wizard .search-flow {
    min-height: 0;
  }

  .main--phase-wizard .search-flow .panel-controls {
    grid-template-rows: auto auto auto;
    padding: 16px 16px 22px;
    gap: 14px;
  }

  .main--phase-wizard .search-flow .search-flow-body {
    grid-template-columns: 1fr;
    flex: none;
  }

  .main--phase-wizard .search-flow-sidebar {
    max-height: none;
    overflow: visible;
  }

  .main--phase-wizard .search-flow .map-container {
    height: auto;
  }

  .main--phase-wizard .search-flow .map-stage {
    flex: none;
    min-height: 0;
  }

  .main--phase-wizard .search-flow #map {
    height: 300px;
    min-height: 0;
  }

  /* Details step is already single-column; keep it readable full-width. */
  .main--phase-wizard .panel-controls[data-search-step="details"] .search-flow-body {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .main--phase-wizard .search-flow .panel-controls {
    padding: 14px 12px 20px;
  }

  .main--phase-wizard .search-flow #map {
    height: 260px;
  }

  /* Compact step indicator so 3 labels never overflow narrow phones. */
  .search-wizard-step {
    font-size: 0.72rem;
    gap: 4px;
  }

  .search-wizard-step-num {
    width: 20px;
    height: 20px;
    font-size: 0.72rem;
  }

  .search-wizard-btn {
    padding: 12px 12px;
    font-size: 0.86rem;
  }

  .search-step-title {
    font-size: 1rem;
  }

  .search-intro-screen {
    padding: 32px 18px 48px;
  }

  .btn-lets-fish {
    width: 100%;
    max-width: 320px;
    padding: 15px 28px;
    font-size: 1rem;
  }
}

@media (max-width: 380px) {
  /* Drop step labels to numbers-only on very small screens to avoid wrapping,
     keeping the circles evenly spaced across the row. */
  .search-wizard-step {
    font-size: 0;
    gap: 0;
    justify-content: center;
  }

  .search-wizard-step-num {
    font-size: 0.78rem;
  }
}

/* Saved searches tab */
.saved-screen {
  background: var(--bg-base);
  min-height: calc(100vh - 65px);
  padding: 24px;
}

.saved-screen-inner {
  max-width: 720px;
  margin: 0 auto;
}

.saved-screen-header {
  margin-bottom: 20px;
}

.saved-screen-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.saved-screen-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.saved-searches--page {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex: none;
}

.saved-searches--page .saved-list {
  max-height: none;
}

.panel { padding: 24px; }

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

.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.
   */
}

/* Saved searches view — header tab shows a focused saved-list layout */
html.saved-view-open .main {
  grid-template-columns: 1fr;
  max-width: 920px;
}

html.saved-view-open .panel-controls > :not(.saved-searches) {
  display: none !important;
}

html.saved-view-open .panel-results {
  display: none;
}

html.saved-view-open .saved-searches {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

html.saved-view-open .saved-searches.is-highlight {
  animation: saved-highlight 1.2s ease;
}

@keyframes saved-highlight {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 3px var(--accent-glow); border-radius: var(--radius); }
}

/* ── 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;
}

.water-field-upsell {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: var(--bg-card);
}

.water-field-upsell a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.water-field-upsell a:hover {
  text-decoration: underline;
}

.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-temp-legend {
  position: absolute;
  bottom: 0.65rem;
  left: 0.65rem;
  z-index: 900;
  width: 196px;
  padding: 0.55rem 0.7rem 0.6rem;
  border-radius: 12px;
  background: rgba(15, 18, 24, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e8edf5;
  pointer-events: none;
}

.trip-temp-legend.hidden {
  display: none;
}

.trip-temp-legend-title {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(232, 237, 245, 0.72);
  margin-bottom: 0.35rem;
}

.trip-temp-legend-bar {
  height: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(
    90deg,
    #1d4ed8 0%,
    #22d3ee 22%,
    #4ade80 48%,
    #facc15 72%,
    #ef4444 100%
  );
}

.trip-temp-legend-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  color: rgba(232, 237, 245, 0.72);
}

.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;
  flex: 1;
  min-height: 0;
}

/* ── Stepped search wizard ───────────────────────────────────────────────── */
.search-wizard-steps {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.search-wizard-step {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.search-wizard-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.search-wizard-step.is-active {
  color: var(--accent);
}

.search-wizard-step.is-active .search-wizard-step-num {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.search-wizard-step.is-done {
  color: var(--text-muted);
}

.search-wizard-step.is-done .search-wizard-step-num {
  border-color: var(--accent);
  color: var(--accent);
}

.search-step {
  display: none;
}

.search-step.is-active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-step-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  outline: none;
}

.search-step-sub {
  margin: -8px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.search-wizard-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-wizard-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s, border-color 0.2s;
}

.search-wizard-btn--back {
  background: var(--bg-card);
  color: var(--text);
}

.search-wizard-btn--back:hover {
  border-color: var(--accent);
}

.search-wizard-btn--next {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--accent));
}

.search-wizard-btn--next:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.search-wizard-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.panel-controls[data-search-step="details"] .map-container {
  display: none;
}

.panel-controls[data-search-step="location"] .location-display {
  display: none;
}

.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);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.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;
}

.analyze-timing-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0 0 14px;
  line-height: 1.45;
}

.analyze-briefings-quota,
.saved-saves-quota {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.45;
}

.saved-saves-tally {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  vertical-align: middle;
}

.saved-saves-tally--full {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.08);
}

.analyze-briefings-quota strong,
.saved-saves-quota strong {
  color: var(--text);
  font-weight: 600;
}

.analyze-briefings-quota--low,
.saved-saves-quota--low {
  color: var(--coral, #f97316);
}

.analyze-briefings-quota--low strong,
.saved-saves-quota--low strong {
  color: var(--coral, #f97316);
}

.analyze-briefings-quota--exhausted,
.saved-saves-quota--exhausted {
  color: var(--coral, #f97316);
  font-weight: 500;
}

.analyze-briefings-quota a,
.saved-saves-quota a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.analyze-briefings-quota a:hover,
.saved-saves-quota a:hover {
  text-decoration: underline;
}

.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;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* When empty, don't let the list grow and push the status line off-screen. */
.saved-list:empty {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

.saved-searches--loading .saved-list:empty {
  min-height: 1.25rem;
}

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

/* Legacy card list (not the saved-table rows in app-shell) */
.saved-list .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-list .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-item-maps {
  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-offline {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.saved-item-offline--ready {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.45);
  font-weight: 700;
}

.saved-item-offline--busy {
  width: auto;
  min-width: 28px;
  padding: 0 6px;
  font-size: 0.62rem;
  cursor: default;
  white-space: nowrap;
}

.saved-item--offline {
  border-color: rgba(22, 163, 74, 0.35);
}

.saved-offline-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.12);
  border-radius: 4px;
  vertical-align: middle;
}

.saved-offline-hint {
  font-size: 0.72rem;
  color: var(--accent);
  margin: -4px 0 10px;
  line-height: 1.4;
}

.saved-item-maps:hover {
  color: var(--teal, #2dd4bf);
  background: rgba(45, 212, 191, 0.1);
}

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

.saved-searches--loading .saved-empty {
  color: var(--text-muted);
}

.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: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  min-width: 0;
  max-width: 100%;
}

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

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

.header-nav-tab.active {
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.header-nav-tab.active:hover {
  color: var(--on-accent);
  background: var(--accent-dim);
}

.header-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  line-height: 1;
  flex-shrink: 0;
}

.header-tier-badge--plus,
.header-tier-badge--pro,
.header-tier-badge--admin {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: var(--accent-dim);
}

.header-tier-badge:hover {
  opacity: 0.85;
}

.header-nav-tab-short {
  display: none;
}

@media (max-width: 768px) {
  .header-nav-tab-long {
    display: none;
  }

  .header-nav-tab-short {
    display: inline;
  }
}

/* ── 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;
}

/* ── Advanced Mapping (Pro) — full-page embedded bundle ────────────────── */

.maps-screen:not(.hidden) {
  position: fixed;
  top: var(--advmaps-header-offset, 56px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
  width: 100vw;
  max-width: none;
  margin: 0;
}

html.advmaps-view-open,
html.advmaps-view-open body {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

html.advmaps-view-open .portal-footer {
  display: none;
}

.advmaps-host {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: none;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.advmaps-host > .app,
.advmaps-host > .advmaps-runtime-error {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

@media (max-width: 768px) {
  .maps-screen:not(.hidden) {
    height: calc(100dvh - var(--advmaps-header-offset, 72px));
    bottom: auto;
  }

  .advmaps-host {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }
}

.advmaps-host:empty::before,
.advmaps-host.advmaps-loading:not(:has(.app))::before {
  content: 'Loading Advanced Mapping…';
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  color: var(--text-muted, #6b7280);
  font-size: 0.95rem;
}

.advmaps-load-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: calc(100vh - 56px);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted, #6b7280);
}

.advmaps-load-error p {
  margin: 0;
  max-width: 420px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.advmaps-retry-btn {
  margin-top: 4px;
}

.advmaps-upsell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px 16px;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

.advmaps-upsell.hidden {
  display: none;
}

/* Blurred, read-only map preview behind the upsell modal (teaser pattern). */
.advmaps-upsell-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.advmaps-upsell-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(232, 240, 250, 0.15), rgba(219, 228, 239, 0.45));
}

.advmaps-teaser-sidebar {
  position: absolute;
  left: 20px;
  top: 20px;
  z-index: 1;
  width: 200px;
  padding: 16px 14px;
  pointer-events: none;
}

.advmaps-teaser-sidebar-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.advmaps-teaser-layers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.advmaps-teaser-layers li::before {
  content: "☑ ";
  color: var(--accent);
}

.advmaps-teaser-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.advmaps-upsell-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 24px 64px rgba(15, 40, 80, 0.14);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  text-align: center;
}

.advmaps-upsell-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.advmaps-upsell-card h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 12px;
  color: var(--text);
}

.advmaps-upsell-card p {
  color: var(--text-muted, #4b5563);
  line-height: 1.5;
  margin: 0 0 24px;
}

.advmaps-upsell-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

a.advmaps-upsell-upgrade,
a.advmaps-upsell-upgrade:hover,
a.advmaps-upsell-upgrade:focus {
  text-decoration: none;
}

/* ── Community catches (Plus/Pro) ─────────────────────────────────────── */

.catches-screen {
  background: transparent;
  min-height: calc(100vh - var(--app-header-h, 65px));
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
}

.catches-screen-main {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.catches-screen .ff-teaser-overlay {
  position: absolute;
  inset: 0;
}

.catches-upsell {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 0;
  background: rgba(219, 228, 239, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.catches-upsell.hidden,
.catches-panel.hidden {
  display: none;
}

.catches-upsell-card {
  max-width: 440px;
  text-align: center;
}

.catches-upsell-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 12px;
  color: var(--text);
}

.catches-upsell-card > p {
  color: var(--text-muted, #4b5563);
  line-height: 1.5;
  margin: 0 0 20px;
}

.catches-upsell-features {
  text-align: left;
  margin: 0 0 24px;
  padding-left: 1.25rem;
  color: var(--text-muted, #4b5563);
  line-height: 1.55;
  font-size: 0.92rem;
}

.catches-upsell-features li {
  margin-bottom: 8px;
}

.catches-upsell-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.catches-upsell-actions .btn-zip-go,
.advmaps-upsell-actions .btn-zip-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 40px;
  line-height: 1.2;
}

.catches-upsell-actions .btn-zip-go:hover,
.advmaps-upsell-actions .btn-zip-go:hover {
  text-decoration: none;
}

/* ── Subscription teaser: blurred preview + centered upsell modal ─────────── */
/* When a free-tier user opens Catches we keep the real Browse panel on screen
   (blurred, dimmed, non-interactive) and float the upsell card as a modal so
   they see what they're unlocking. No privileged data is fetched while locked. */
.catches-screen.is-locked {
  position: relative;
  overflow: hidden;
}

.catches-screen.is-locked .catches-panel {
  filter: blur(7px) saturate(0.92);
  opacity: 0.65;
  transform: scale(1.008);
  pointer-events: none;
  user-select: none;
}

.catches-screen.is-locked .catches-upsell-card {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 64px rgba(15, 40, 80, 0.12);
}

.catches-upsell-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: var(--accent-glow, rgba(0, 113, 227, 0.12));
  color: var(--accent, #0071e3);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Decorative photo-grid placeholders shown behind the blur while locked. */
.catches-teaser-tile {
  position: relative;
  height: 200px;
  border-radius: 14px;
  border: 1px solid var(--border, #e2e8f0);
  overflow: hidden;
  background:
    linear-gradient(145deg, #94a3b8 0%, #64748b 38%, #475569 100%);
}

.catches-teaser-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 35%,
    rgba(15, 23, 42, 0.72) 100%
  );
}

.catches-teaser-tile::after {
  content: attr(data-caption);
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.catches-panel {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.catches-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.catches-panel-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.catches-panel-sub {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.94rem;
  line-height: 1.5;
  max-width: 36rem;
}

/* Segmented tab control */
.catches-seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background: var(--bg-deep, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
}

.catches-seg-tab {
  border: none;
  background: transparent;
  color: var(--text-muted, #64748b);
  border-radius: 9px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.catches-seg-tab:hover:not(.active) {
  color: var(--text, #0f172a);
  background: rgba(255, 255, 255, 0.55);
}

.catches-seg-tab.active {
  background: var(--bg-card, #fff);
  color: var(--text, #0f172a);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

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

#catchesSectionSubmit {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Shared card surface */
.catches-surface {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}

.catches-callout {
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted, #64748b);
  background: var(--accent-glow, rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
}

/* Browse toolbar */
.catches-toolbar {
  padding: 18px 18px 14px;
  margin-bottom: 20px;
}

.catches-toolbar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.catches-toolbar-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catches-toolbar-hint {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--text-dim, #94a3b8);
  line-height: 1.4;
}

.catches-location-panel {
  width: 100%;
  margin-bottom: 0;
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}

.catches-location-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 2px;
}

.catches-location-hint {
  margin: 0;
  padding: 0;
  font-size: 0.84rem;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
  max-width: 42rem;
}

.catches-location-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.catches-location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catches-submit-map-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
  background: #e2e8f0;
}

.catches-submit-map {
  height: min(52vh, 420px);
  min-height: 320px;
  width: 100%;
  z-index: 0;
}

.catches-submit-map-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
  pointer-events: none;
}

.catches-submit-map-overlay.hidden {
  display: none;
}

.catches-location-display {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-surface, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  box-sizing: border-box;
}

.catches-location-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.catches-location-lake {
  margin: 6px 0 0;
  padding: 0;
  font-size: 0.84rem;
  color: var(--accent, #2563eb);
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.catches-location-lake.hidden {
  display: none;
}

.catches-location-coords {
  margin: 6px 0 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--text-dim, #94a3b8);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

/* Form fields */
.catches-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.catches-field-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
}

.catches-optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-dim, #94a3b8);
}

.catches-required {
  color: #ef4444;
}

.catches-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg-surface, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.catches-input::placeholder {
  color: var(--text-dim, #94a3b8);
}

.catches-input:hover {
  border-color: #cbd5e1;
}

.catches-input:focus {
  outline: none;
  border-color: var(--accent, #3b82f6);
  background: var(--bg-card, #fff);
  box-shadow: 0 0 0 3px var(--accent-glow, rgba(59, 130, 246, 0.2));
}

.catches-textarea {
  min-height: 96px;
  resize: vertical;
}

.catches-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text, #334155);
  cursor: pointer;
  user-select: none;
}

.catches-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent, #3b82f6);
  cursor: pointer;
}

/* Custom file picker */
.catches-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 22px 16px;
  border: 1.5px dashed var(--border, #cbd5e1);
  border-radius: 12px;
  background: var(--bg-surface, #f8fafc);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.catches-file:hover {
  border-color: var(--accent-dim, #2563eb);
  background: var(--accent-glow, rgba(59, 130, 246, 0.06));
}

.catches-file:has(input:focus-visible) {
  outline: none;
  border-color: var(--accent, #3b82f6);
  box-shadow: 0 0 0 3px var(--accent-glow, rgba(59, 130, 246, 0.2));
}

.catches-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.catches-field:has(.catches-file) {
  position: relative;
}

.catches-file-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.catches-consent-notice {
  margin: 0 0 10px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted, #64748b);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  max-width: 42rem;
}

.catches-file-hint {
  font-size: 0.78rem;
  color: var(--text-dim, #94a3b8);
}

.catches-file-name {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  word-break: break-all;
}

.catches-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

/* Buttons */
.catches-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.catches-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.catches-btn--primary {
  color: var(--on-accent, #fff);
  background: linear-gradient(135deg, var(--accent, #3b82f6), var(--blue, #2563eb));
  box-shadow: 0 2px 8px var(--accent-glow, rgba(59, 130, 246, 0.35));
}

.catches-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--accent-glow, rgba(59, 130, 246, 0.4));
}

.catches-btn--secondary {
  color: var(--text, #334155);
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
}

.catches-btn--secondary:hover:not(:disabled) {
  background: var(--bg-surface, #f8fafc);
  border-color: #cbd5e1;
}

.catches-btn--danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.catches-btn--danger:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #fca5a5;
}

.catches-btn--sm {
  padding: 8px 14px;
  font-size: 0.84rem;
}

.catches-btn--wide {
  width: 100%;
  max-width: 280px;
}

/* Browse results */
.catches-browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.catches-tile {
  overflow: hidden;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catches-tile-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-deep, #e2e8f0);
}

.catches-tile-media .catches-tile-img,
.catches-tile-media .catches-tile-img--placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
}

.catches-tile-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 14px 14px;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0.55) 42%,
    rgba(15, 23, 42, 0.82) 100%
  );
  color: #fff;
  pointer-events: none;
}

.catches-tile-caption .catches-tile-species {
  color: #fff;
  margin: 0 0 4px;
  font-size: 1.02rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.catches-tile-caption .catches-tile-meta {
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.catches-tile-caption .catches-tile-meta span {
  color: rgba(255, 255, 255, 0.75);
}

.catches-tile-caption .catches-tile-meta--detail {
  margin-top: 4px;
  opacity: 0.92;
}

.catches-tile--clickable {
  cursor: pointer;
  text-align: left;
  width: 100%;
  padding: 0;
  font: inherit;
  color: inherit;
  appearance: none;
}

.catches-tile--clickable:focus-visible {
  outline: 2px solid var(--accent, #3b82f6);
  outline-offset: 2px;
}

.catches-tile:hover,
.catches-tile--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.catches-tile-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--bg-deep, #e2e8f0);
}

.catches-tile-img--placeholder {
  background: linear-gradient(145deg, var(--bg-deep, #e2e8f0), var(--bg-surface, #f1f5f9));
}

.catches-tile-body {
  padding: 14px 16px 16px;
}

.catches-tile-species {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.catches-tile-meta {
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  margin: 0 0 4px;
  line-height: 1.45;
}

.catches-tile-meta span {
  font-weight: 600;
  color: var(--text-dim, #94a3b8);
}

.catches-tile-meta--loc {
  margin-bottom: 8px;
}

.catches-tile-meta--tap {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 0.75rem;
  color: var(--accent, #2563eb);
  font-weight: 500;
}

.catches-empty-state {
  padding: 32px 24px;
  text-align: center;
}

.catches-empty-state p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted, #64748b);
}

/* Community catch detail modal */
.catches-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

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

.catches-detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0.88;
}

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

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

.catches-detail-modal-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.catches-detail-modal-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.catches-detail-modal-close:hover {
  color: var(--text);
  background: var(--bg-surface);
}

.catches-detail-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
  background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
}

.catches-detail-hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: min(52vh, 440px);
  background: var(--bg-deep);
  flex-shrink: 0;
}

.catches-detail-hero-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(52vh, 440px);
  object-fit: contain;
  object-position: center;
}

.catches-detail-hero-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(145deg, var(--bg-deep), var(--bg-surface));
}

.catches-detail-content {
  padding: 16px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-card);
}

.catches-detail-rows {
  display: grid;
  gap: 10px;
}

.catches-detail-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.catches-detail-label {
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim, #94a3b8);
}

.catches-detail-value {
  color: var(--text);
  overflow-wrap: anywhere;
}

.catches-detail-story {
  margin: 0;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  white-space: pre-wrap;
}

.catches-detail-map-section {
  flex-shrink: 0;
  padding: 8px 18px 18px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.catches-detail-map-label {
  margin: 0 0 10px;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.catches-detail-map {
  width: 100%;
  height: min(42vh, 380px);
  min-height: 280px;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-deep);
}

.catches-empty-state a {
  color: var(--accent, #3b82f6);
  font-weight: 600;
  text-decoration: none;
}

.catches-empty-state a:hover {
  text-decoration: underline;
}

.catches-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.catches-page-info {
  font-size: 0.86rem;
  color: var(--text-muted, #64748b);
  font-variant-numeric: tabular-nums;
}

/* Submit form — same full width as location/map card above */
.catches-submit-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 18px 22px;
  box-sizing: border-box;
}

.catches-submit-form .catches-btn--wide {
  max-width: none;
}

.catches-submit-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 4px;
}

.catches-status {
  font-size: 0.86rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}

.catches-mine-intro {
  margin: 0 0 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted, #64748b);
  max-width: 42rem;
}

/* My catches */
.catches-mine-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.catches-mine-row {
  padding: 14px 16px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.catches-mine-row--clickable {
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.catches-mine-row--clickable:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}

.catches-mine-row:hover,
.catches-mine-row--clickable:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.catches-mine-row-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.catches-mine-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg-deep, #e2e8f0);
}

.catches-mine-thumb--placeholder {
  display: block;
}

.catches-mine-row-text {
  flex: 1;
  min-width: 0;
}

.catches-mine-row-tap {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--accent, #2563eb);
  font-weight: 500;
}

.catches-mine-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.catches-mine-row h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.catches-mine-row-meta,
.catches-mine-row-note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted, #64748b);
}

.catches-mine-row-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border, #f1f5f9);
}

.catches-logbook-panel {
  max-height: min(94vh, 920px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  isolation: isolate;
}

.catches-logbook-modal .catches-detail-modal-backdrop {
  background: #000;
  opacity: 0.88;
}

.catches-logbook-modal .catches-detail-modal-body,
.catches-logbook-modal .catches-detail-content,
.catches-logbook-modal .catches-detail-map-section {
  background: var(--bg-card);
}

.catches-logbook-modal .catches-detail-story {
  background: var(--bg-surface);
  color: var(--text-muted);
  border-color: var(--border);
}

.catches-logbook-footer {
  flex-shrink: 0;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border, #e2e8f0);
  background: var(--bg-card, #fff);
}

.catches-logbook-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.catches-logbook-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.catches-logbook-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.catches-logbook-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.catches-logbook-form .catches-field {
  margin: 0;
}

.catches-logbook-readonly {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted, #64748b);
}

.catches-logbook-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
  justify-content: center;
  background: var(--bg-deep);
}

.catches-logbook-photos img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(52vh, 440px);
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  display: block;
  margin: 0 auto;
}

.catches-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
}

.catches-badge--pending {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.catches-badge--approved {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.catches-badge--rejected {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

@media (max-width: 640px) {
  .catches-panel {
    padding: 20px 16px 40px;
  }

  .catches-seg {
    display: flex;
    width: 100%;
  }

  .catches-seg-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  .catches-toolbar-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .catches-toolbar-footer .catches-btn--primary {
    width: 100%;
  }

  .catches-btn--wide {
    max-width: none;
  }

  .catches-location-panel {
    padding: 16px 14px 18px;
  }

  .catches-submit-form {
    padding: 16px 14px 20px;
  }

  .catches-location-display {
    padding: 12px 14px;
  }

  .catches-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .catches-submit-map {
    min-height: 280px;
    height: min(45vh, 360px);
  }

  .catches-detail-map {
    min-height: 260px;
    height: min(44vh, 320px);
  }
}

/* ── 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-grid--analytics-active {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin-bottom: 20px;
}

/* Analytics dashboard (modern card layout) */
#adminPanelAnalytics {
  --an-panel-bg: #ffffff;
  --an-panel-border: #e8ecf1;
  --an-muted: #64748b;
  --an-text: #0f172a;
}

.an-dash-toolbar {
  margin-bottom: 18px;
}

.an-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.an-metric-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

.an-metric-card {
  background: var(--an-panel-bg);
  border: 1px solid var(--an-panel-border);
  border-radius: 14px;
  padding: 16px 16px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.an-metric-card--interactive {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.an-metric-card--interactive:hover,
.an-metric-card--interactive:focus-visible {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
  outline: none;
}

.an-metric-card--interactive:active {
  transform: translateY(1px);
}

.an-metric-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.an-metric-label {
  font-size: 0.82rem;
  color: var(--an-muted);
  font-weight: 500;
}

.an-metric-value {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--an-text);
  letter-spacing: -0.02em;
}

.an-metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.an-metric-icon--blue { background: #dbeafe; color: #2563eb; }
.an-metric-icon--green { background: #dcfce7; color: #16a34a; }
.an-metric-icon--purple { background: #ede9fe; color: #7c3aed; }
.an-metric-icon--orange { background: #ffedd5; color: #ea580c; }
.an-metric-icon--red { background: #fee2e2; color: #dc2626; }
.an-metric-icon--teal { background: #ccfbf1; color: #0d9488; }

.an-section-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--an-text);
  margin: 0 0 14px;
}

.an-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.an-insight-card {
  background: var(--an-panel-bg);
  border: 1px solid var(--an-panel-border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.an-insight-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 10px;
}

.an-insight-value {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--an-text);
  margin-bottom: 8px;
}

.an-insight-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--an-muted);
}

.an-chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.an-chart-row--single {
  grid-template-columns: 1fr;
}

.an-chart-panel {
  background: var(--an-panel-bg);
  border: 1px solid var(--an-panel-border);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.an-chart-panel--interactive {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.an-chart-panel--interactive:hover,
.an-chart-panel--interactive:focus-visible {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
  outline: none;
}

/* Dashboard overview (web-04C layout) */
.admin-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-dash-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
}

.admin-dash-panel-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.admin-dash-panel-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 2px 0 12px;
}

.admin-dash-donut-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-dash-donut-row .an-donut-wrap {
  flex: 0 0 auto;
}

.admin-dash-donut-row .an-donut-legend {
  flex: 1 1 160px;
  min-width: 150px;
}

.admin-dash-bignum {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-dash-bignum-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}

.admin-dash-bignum-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-dash-cards {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-stat-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
}

@media (max-width: 760px) {
  .admin-dash-grid {
    grid-template-columns: 1fr;
  }
}

.an-chart-panel--interactive:active {
  transform: translateY(1px);
}

.an-chart-modal-panel {
  max-width: min(920px, calc(100vw - 32px));
}

.an-chart-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 20px 12px;
}

.an-chart-modal-body {
  max-height: min(60vh, 480px);
  overflow: auto;
}

.an-chart-user-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.an-chart-user-section-title {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--an-text);
}

.an-chart-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--an-text);
}

.an-chart-sub {
  margin: 0 0 16px;
  font-size: 0.78rem;
  color: var(--an-muted);
}

.an-donut-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

.an-donut {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.an-donut-hole {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px #eef2f7;
}

.an-donut-total {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--an-text);
  line-height: 1;
}

.an-donut-total-label {
  font-size: 0.72rem;
  color: var(--an-muted);
  margin-top: 4px;
}

.an-donut-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  margin-top: 12px;
}

.an-donut-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--an-muted);
}

.an-donut-legend-item strong {
  color: var(--an-text);
  font-weight: 700;
}

.an-donut-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.an-vbar-chart-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  min-height: 220px;
  padding: 8px 4px 0;
  border-top: 1px solid #eef2f7;
}

.an-vbar-chart-inner--trend {
  min-height: 200px;
}

.an-vbar-col {
  flex: 1;
  min-width: 0;
  max-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.an-vbar-track {
  width: 100%;
  max-width: 52px;
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.an-vbar-fill {
  width: 100%;
  border-radius: 8px 8px 4px 4px;
  min-height: 4px;
  transition: height 0.25s ease;
}

.an-vbar-fill--blue { background: #3b82f6; }
.an-vbar-fill--green { background: #22c55e; }
.an-vbar-fill--purple { background: #8b5cf6; }
.an-vbar-fill--orange { background: #f97316; }
.an-vbar-fill--teal { background: #14b8a6; }
.an-vbar-fill--red { background: #ef4444; }

.an-vbar-label {
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--an-muted);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.an-vbar-meta {
  margin-top: 4px;
  font-size: 0.68rem;
  color: #94a3b8;
  text-align: center;
}

.an-vbar-pct {
  font-weight: 700;
  color: var(--an-text);
}

@media (max-width: 1100px) {
  .an-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .an-metric-grid,
  .an-insight-grid,
  .an-chart-row {
    grid-template-columns: 1fr;
  }
}

#adminPanelAnalytics .admin-section-title {
  margin-top: 8px;
}

#adminPanelAnalytics .admin-section-title:first-of-type {
  margin-top: 0;
}

.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(--admin-callout-border, var(--border));
  background: var(--admin-callout-bg, var(--bg-elevated));
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--admin-callout-text, var(--text));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.admin-screen .admin-hint {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--admin-callout-border, var(--border));
  background: var(--admin-callout-bg, var(--bg-elevated));
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--admin-callout-text, var(--text));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.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,
.analysis-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); }
}

.analyze-progress-wrap {
  width: 100%;
  max-width: 360px;
  margin-top: 8px;
}

.analyze-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.analyze-progress-percent {
  font-weight: 700;
  color: var(--accent);
}

.analyze-progress-eta {
  color: var(--text-muted);
  text-align: right;
}

.analyze-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-surface, rgba(0, 0, 0, 0.08));
  border: 1px solid var(--border);
  overflow: hidden;
}

.analyze-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-dim, #2563eb), var(--accent, #3b82f6), var(--blue, #60a5fa));
  transition: width 0.35s ease;
  box-shadow: 0 0 12px var(--accent-glow);
}

.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.nhd-lake-tt {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.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);
}

.recommendations .data-attribution-footer {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted, #5a6570);
}

.recommendations .data-attribution-footer a {
  color: var(--link, #1a6fb5);
}

/* 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--loading {
  animation: bait-thumb-pulse 1.1s ease-in-out infinite;
}

@keyframes bait-thumb-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.recommendations .bait-line-aside--loading .bait-aside-caption {
  color: var(--accent);
}

.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,
.recommendations .bait-product-thumb--retry {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-light);
}

.recommendations .bait-thumb-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}

.recommendations .bait-thumb-retry-btn:hover:not(:disabled) {
  color: var(--on-accent);
  background: var(--accent);
  transform: translateY(-1px);
}

.recommendations .bait-thumb-retry-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.recommendations .bait-product-thumb--retry.bait-product-thumb--loading .bait-thumb-retry-btn {
  pointer-events: none;
}

.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;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

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

  .panel-results {
    max-height: none;
    min-width: 0;
  }

  #map { height: 260px; }

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

  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "logo"
      "nav"
      "user";
    gap: 10px;
    padding: 12px 16px;
    align-items: center;
    justify-items: center;
    text-align: center;
  }

  .logo {
    grid-area: logo;
    flex: none;
    justify-content: center;
    width: 100%;
  }

  .header-main-nav {
    grid-area: nav;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .header-main-nav::-webkit-scrollbar {
    display: none;
  }

  .header-nav-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .user-bar {
    grid-area: user;
    width: 100%;
    max-width: 100%;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .user-email {
    flex: 1 1 100%;
    max-width: 100%;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-screen {
    padding: 0 16px 40px;
  }

  .admin-main-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
    gap: 8px;
    margin-left: -4px;
    margin-right: -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .admin-main-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-main-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 10px 12px;
  }
}

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

  .header-inner {
    padding: 10px 12px;
  }

  .logo h1 {
    font-size: 1.1rem;
  }

  .tagline {
    font-size: 0.62rem;
  }

  .btn-auth,
  .btn-logout {
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  .header-nav-tab {
    font-size: 0.72rem;
    padding: 6px 10px;
  }

  .admin-main-tab {
    font-size: 0.78rem;
    padding: 9px 10px;
  }
}

/* ── 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;
}
