﻿:root {
  color-scheme: dark;
}

html, body {
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

#app {
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

html.activity-modal-open,
html.activity-modal-open body {
  overscroll-behavior: none;
}

#view-map.view-active {
  display: block;
  min-height: 100%;
  overflow: hidden;
}

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

/* ─── Views ─── */
.view {
  display: none;
}

.view.view-active {
  display: block;
}

.view.flex-1.view-active {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
  padding-bottom: calc(5.25rem + env(safe-area-inset-bottom));
}

.view-header {
  padding: max(0.75rem, env(safe-area-inset-top)) 1rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ─── Glass cards ─── */
.glass-card {
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 33, 27, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* ─── Mapbox fullscreen ─── */
#mapboxMap {
  width: 100%;
  height: 100%;
}

.mapboxgl-ctrl-bottom-right {
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px)) !important;
}

.mapboxgl-ctrl-bottom-left {
  /* Logo / credit Mapbox restano bassi, sotto il tasto localizza */
  bottom: calc(5.15rem + env(safe-area-inset-bottom, 0px)) !important;
  left: 0.55rem !important;
  z-index: 12 !important;
}

.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-geolocate {
  /* Controllo Mapbox tenuto per API/marker; UI propria sotto */
  display: none !important;
}

.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-attrib {
  margin: 0 !important;
  opacity: 0.85;
}

.map-search-float {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  left: 1rem;
  right: 1rem;
  z-index: 20;
}

.map-locate-btn {
  position: absolute;
  left: 0.7rem;
  /* Poco sopra la scritta/logo Mapbox, lontano dal link cliccabile */
  bottom: calc(7.35rem + env(safe-area-inset-bottom, 0px));
  z-index: 48;
  width: 2.85rem;
  height: 2.85rem;
  display: grid;
  place-items: center;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 28, 24, 0.94);
  color: #e7e5e4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.map-locate-btn svg {
  width: 1.35rem;
  height: 1.35rem;
}
.map-locate-btn:active {
  transform: scale(0.96);
}
.map-locate-btn.is-busy {
  opacity: 0.7;
  pointer-events: none;
}
.map-locate-btn.is-active {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.45);
  background: rgba(14, 40, 52, 0.95);
}

/* ─── Bottom Sheet ─── */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 54;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(1px);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  max-height: min(88dvh, 100%);
  display: flex;
  flex-direction: column;
  border-radius: 1.5rem 1.5rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  background: rgba(10, 23, 19, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translate3d(0, 100%, 0);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  padding-bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.bottom-sheet.is-open {
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.sheet-handle {
  display: flex;
  justify-content: center;
  padding: 0.55rem 0 0.15rem;
  flex-shrink: 0;
}

.sheet-handle span {
  width: 2.5rem;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0.35rem 1rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 23, 19, 0.98);
}

.sheet-close-btn {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: #173028;
  color: #e7e5e4;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 1.25rem;
  line-height: 1;
}

.sheet-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.85rem 1.15rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  max-height: none;
}

#lakeName {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.view.flex-1 {
  min-height: 0;
}

#view-profile.view-active,
#view-baits.view-active,
#view-community.view-active,
#view-market.view-active {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(5.25rem + env(safe-area-inset-bottom));
}

.modal-card {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

/* ─── Species cards ─── */
.species-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a1713;
}

.lake-activity-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  border-radius: 1rem;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(14, 40, 48, 0.55);
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.lake-activity-btn:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(14, 40, 48, 0.8);
}
.activity-temp-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.35rem 0.4rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.08);
  flex-shrink: 0;
}
.activity-temp-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.activity-temp-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a8a29e;
  margin-top: 0.1rem;
}
.activity-ring {
  --p: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(#38bdf8 calc(var(--p) * 1%), rgba(255,255,255,0.08) 0);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
}
.activity-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #0a1713;
}
.activity-ring-value {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 700;
  color: #e7e5e4;
}
.activity-ring-meta { min-width: 0; flex: 1; }
.activity-ring-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e7e5e4;
  margin: 0;
}
.activity-ring-hint {
  font-size: 0.7rem;
  color: #38bdf8;
  margin: 0.15rem 0 0;
}
.activity-ring-cta {
  font-size: 0.65rem;
  color: #78716c;
  margin: 0.25rem 0 0;
}
/* ─── Activity / weather modal — fullscreen verticale mobile ─── */
#activityDetailModal.activity-modal,
.activity-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  z-index: 99999 !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: #06110d !important;
  pointer-events: auto !important;
  touch-action: pan-y;
  display: block;
}
.activity-modal.hidden,
#activityDetailModal.hidden {
  display: none !important;
  pointer-events: none !important;
}
.activity-modal-close {
  position: fixed !important;
  top: max(0.65rem, env(safe-area-inset-top, 0px)) !important;
  right: max(0.65rem, env(safe-area-inset-right, 0px)) !important;
  left: auto !important;
  z-index: 100000 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  margin: 0 !important;
  padding: 0.7rem 1.05rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  background: #1f3d33 !important;
  color: #fafaf9 !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55) !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto !important;
}
.activity-modal-close svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}
.activity-modal-close:active {
  transform: scale(0.97);
  background: #2a5244 !important;
}
.activity-modal-inner {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  box-sizing: border-box;
  display: block;
  padding:
    calc(4.1rem + env(safe-area-inset-top, 0px))
    1rem
    max(1.75rem, calc(env(safe-area-inset-bottom, 0px) + 1.25rem))
    1rem;
  overflow-x: hidden;
}
.activity-modal-header {
  margin: 0 0 0.85rem;
  padding: 0;
  max-width: 100%;
}
.activity-modal-body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
.activity-weather-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 420px) {
  .activity-weather-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .activity-modal-inner {
    max-width: 32rem;
    margin: 0 auto;
  }
}
.activity-weather-chip {
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(16, 33, 27, 0.9);
  padding: 0.55rem 0.4rem;
  text-align: center;
  min-width: 0;
  overflow: hidden;
}
.activity-weather-chip strong {
  display: block;
  font-size: 0.75rem;
  color: #e7e5e4;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.activity-weather-chip span {
  display: block;
  font-size: 0.58rem;
  color: #78716c;
  margin-top: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.activity-hourly-wrap,
.activity-weekly-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  box-sizing: border-box;
}
.activity-hourly-chart {
  display: flex;
  gap: 0.45rem;
  width: max-content;
  max-width: none;
  min-width: 0;
  padding: 0.35rem 0.1rem 0.55rem;
  scroll-snap-type: x mandatory;
  box-sizing: border-box;
}
.activity-hourly-chart::-webkit-scrollbar { height: 4px; }
.activity-hourly-chart::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 4px;
}
.activity-hour-cell {
  flex: 0 0 auto;
  width: 3.35rem;
  scroll-snap-align: start;
  border-radius: 0.85rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(20, 48, 56, 0.95), rgba(10, 23, 19, 0.95));
  padding: 0.55rem 0.3rem 0.5rem;
  text-align: center;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.activity-hour-cell.is-now {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.15);
}
.activity-hour-cell.is-selected {
  border-color: rgba(228, 184, 106, 0.55);
  box-shadow: 0 0 0 1px rgba(228, 184, 106, 0.2);
  background: linear-gradient(180deg, rgba(50, 40, 20, 0.95), rgba(20, 16, 10, 0.95));
}
.activity-hour-time {
  display: block;
  font-size: 0.62rem;
  color: #a8a29e;
  margin-bottom: 0.35rem;
}
.activity-hour-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 0.35rem;
  color: #fbbf24;
}
.activity-hour-icon svg { width: 100%; height: 100%; }
.activity-hour-temp {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #e7e5e4;
}
.activity-hour-wind {
  display: block;
  font-size: 0.55rem;
  color: #78716c;
  margin-top: 0.2rem;
}
.activity-weekly-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}
.activity-day-cell {
  border-radius: 0.85rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(20, 48, 56, 0.95), rgba(10, 23, 19, 0.95));
  padding: 0.5rem 0.25rem;
  text-align: center;
  cursor: pointer;
  color: inherit;
  font: inherit;
  width: 100%;
}
.activity-day-cell.is-today {
  border-color: rgba(228, 184, 106, 0.45);
}
.activity-day-cell.is-selected {
  border-color: rgba(134, 239, 172, 0.5);
  box-shadow: 0 0 0 1px rgba(134, 239, 172, 0.18);
  background: linear-gradient(180deg, rgba(20, 50, 36, 0.95), rgba(10, 24, 18, 0.95));
}
.activity-day-name {
  display: block;
  font-size: 0.62rem;
  color: #a8a29e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.activity-day-temp {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e7e5e4;
  margin: 0.25rem 0 0.15rem;
}
.activity-day-score {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #86efac;
}
.activity-day-icon {
  width: 22px;
  height: 22px;
  margin: 0.2rem auto;
  color: #fbbf24;
}
.activity-day-icon svg { width: 100%; height: 100%; }
.activity-species-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(10, 23, 19, 0.7);
  padding: 0.55rem 0.7rem;
}
.activity-species-row .bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  flex: 1;
  overflow: hidden;
}
.activity-species-row .bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #8fd47a);
  border-radius: inherit;
}
.activity-premium-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 1rem;
  background: rgba(6, 17, 13, 0.82);
  backdrop-filter: blur(6px);
  padding: 1rem;
}
#activityPremiumBlock.is-locked #activitySpeciesList {
  filter: blur(7px);
  opacity: 0.45;
  user-select: none;
  pointer-events: none;
}

.species-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  background: #000;
}

.species-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.35rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-align: center;
  background: linear-gradient(transparent, rgba(6, 17, 13, 0.92));
  color: #e7e5e4;
}

/* ─── Chat bubbles ─── */
.chat-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.7rem 1rem;
  border-radius: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.45;
  animation: bubbleIn 0.25s ease;
}

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

.chat-bubble-ai {
  background: rgba(23, 48, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #e7e5e4;
  border-bottom-left-radius: 0.35rem;
}

.chat-bubble-user {
  background: linear-gradient(135deg, #6bbf54, #8fd47a);
  color: #06110d;
  font-weight: 500;
  border-bottom-right-radius: 0.35rem;
  margin-left: auto;
}

.chat-bubble-community {
  background: rgba(23, 48, 40, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
}

.chat-bubble-community .author {
  font-size: 0.65rem;
  color: #8fd47a;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

/* ─── Premium lock overlay ─── */
.premium-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(6, 17, 13, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

/* ─── Community rooms ─── */
.community-section-label {
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(168, 162, 158, 0.9);
}

.community-room {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 33, 27, 0.8);
  padding: 0.85rem 1rem;
  transition: background 0.15s;
  text-align: left;
  color: inherit;
}

.community-room:hover {
  background: rgba(23, 48, 40, 0.9);
}

.community-room.is-invite {
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.community-invite-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.community-flag {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 0.1rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.community-invite-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.community-invite-confirm,
.community-invite-decline {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 0.85rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.community-invite-confirm {
  background: rgba(132, 204, 22, 0.18);
  color: #bef264;
  border: 1px solid rgba(163, 230, 53, 0.35);
}

.community-invite-decline {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.community-room.is-leaving {
  opacity: 0;
  transform: translateX(12px) scale(0.98);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  border-width: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease, padding 0.2s ease, margin 0.2s ease;
}

/* Free species picker must cover IA chat below */
#baitAdvisorFree {
  position: relative;
  z-index: 60;
}
#baitAdvisorPremium {
  position: relative;
  z-index: 1;
}
.cm-combo-panel--overlay {
  z-index: 90;
  max-height: min(70vh, 26rem);
}
.cm-combo-panel--overlay .cm-combo-list {
  max-height: min(55vh, 20rem);
}

.room-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

/* ─── Toggle switch ─── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #173028;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  border-radius: 50%;
  background: #78716c;
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(143, 212, 122, 0.25);
  border-color: rgba(143, 212, 122, 0.5);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: #8fd47a;
}

/* ─── Language buttons ─── */
.lang-btn {
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 23, 19, 0.8);
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  color: #a8a29e;
  transition: all 0.15s;
}

.lang-btn.is-active {
  border-color: rgba(143, 212, 122, 0.5);
  background: rgba(143, 212, 122, 0.1);
  color: #8fd47a;
  font-weight: 600;
}

/* ─── Navigation ─── */
.nav-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem 0.1rem;
  color: #78716c;
  font-size: 0.6rem;
  transition: color 0.15s;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
}

.nav-btn.is-active {
  color: #8fd47a;
}

/* ─── Fields ─── */
.field {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 23, 19, 0.9);
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  color: #e7e5e4;
  outline: none;
}

.field:focus {
  border-color: rgba(143, 212, 122, 0.55);
}

/* ─── Listings ─── */
.listing-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 33, 27, 0.8);
  padding: 0.85rem;
  width: 100%;
  text-align: left;
  color: inherit;
}
.listing-card.is-clickable {
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.listing-card.is-clickable:hover {
  background: rgba(23, 48, 40, 0.95);
  border-color: rgba(143, 212, 122, 0.25);
}
.listing-card-img {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  object-fit: cover;
  flex-shrink: 0;
  background: #0c1612;
}
.listing-detail-hero {
  border-radius: 1.1rem;
  overflow: hidden;
  background: #0c1612;
  min-height: 12rem;
  display: grid;
  place-items: center;
}
.listing-detail-img {
  width: 100%;
  max-height: 18rem;
  object-fit: contain;
  display: block;
}
.market-detail-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(85%, 1fr);
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: 1.1rem;
}
.market-detail-gallery img {
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  background: #0c1612;
  border-radius: 1rem;
  scroll-snap-align: start;
  border: 1px solid rgba(255,255,255,0.08);
}
.market-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  padding: 0.25rem 0.65rem;
  color: #d6d3d1;
}

.thumb {
  height: 64px;
  width: 64px;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: #173028;
  flex-shrink: 0;
}

/* ─── Modals ─── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.75rem max(0.5rem, env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal.hidden { display: none; }

.modal-card {
  width: min(100%, 28rem);
  max-width: 100%;
  padding: 1.25rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  margin: auto;
  box-sizing: border-box;
}

/* ─── Scan spinner ─── */
.scan-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(143, 212, 122, 0.2);
  border-top-color: #8fd47a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── Toast ─── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #8fd47a;
  color: #06110d;
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  max-width: calc(100vw - 2rem);
}

.toast.hidden { display: none; }

/* ─── Mapbox lake layer cursor ─── */
.mapboxgl-canvas-container.map-lake-clickable {
  cursor: pointer;
}

/* ─── Profile tabs ─── */
.profile-tabs { display: flex; }
.profile-tab {
  flex: 1;
  border-radius: 0.75rem;
  padding: 0.55rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #78716c;
  transition: all 0.15s;
}
.profile-tab.is-active {
  background: rgba(143, 212, 122, 0.15);
  color: #8fd47a;
}
.profile-panel.hidden { display: none; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ─── Gear / bait arsenal (profile) ─── */
.gear-arsenal-card {
  border-radius: 1.35rem;
  border: 1px solid rgba(143, 212, 122, 0.14);
  background:
    radial-gradient(ellipse at top right, rgba(143, 212, 122, 0.08), transparent 45%),
    linear-gradient(165deg, rgba(16, 33, 27, 0.96) 0%, rgba(10, 23, 19, 0.99) 100%);
  padding: 1.15rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}

.gear-arsenal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.gear-arsenal-kicker {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fd47a;
}

.gear-arsenal-title {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 0.15rem;
  color: #f5f5f4;
}

.gear-arsenal-sub {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #a8a29e;
  margin-top: 0.35rem;
  max-width: 18rem;
}

.gear-slot-wrap {
  flex-shrink: 0;
  text-align: right;
  max-width: 8.5rem;
}

.gear-slot-badge {
  display: inline-block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #e7e5e4;
  letter-spacing: 0.02em;
}
.gear-slot-badge.is-premium {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}
.gear-slot-legend {
  margin-top: 0.35rem;
  font-size: 0.62rem;
  line-height: 1.35;
  color: #78716c;
}

.gear-capture-row {
  text-align: center;
  margin-bottom: 1rem;
}

.gear-capture-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 1rem;
  border: 1px dashed rgba(143, 212, 122, 0.45);
  background: rgba(143, 212, 122, 0.08);
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #b7e3a8;
  transition: background 0.2s, border-color 0.2s;
}

.gear-capture-btn:hover {
  background: rgba(143, 212, 122, 0.14);
  border-color: rgba(143, 212, 122, 0.65);
}

.gear-capture-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.gear-capture-hint {
  margin-top: 0.45rem;
  font-size: 0.68rem;
  color: #78716c;
}

.gear-scan-box {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
  align-items: center;
  border-radius: 1rem;
  border: 1px solid rgba(143, 212, 122, 0.25);
  background: rgba(143, 212, 122, 0.06);
  padding: 0.65rem;
  margin-bottom: 1rem;
}

.gear-scan-img {
  width: 72px;
  height: 72px;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gear-scan-status {
  font-size: 0.72rem;
  color: #a8a29e;
}

.gear-scan-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f5f5f4;
  margin-top: 0.2rem;
}

.gear-scan-confirm {
  margin-top: 0.45rem;
  border-radius: 0.65rem;
  background: #8fd47a;
  color: #06110d;
  padding: 0.35rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.gear-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.gear-card {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 17, 13, 0.65);
  overflow: hidden;
  text-align: left;
  position: relative;
}

.gear-card-remove {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 3;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 17, 13, 0.82);
  color: #fafaf9;
  font-size: 1.05rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.gear-card-remove:hover {
  background: rgba(185, 28, 28, 0.9);
  border-color: rgba(248, 113, 113, 0.5);
}

.gear-remove-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(3, 8, 6, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.gear-remove-overlay.hidden { display: none !important; }
.gear-remove-dialog {
  width: min(100%, 22rem);
  border-radius: 1.25rem;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: #1a0f0f;
  padding: 1.35rem 1.25rem 1.2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.gear-remove-banner-text {
  font-size: 1rem;
  font-weight: 600;
  color: #fecaca;
  line-height: 1.4;
  text-align: center;
  margin-bottom: 1rem;
}
.gear-remove-banner-actions {
  display: flex;
  gap: 0.6rem;
}
.gear-remove-confirm {
  flex: 1;
  border-radius: 0.95rem;
  background: #dc2626;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.85rem 0.75rem;
}
.gear-remove-cancel {
  flex: 1;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.1);
  color: #e7e5e4;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.85rem 0.75rem;
}

.gear-card-photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.gear-card-photo-btn:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.7);
  outline-offset: 2px;
}
.gear-card-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.04);
}

.gear-card-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.03);
}

.gear-card-body {
  padding: 0.55rem 0.65rem 0.65rem;
}

.gear-card-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e7e5e4;
  line-height: 1.25;
}

.gear-card-tag {
  margin-top: 0.2rem;
  font-size: 0.6rem;
  color: #8fd47a;
}

.gear-card.locked {
  border-color: rgba(228, 184, 106, 0.28);
  background: rgba(228, 184, 106, 0.04);
}

.gear-card-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(6, 17, 13, 0.72);
  font-size: 0.65rem;
  color: #e4b86a;
  gap: 0.25rem;
}

.gear-premium-tip {
  margin-top: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(228, 184, 106, 0.22);
  background: rgba(228, 184, 106, 0.06);
  padding: 0.75rem;
}

.gear-premium-tip-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e4b86a;
  margin-bottom: 0.55rem;
}

.gear-premium-rec {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.gear-premium-rec img {
  width: 52px;
  height: 52px;
  border-radius: 0.65rem;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.gear-premium-rec p {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #d6d3d1;
}

/* legacy grid (unused) */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.gear-slot {
  aspect-ratio: 1;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 23, 19, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  text-align: center;
  font-size: 0.62rem;
  position: relative;
}
.gear-slot.locked {
  border-color: rgba(228, 184, 106, 0.3);
  background: rgba(228, 184, 106, 0.05);
}
.gear-slot.filled { border-color: rgba(143, 212, 122, 0.35); }
.gear-slot svg { width: 18px; height: 18px; margin-bottom: 0.2rem; }

/* ─── Species advice premium lock ─── */
.species-advice-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(6, 17, 13, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.species-advice-lock.hidden { display: none; }
#speciesAdvicePremium.is-locked #speciesAdviceAi { filter: blur(8px); opacity: 0.5; }

/* ─── Species full-screen lightbox ─── */
.species-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 17, 13, 0.97);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: env(safe-area-inset-top, 0px);
}
.species-lightbox.hidden { display: none; }
.species-lightbox-inner {
  max-width: 32rem;
  margin: 0 auto;
  min-height: 100%;
  padding-bottom: max(3rem, calc(env(safe-area-inset-bottom) + 2rem));
}
.species-lightbox-close {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 1rem 0;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(10, 23, 19, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d6d3d1;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
}
.species-lightbox-hero {
  position: relative;
  margin: 0.75rem 1rem 0;
  border-radius: 1.25rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #0a1713;
}
.species-lightbox-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.species-lightbox-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 17, 13, 0.95) 0%, transparent 55%);
}
.species-lightbox-title {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  font-size: 1.75rem;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.species-lightbox-body { padding: 1.25rem 1rem 0; }
.species-lightbox-section { margin-bottom: 1.25rem; }
.species-lightbox-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #78716c;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.species-lightbox-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #d6d3d1;
}
.species-lightbox-premium { min-height: 5rem; }
#speciesLightboxPremium.is-locked #speciesLightboxAi {
  filter: blur(8px);
  opacity: 0.45;
  user-select: none;
}

.species-lightbox-hero--icon .species-lightbox-img { display: none; }
.species-lightbox-fallback-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 4rem;
  z-index: 1;
}
.species-lightbox-hero--icon .species-lightbox-hero-overlay { opacity: 0.85; }
/* specie senza immagine: solo il nome, niente riquadro foto */
.species-lightbox-hero.species-lightbox-hero--text { aspect-ratio: auto; max-height: none; background: transparent; border-radius: 0; margin-top: 3.25rem; }
.species-lightbox-hero--text .species-lightbox-img, .species-lightbox-hero--text .species-lightbox-hero-overlay { display: none; }
.species-lightbox-hero--text .species-lightbox-title { position: static; text-shadow: none; padding: 0 0.25rem; }

/* ─── Hotspot map markers ─── */
.hotspot-pin {
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: transform 0.15s;
}
.hotspot-pin:hover { transform: scale(1.08); }
.hotspot-pin.is-locked { opacity: 0.55; }
.hotspot-pin-inner {
  width: 100%;
  height: 100%;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e4b86a;
  background: rgba(16, 33, 27, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.hotspot-pin-inner svg { transform: rotate(45deg); }
.search-spot-pin {
  width: 28px;
  height: 28px;
  cursor: pointer;
}
.search-spot-pin-inner {
  width: 100%;
  height: 100%;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #38bdf8;
  background: rgba(14, 116, 144, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.hotspot-popup .mapboxgl-popup-content {
  background: #0a1713;
  border: 1px solid rgba(228, 184, 106, 0.25);
  border-radius: 0.75rem;
  padding: 0.75rem;
  color: #d6d3d1;
  font-size: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.hotspot-popup .mapboxgl-popup-tip { border-top-color: #0a1713; }

.species-card-wrap { position: relative; }
.species-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(10, 23, 19, 0.85);
  color: #fca5a5;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.species-remove-btn:hover { background: rgba(127, 29, 29, 0.85); color: #fff; }

.species-card { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; border: none; background: transparent; padding: 0; text-align: center; width: 100%; }
.species-icon-placeholder {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 0.75rem;
  background: rgba(28, 75, 94, 0.35);
  border: 1px solid rgba(56, 189, 248, 0.15);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
}
.species-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(56, 189, 248, 0.2); }
.species-card.is-selected { outline: 2px solid #8fd47a; outline-offset: 2px; }

/* ─── Light mode ─── */
html:not(.dark) body {
  background: #f5f5f4;
  color: #1c1917;
}
html:not(.dark) .glass-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.08);
}
html:not(.dark) .field {
  background: #fff;
  color: #1c1917;
  border-color: rgba(0, 0, 0, 0.12);
}
html:not(.dark) .view-header { border-color: rgba(0, 0, 0, 0.08); }
html:not(.dark) nav { background: rgba(255, 255, 255, 0.92); border-color: rgba(0, 0, 0, 0.08); }
html:not(.dark) .nav-btn { color: #78716c; }
html:not(.dark) .nav-btn.is-active { color: #4d7c0f; }

/* ─── Combo pickers (lang / target species) ─── */
.cm-combo { position: relative; }
.cm-combo--drop-up { z-index: 35; }
.cm-combo--overlay { z-index: 50; }
.cm-combo-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  cursor: pointer;
}
.cm-combo-btn-main {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.cm-combo-chevron { color: #a8a29e; font-size: 0.75rem; }
.cm-combo-panel {
  position: absolute;
  z-index: 40;
  left: 0; right: 0;
  top: calc(100% + 0.35rem);
  padding: 0.55rem;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(12, 22, 18, 0.98);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  max-height: 16rem;
  display: flex;
  flex-direction: column;
}
.cm-combo-panel--overlay {
  z-index: 70;
  max-height: 18rem;
  box-shadow: 0 22px 55px rgba(0,0,0,0.6);
}
.cm-combo-panel--up {
  top: auto;
  bottom: calc(100% + 0.35rem);
  max-height: 14rem;
  box-shadow: 0 -12px 36px rgba(0,0,0,0.4);
}
.cm-combo-list {
  overflow-y: auto;
  max-height: 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.cm-combo-panel--up .cm-combo-list { max-height: 10rem; }
.cm-combo-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  border-radius: 0.7rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.8rem;
  color: #e7e5e4;
  background: transparent;
  border: 1px solid transparent;
}
.cm-combo-item:hover { background: rgba(255,255,255,0.05); }
.cm-combo-item.is-active {
  border-color: rgba(143, 212, 122, 0.35);
  background: rgba(143, 212, 122, 0.1);
}
.cm-combo-item--species { padding-right: 0.4rem; }
.cm-lang-flag {
  width: 1.35rem;
  height: 1rem;
  object-fit: cover;
  border-radius: 0.15rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
  background: #1c1917;
}
.cm-combo-species-img {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
}
.cm-combo-check {
  margin-left: auto;
  color: #8fd47a;
  font-size: 0.75rem;
  min-width: 0.9rem;
}
.target-species-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.target-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  padding: 0.2rem 0.55rem 0.2rem 0.2rem;
  font-size: 0.7rem;
  color: #d6d3d1;
}
.target-chip img {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  object-fit: cover;
  background: #000;
}

/* ─── Backpack shelf ─── */
.gear-backpack-card { position: relative; overflow: hidden; }
.backpack-shelf {
  height: 0.35rem;
  margin: -0.25rem 0 0.85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(143,212,122,0.35), transparent);
}
.backpack-grid .gear-card {
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.15));
}

/* ─── Species coach media ─── */
.species-coach-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.species-coach-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  padding-bottom: 0.35rem;
}
@media (min-width: 420px) {
  .species-lightbox .species-coach-steps {
    grid-template-columns: 1fr 1fr;
  }
}
/* In chat: always stack all 4 knot steps so the 4th is never clipped off-grid */
.chat-bubble-ai .species-coach-steps {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: none;
  overflow: visible;
}
.species-lightbox .species-coach-steps {
  max-height: none;
  overflow: visible;
}
.species-coach-step:nth-child(4) {
  scroll-margin-bottom: 1.5rem;
}
.species-coach-step {
  margin: 0;
  border-radius: 0.85rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.28);
  overflow: hidden;
  min-height: 0;
}
.species-coach-step img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #f4f7f5;
  display: block;
  min-height: 7rem;
}
.species-coach-step figcaption {
  padding: 0.35rem 0.5rem 0.5rem;
  font-size: 0.65rem;
  color: #a8a29e;
  text-align: center;
}
.chat-coach-media {
  margin-top: 0.65rem;
  padding-top: 0.35rem;
  overflow: visible;
}
.chat-bubble-ai .species-coach-steps {
  max-width: 100%;
}
.ai-media-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.ai-media-open:hover img {
  outline: 1px solid rgba(228, 184, 106, 0.45);
}
.ai-maps-link {
  color: #e4b86a;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}
.ai-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.ai-media-lightbox.hidden {
  display: none;
}
.ai-media-lightbox-img {
  max-width: min(960px, 94vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  background: #0c1612;
}
.ai-media-lightbox-close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(20,20,20,0.8);
  color: #f5f5f4;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
#chatMessages {
  height: min(42dvh, 22rem);
  max-height: min(42dvh, 22rem);
  min-height: 12rem;
  scroll-behavior: smooth;
}
#communityMessages {
  height: min(40dvh, 20rem);
  max-height: min(40dvh, 20rem);
  min-height: 10rem;
}
#marketDmMessages {
  height: min(36dvh, 18rem);
  max-height: min(36dvh, 18rem);
  min-height: 9rem;
}
.species-coach-step figcaption {
  padding: 0.35rem 0.5rem 0.45rem;
  font-size: 0.65rem;
  color: #a8a29e;
}
.species-coach-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.25);
  padding: 0.45rem;
  font-size: 0.65rem;
  color: #d6d3d1;
  text-decoration: none;
}
.species-coach-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #000;
  border-radius: 0.55rem;
}
.ai-list {
  margin: 0.45rem 0 0.55rem 0.9rem;
  padding: 0;
  list-style: disc;
}
.ai-list li {
  margin: 0.2rem 0;
  line-height: 1.35;
  color: #e7e5e4;
}
.chat-bubble-ai .chat-bubble-text p {
  margin: 0.35rem 0;
}
.chat-bubble-ai .chat-bubble-text p:first-child {
  margin-top: 0;
}
.chat-typing .chat-bubble-text {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.85;
}
.gear-fetch-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #a8a29e;
}
.gear-fetch-status[hidden] {
  display: none !important;
}
#gearManualAddBtn.is-busy,
#gearManualAddBtn:disabled {
  opacity: 0.7;
  cursor: wait;
}
.cm-busy-label {
  color: inherit;
}
.cm-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  height: 1em;
}
.cm-dots i {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: cm-dot-bounce 1.05s infinite ease-in-out;
}
.cm-dots i:nth-child(2) { animation-delay: 0.15s; }
.cm-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes cm-dot-bounce {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-0.18rem); }
}
.species-coach-card--video {
  align-items: center;
  justify-content: center;
  min-height: 6.5rem;
}
#lakeSpeciesLoadingText {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.species-coach-play {
  font-size: 1.4rem;
  color: #fbbf24;
}

/* ─── First-launch tutorial ─── */
.app-tutorial {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem 0.75rem calc(5.25rem + env(safe-area-inset-bottom, 0px));
  /* Light veil: page behind stays readable */
  background: linear-gradient(
    to top,
    rgba(2, 8, 5, 0.55) 0%,
    rgba(2, 8, 5, 0.18) 42%,
    rgba(2, 8, 5, 0.06) 100%
  );
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
}
.app-tutorial.hidden { display: none !important; }
body.tutorial-open { overflow: hidden; }
.app-tutorial-card {
  pointer-events: auto;
  width: min(100%, 24rem);
  max-height: min(42vh, 20rem);
  overflow-y: auto;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 18, 14, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 1rem 1rem 0.95rem;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  animation: tutorial-card-in 0.35s ease-out;
}
@keyframes tutorial-card-in {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}
.app-tutorial-step {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a3e635;
}
.app-tutorial-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fafaf9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.app-tutorial-body {
  font-size: 0.88rem;
  line-height: 1.42;
  color: #f5f5f4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.app-tutorial-body p {
  margin: 0 0 0.45rem;
}
.app-tutorial-body p:last-child {
  margin-bottom: 0;
}
.app-tutorial-body strong {
  color: #ecfccb;
  font-weight: 700;
}
.app-tutorial-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.9rem;
}
.app-tutorial-skip {
  flex: 0 0 auto;
  min-width: 4.5rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e7e5e4;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.75rem 0.85rem;
}
.app-tutorial-next {
  flex: 1;
  border-radius: 0.95rem;
  background: #a3e635;
  color: #052e16;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem 0.85rem;
}
@media (min-width: 640px) {
  .app-tutorial {
    align-items: flex-end;
    justify-content: center;
    padding: 1.25rem 1.25rem 1.5rem;
  }
  .app-tutorial-card {
    max-height: min(38vh, 18.5rem);
  }
}
.app-tutorial-body .tut-ex {
  border-left: 2px solid rgba(163, 230, 53, 0.55);
  padding-left: 0.65rem;
  margin-bottom: 0.55rem;
  color: #fafaf9;
}

/* AI suggestion chips */
.ai-suggest-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.15rem 0 0.35rem;
}
.ai-suggest-chip {
  border-radius: 999px;
  border: 1px solid rgba(163, 230, 53, 0.35);
  background: rgba(20, 40, 28, 0.9);
  color: #d9f99d;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  line-height: 1.1;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.ai-suggest-chip:active {
  transform: scale(0.97);
}
.ai-suggest-chip:hover {
  background: rgba(40, 70, 45, 0.95);
  border-color: rgba(163, 230, 53, 0.6);
}

.ai-follow-bar { padding-top: 0.1rem; }
.ai-follow-bar .ai-suggest-chip { font-weight: 500; font-size: 0.76rem; }
.ai-place-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0 0 0.45rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(8, 47, 73, 0.55);
  color: #bae6fd;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.ai-place-pill:hover { border-color: rgba(56, 189, 248, 0.75); }
.ai-place-near { color: #7dd3fc; font-weight: 500; }

/* Auth */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #78716c;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.auth-google-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #fff;
  color: #1f2937;
  font-size: 0.9rem;
  font-weight: 650;
  padding: 0.8rem 1rem;
  transition: background 0.15s ease, transform 0.12s ease;
}
.auth-google-btn:hover { background: #f3f4f6; }
.auth-google-btn:active { transform: scale(0.99); }
.auth-google-btn:disabled { opacity: 0.55; }
.auth-google-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* ─── Mobile polish ─── */
.mapboxgl-ctrl-bottom-right {
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px)) !important;
}
.mapboxgl-ctrl-bottom-left {
  bottom: calc(5.15rem + env(safe-area-inset-bottom, 0px)) !important;
}
.map-locate-btn {
  bottom: calc(7.35rem + env(safe-area-inset-bottom, 0px));
}
#communityContent {
  position: relative;
  min-height: calc(100dvh - 9rem - env(safe-area-inset-bottom, 0px));
}
@media (max-width: 400px) {
  .activity-weekly-chart {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .activity-day-cell {
    flex: 0 0 3rem;
    width: 3rem;
    scroll-snap-align: start;
  }
  .lake-activity-btn { gap: 0.5rem; padding: 0.6rem 0.65rem; }
  .activity-ring { width: 52px; height: 52px; }
}
@media (max-height: 700px) {
  #chatMessages {
    height: min(36dvh, 16rem);
    max-height: min(36dvh, 16rem);
    min-height: 10rem;
  }
  #communityMessages,
  #marketDmMessages {
    height: min(32dvh, 14rem);
    max-height: min(32dvh, 14rem);
  }
  .market-detail-gallery img { max-height: 36dvh; }
  .species-lightbox-hero { aspect-ratio: 16/9; max-height: 40dvh; }
}
@media (max-height: 500px) {
  .app-tutorial-card { max-height: min(55dvh, 18rem); }
}

/* Risposte IA (markdown) */
.chat-bubble-ai .chat-bubble-text ul,
.chat-bubble-ai .chat-bubble-text ol { margin: 0.35rem 0 0.35rem 1.1rem; padding: 0; }
.chat-bubble-ai .chat-bubble-text ul { list-style: disc; }
.chat-bubble-ai .chat-bubble-text ol { list-style: decimal; }
.chat-bubble-ai .chat-bubble-text li { margin: 0.15rem 0; }
.chat-bubble-ai .chat-bubble-text .ai-md-h { margin-top: 0.55rem; }
.chat-bubble-ai .chat-bubble-text code { font-size: 0.85em; padding: 0 0.25em; border-radius: 4px; background: rgba(255,255,255,0.08); }
.chat-bubble-ai .chat-bubble-text a { text-decoration: underline; text-underline-offset: 2px; }
.chat-bubble-ai .ai-md-sources { margin-top: 0.5rem; font-size: 0.72rem; opacity: 0.75; }

/* Fauna verificata / foto Wikimedia */
.species-card { position: relative; }
.species-img--photo { object-fit: cover; background: #0a1713; }
.species-unverified {
  position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; border-radius: 999px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: rgba(228, 184, 106, 0.92); color: #1c1917; box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.species-lightbox-status { margin-top: 0.5rem; font-size: 0.72rem; color: #a8a29e; font-style: italic; }
.species-lightbox-wiki { display: inline-block; margin-top: 0.5rem; font-size: 0.75rem; color: #7dd3fc; text-decoration: underline; text-underline-offset: 2px; }
.species-lightbox-text { white-space: pre-line; }

/* Temperatura acqua vs aria */
.activity-temp-air { font-size: 0.55rem; color: #78716c; margin-top: 0.1rem; white-space: nowrap; }
.activity-temp-value { color: #38bdf8; }
.activity-weather-chip--water strong { color: #38bdf8; }
.activity-water-note { font-size: 0.68rem; line-height: 1.4; color: #a8a29e; }

/* Zaino: riconoscimento IA */
.gear-scan-imgs { display: flex; gap: 0.5rem; }
.gear-scan-imgs .gear-scan-img { flex: 0 0 72px; }
.gear-scan-img--official { background: #fff; object-fit: contain; }
.gear-scan-details { font-size: 0.72rem; color: #a8a29e; line-height: 1.35; margin: 0.25rem 0; }
.gear-card-meta { font-size: 0.62rem; color: #a8a29e; line-height: 1.25; margin-top: 0.1rem; }
.gear-card-photo { background: #fff; object-fit: contain; }
.species-icon-placeholder--loading { animation: cmArtPulse 1.6s ease-in-out infinite; }
@keyframes cmArtPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.chat-bubble-community.is-mine { margin-left: auto; background: rgba(143, 212, 122, 0.12); border-color: rgba(143, 212, 122, 0.3); }
.community-msg-text.is-translated::after { content: " \1F310"; font-size: 0.7em; opacity: 0.6; }

/* ─── Best spots (OSM + AI) ─── */
.cm-hs-pin { width: 36px; height: 36px; cursor: pointer; transition: opacity .25s; }
.cm-hs-pin.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.cm-hs-body {
  position: absolute; inset: 2px; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  color: #0b1f17; background: #f3cf86;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
  transition: transform .18s ease;
}
.cm-hs-body svg { width: 18px; height: 18px; transform: rotate(45deg); }
.cm-hs-pin:hover .cm-hs-body { transform: rotate(-45deg) scale(1.12); }
.cm-hs-pin.r3 .cm-hs-body { background: #fbbf24; }
.cm-hs-pin.r2 .cm-hs-body { background: #a3e635; }
.cm-hs-pin.r1 .cm-hs-body { background: #7dd3c0; }
.cm-hs-pin.is-user .cm-hs-body { border-color: #7dd3fc; }
.cm-hs-badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-size: 8.5px; line-height: 1; letter-spacing: -.5px; padding: 2px 4px; border-radius: 999px;
  color: #fbbf24; background: rgba(10, 23, 19, .9); border: 1px solid rgba(255, 255, 255, .25); white-space: nowrap; pointer-events: none;
}
.cm-hs-halo { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(251, 191, 36, .5); animation: cmHsPulse 2.6s ease-out infinite; }
.cm-hs-pin.r2 .cm-hs-halo { border-color: rgba(163, 230, 53, .4); }
.cm-hs-pin.r1 .cm-hs-halo { display: none; }
@keyframes cmHsPulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.cm-hs-pin.is-locked .cm-hs-body { background: #57534e; color: #e7e5e4; }
.cm-hs-pin.is-locked .cm-hs-halo { display: none; }
.cm-hs-label {
  position: absolute; top: 40px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  color: #fff; background: rgba(10, 23, 19, .85); border: 1px solid rgba(243, 207, 134, .35);
  padding: 2px 7px; border-radius: 999px; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.cm-hs-pin.show-label .cm-hs-label { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .cm-hs-halo { animation: none; } }

.cm-hs-popup .mapboxgl-popup-content { background: #0b1714; border: 1px solid rgba(243, 207, 134, .28); border-radius: 16px; padding: 12px 13px; box-shadow: 0 12px 30px rgba(0, 0, 0, .55); }
.cm-hs-popup .mapboxgl-popup-tip { border-top-color: #0b1714; border-bottom-color: #0b1714; }
.cm-hs-pop { color: #d6d3d1; font-size: 12px; line-height: 1.45; }
.cm-hs-pop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.cm-hs-pop-type { font-weight: 800; color: #f3cf86; font-size: 13px; }
.cm-hs-stars { color: #f3cf86; font-size: 12px; letter-spacing: 1px; }
.cm-hs-stars span { color: #44403c; }
.cm-hs-pop-name { margin: 0 0 6px; color: #a8a29e; font-size: 11px; }
.cm-hs-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 6px; }
.cm-hs-chip { font-size: 10.5px; font-weight: 600; color: #bbf7d0; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .28); padding: 2px 7px; border-radius: 999px; }
.cm-hs-pop-why { margin: 0 0 6px; color: #e7e5e4; }
.cm-hs-pop-row { margin: 0 0 3px; color: #a8a29e; font-size: 11px; }
.cm-hs-pop-row b { color: #d6d3d1; font-weight: 700; margin-right: 3px; }
.cm-hs-pop-go { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; color: #7dd3fc; text-decoration: none; }

.cm-hs-box { margin: 0 0 16px; padding: 12px 13px; border-radius: 18px; background: linear-gradient(135deg, rgba(243, 207, 134, .09), rgba(59, 143, 116, .07)); border: 1px solid rgba(243, 207, 134, .22); }
.cm-hs-box-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cm-hs-box-title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #f3cf86; }
.cm-hs-box-title em { font-style: normal; color: #10211b; background: #f3cf86; border-radius: 999px; padding: 0 6px; margin-left: 4px; font-size: 10px; }
.cm-hs-premium { font-size: 9px; font-weight: 800; letter-spacing: .1em; color: #10211b; background: linear-gradient(90deg, #f3cf86, #e08a12); padding: 2px 7px; border-radius: 999px; }
.cm-hs-box-sub { margin: 6px 0 0; font-size: 10.5px; color: #a8a29e; display: flex; align-items: center; gap: 6px; }
.cm-hs-dot { width: 7px; height: 7px; border-radius: 50%; background: #f3cf86; animation: cmHsPulse 1.4s ease-out infinite; }
.cm-hs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.cm-hs-list li { display: flex; flex-direction: column; padding: 6px 9px; border-radius: 11px; background: rgba(10, 23, 19, .55); }
.cm-hs-list.is-locked li { filter: blur(3.5px); user-select: none; }
.cm-hs-li-type { font-size: 12px; font-weight: 700; color: #e7e5e4; }
.cm-hs-li-sp { font-size: 11px; color: #86efac; }
.cm-hs-btn { margin-top: 9px; width: 100%; padding: 10px; border-radius: 13px; border: 0; font-size: 12px; font-weight: 800; color: #10211b; background: linear-gradient(90deg, #f3cf86, #e4a64a); cursor: pointer; }

/* ─── Activity factors (water-based model) ─── */
.cm-act-factors { display: grid; gap: 6px; }
.cm-act-head { margin: 0 0 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7dd3fc; }
.cm-act-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 13px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .06); }
.cm-act-row.is-good { border-color: rgba(74, 222, 128, .28); background: rgba(74, 222, 128, .06); }
.cm-act-row.is-bad { border-color: rgba(248, 113, 113, .28); background: rgba(248, 113, 113, .06); }
.cm-act-ico { font-size: 16px; line-height: 1.2; width: 20px; text-align: center; }
.cm-act-title { margin: 0; font-size: 12.5px; font-weight: 700; color: #e7e5e4; }
.cm-act-text { margin: 1px 0 0; font-size: 11px; color: #a8a29e; line-height: 1.4; }
.activity-day-best { display: block; font-size: 9px; color: #7dd3fc; margin-top: 1px; }

/* Previsione per specie (modale Attività) */
.fc-block { border: 1px solid rgba(163, 230, 53, 0.18); border-radius: 18px; padding: 0.85rem; background: linear-gradient(180deg, rgba(20, 40, 28, 0.55), rgba(6, 17, 13, 0.4)); }
.fc-h { font-size: 0.95rem; font-weight: 700; color: #ecfccb; }
.fc-sub { font-size: 0.68rem; color: #a8a29e; margin-top: 0.1rem; }
.fc-water { font-size: 0.74rem; color: #bae6fd; margin-top: 0.45rem; line-height: 1.35; }
.fc-empty { font-size: 0.75rem; color: #a8a29e; }
.fc-list { list-style: none; margin: 0.7rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.fc-card { border-radius: 14px; background: rgba(12, 22, 18, 0.85); border: 1px solid rgba(255, 255, 255, 0.07); padding: 0.6rem 0.7rem; }
.fc-head { display: flex; align-items: center; gap: 0.6rem; }
.fc-thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #000; flex-shrink: 0; }
.fc-thumb--empty { display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.fc-title { flex: 1; min-width: 0; }
.fc-name { font-size: 0.86rem; font-weight: 700; color: #f5f5f4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-generic { font-size: 0.6rem; font-weight: 500; color: #78716c; }
.fc-state { font-size: 0.7rem; font-weight: 600; margin-top: 0.1rem; }
.fc-tone-good { color: #a3e635; } .fc-tone-bad { color: #f87171; } .fc-tone-warn { color: #fbbf24; } .fc-tone-neutral { color: #7dd3fc; }
.fc-score { font-size: 0.9rem; font-weight: 800; padding: 0.2rem 0.5rem; border-radius: 999px; }
.fc-score.is-high, .fc-spark i.is-high { background: rgba(132, 204, 22, 0.25); color: #bef264; }
.fc-score.is-mid, .fc-spark i.is-mid { background: rgba(251, 191, 36, 0.2); color: #fde68a; }
.fc-score.is-low, .fc-spark i.is-low { background: rgba(248, 113, 113, 0.18); color: #fecaca; }
.fc-row { font-size: 0.72rem; color: #d6d3d1; margin-top: 0.4rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-items: baseline; }
.fc-lbl { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; color: #a3e635; font-weight: 700; }
.fc-lbl.mt { display: block; margin-top: 0.5rem; }
.fc-win b { color: #f5f5f4; font-weight: 600; margin-right: 0.15rem; }
.fc-spark { display: flex; align-items: flex-end; gap: 2px; height: 34px; margin-top: 0.45rem; }
.fc-spark i { flex: 1; border-radius: 3px 3px 1px 1px; min-width: 3px; }
.fc-spark i.is-high { background: #84cc16; } .fc-spark i.is-mid { background: #f59e0b; } .fc-spark i.is-low { background: #7f1d1d; }
.fc-spark i.fc-spark-sep { margin-left: 5px; }
.fc-more { margin-top: 0.35rem; }
.fc-more summary { font-size: 0.7rem; color: #7dd3fc; cursor: pointer; list-style: none; }
.fc-more summary::-webkit-details-marker { display: none; }
.fc-more summary::before { content: "▸ "; }
.fc-more[open] summary::before { content: "▾ "; }
.fc-reasons { list-style: none; padding: 0; margin: 0.25rem 0 0; display: grid; gap: 0.2rem; }
.fc-reasons li { font-size: 0.7rem; color: #d6d3d1; padding-left: 0.9rem; position: relative; }
.fc-reasons li::before { content: "•"; position: absolute; left: 0.2rem; color: #a8a29e; }
.fc-reasons li.is-good::before { content: "▲"; color: #a3e635; font-size: 0.55rem; top: 0.15rem; }
.fc-reasons li.is-bad::before { content: "▼"; color: #f87171; font-size: 0.55rem; top: 0.15rem; }
.fc-conf { font-size: 0.62rem; color: #78716c; margin-top: 0.4rem; }
.species-lightbox-credit { position: absolute; right: 8px; bottom: 6px; font-size: 9.5px; color: rgba(255, 255, 255, 0.55); max-width: 80%; text-align: right; pointer-events: none; text-shadow: 0 1px 2px #000; }

/* ─── Avviso offline ─── */
.cm-offline-bar { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 8px); transform: translate(-50%, -140%); z-index: 9999; max-width: min(92vw, 520px); padding: 8px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.35; font-weight: 600; color: #fef3c7; background: rgba(69, 46, 8, 0.95); border: 1px solid rgba(251, 191, 36, 0.45); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); transition: transform 0.25s ease; pointer-events: none; text-align: center; }
.cm-offline-bar.is-visible { transform: translate(-50%, 0); }
.cm-offline-bar.is-online { color: #ecfccb; background: rgba(26, 46, 5, 0.95); border-color: rgba(163, 230, 53, 0.45); }

/* ---------- v6: finestra attività (punteggio unico, grafico ora per ora) ---------- */
.act-hero { display: flex; gap: 0.9rem; align-items: center; padding: 0.85rem; border-radius: 18px; background: linear-gradient(135deg, rgba(20, 48, 36, 0.9), rgba(8, 20, 16, 0.9)); border: 1px solid rgba(163, 230, 53, 0.18); }
.act-hero-ring { --p: 0; --c: #84cc16; width: 78px; height: 78px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; position: relative; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0); }
.act-hero-ring.is-mid { --c: #f59e0b; } .act-hero-ring.is-low { --c: #ef4444; }
.act-hero-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #0a1713; }
.act-hero-ring span { position: relative; font-size: 1.45rem; font-weight: 800; color: #f5f5f4; line-height: 1; }
.act-hero-ring small { font-size: 0.7rem; font-weight: 700; color: #a8a29e; }
.act-hero-text { min-width: 0; flex: 1; }
.act-hero-label { margin: 0; font-size: 1.05rem; font-weight: 800; color: #ecfccb; }
.act-hero-label span { font-size: 0.72rem; font-weight: 600; color: #a8a29e; }
.act-hero-meaning { margin: 0.15rem 0 0; font-size: 0.74rem; color: #d6d3d1; line-height: 1.35; }
.act-hero-best { margin: 0.35rem 0 0; font-size: 0.72rem; color: #a8a29e; }
.act-hero-best b { color: #f5f5f4; }
.act-hero-win { margin: 0.35rem 0 0; display: inline-block; font-size: 0.72rem; color: #bae6fd; background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.25); padding: 0.2rem 0.55rem; border-radius: 999px; }
.act-hero-win.is-now { color: #d9f99d; background: rgba(132, 204, 22, 0.14); border-color: rgba(132, 204, 22, 0.35); }
.act-hero-win b { color: #f5f5f4; }
.act-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
.act-sec-title { margin: 0 0 0.4rem; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #7dd3fc; }
.act-sec-head .act-sec-title { margin: 0; }
.act-tabs { display: flex; gap: 4px; }
.act-tabs button { font-size: 0.68rem; padding: 0.22rem 0.6rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); color: #d6d3d1; }
.act-tabs button.is-on { background: rgba(132, 204, 22, 0.2); border-color: rgba(132, 204, 22, 0.45); color: #ecfccb; font-weight: 700; }
.act-chart-box { position: relative; height: 128px; padding-bottom: 18px; border-radius: 14px; background: rgba(12, 22, 18, 0.85); border: 1px solid rgba(255, 255, 255, 0.07); overflow: hidden; cursor: crosshair; }
.act-chart-box svg { width: 100%; height: 110px; display: block; }
.act-chart-box .act-line { fill: none; stroke: #a3e635; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.act-chart-box .act-grid { stroke: rgba(255, 255, 255, 0.08); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.act-chart-box .act-win { fill: rgba(132, 204, 22, 0.13); }
.act-chart-box .act-now { stroke: #38bdf8; stroke-width: 1.5; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.act-chart-box .act-dot { fill: #f5f5f4; stroke: #0a1713; stroke-width: 2; vector-effect: non-scaling-stroke; }
.act-chart-box .act-dot.hidden { display: none; }
.act-xlabels { position: absolute; left: 0; right: 0; bottom: 2px; height: 16px; }
.act-xlabels span { position: absolute; transform: translateX(-50%); font-size: 0.6rem; color: #78716c; }
.act-readout { margin: 0.35rem 0 0; font-size: 0.7rem; color: #a8a29e; }
.act-readout b { color: #f5f5f4; }
.fc-bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); margin-top: 0.5rem; overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: 99px; }
.fc-bar i.is-high { background: #84cc16; } .fc-bar i.is-mid { background: #f59e0b; } .fc-bar i.is-low { background: #ef4444; }
.fc-others { font-size: 0.68rem; color: #78716c; margin: 0.6rem 0 0; }
.act-method { margin-top: 0.4rem; border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 0.6rem; }
.act-method summary { font-size: 0.72rem; color: #7dd3fc; cursor: pointer; list-style: none; }
.act-method summary::-webkit-details-marker { display: none; }
.act-method summary::before { content: "ⓘ "; }
.act-method .activity-water-note { margin-top: 0.4rem; }
.activity-day-cell { cursor: pointer; }
.cm-hs-box.is-locked-teaser { border-color: rgba(228, 184, 106, 0.3); }

/* ---------- v6: consigliatore free (luogo / giorno / ora / specie) ---------- */
.fa-place-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; border-radius: 14px; background: #0c1a15; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); padding: 4px; }
.fa-place-item { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; font-size: 0.82rem; color: #e7e5e4; padding: 0.55rem 0.6rem; border-radius: 10px; }
.fa-place-item:hover, .fa-place-item:focus { background: rgba(255, 255, 255, 0.06); }
.fa-place-empty { font-size: 0.75rem; color: #a8a29e; padding: 0.6rem; }
.fa-place-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fa-chip { font-size: 0.72rem; padding: 0.3rem 0.65rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); color: #d6d3d1; }
.fa-chip:hover { border-color: rgba(163, 230, 53, 0.4); color: #ecfccb; }
.fa-weather { font-size: 0.74rem; color: #bae6fd; background: rgba(56, 189, 248, 0.07); border: 1px solid rgba(56, 189, 248, 0.18); border-radius: 12px; padding: 0.5rem 0.65rem; margin: 0; line-height: 1.4; }
.fa-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #38bdf8; margin-right: 6px; animation: cmArtPulse 1.2s ease-in-out infinite; }
.fa-result { border-radius: 18px; border: 1px solid rgba(163, 230, 53, 0.22); background: linear-gradient(180deg, rgba(20, 40, 28, 0.6), rgba(6, 17, 13, 0.5)); padding: 0.85rem; }
.fa-res-head { display: flex; align-items: center; gap: 0.65rem; }
.fa-res-img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: #000; }
.fa-res-title { flex: 1; min-width: 0; }
.fa-res-name { margin: 0; font-weight: 800; color: #f5f5f4; }
.fa-res-where { margin: 0.1rem 0 0; font-size: 0.7rem; color: #a8a29e; }
.fa-act { margin: 0.6rem 0 0; font-size: 0.78rem; color: #d6d3d1; }
.fa-act b { color: #ecfccb; }
.fa-sub { margin: 0.15rem 0 0; font-size: 0.7rem; color: #a8a29e; }
.fa-warn { margin: 0.5rem 0 0; font-size: 0.72rem; color: #fde68a; background: rgba(251, 191, 36, 0.08); border-radius: 10px; padding: 0.4rem 0.55rem; }
.fa-grid { display: grid; gap: 0.5rem; margin-top: 0.7rem; }
.fa-item { border-radius: 13px; background: rgba(12, 22, 18, 0.85); border: 1px solid rgba(255, 255, 255, 0.07); padding: 0.55rem 0.7rem; font-size: 0.78rem; color: #e7e5e4; line-height: 1.45; }
.fa-item p { margin: 0; }
.fa-item ul, .fa-item ol { margin: 0.2rem 0 0; padding-left: 1.1rem; }
.fa-item ul { list-style: disc; } .fa-item ol { list-style: decimal; }
.fa-item li { margin: 0.1rem 0; }
.fa-k { font-size: 0.64rem !important; text-transform: uppercase; letter-spacing: 0.06em; color: #a3e635; font-weight: 700; margin-bottom: 0.2rem !important; }
.fa-k.mt { margin-top: 0.45rem !important; }
.fa-sub2 { margin-top: 0.3rem !important; font-size: 0.72rem; color: #bae6fd; }
.fa-knot details { margin-top: 0.35rem; }
.fa-knot summary { font-size: 0.72rem; color: #7dd3fc; cursor: pointer; list-style: none; }
.fa-knot summary::-webkit-details-marker { display: none; }
.fa-knot summary::before { content: "▸ "; }
.fa-knot details[open] summary::before { content: "▾ "; }
.fa-foot { margin: 0.7rem 0 0; font-size: 0.68rem; color: #e4b86a; }

/* ---------- v6: scheda specie ---------- */
.sl-list { margin: 0.2rem 0 0; padding-left: 1.1rem; list-style: disc; }
.sl-list li { margin: 0.15rem 0; }
.sl-color { margin: 0.5rem 0 0; }
.sl-color b, .sl-act b { color: #ecfccb; }
.sl-extra { margin: 0.35rem 0 0; font-size: 0.78em; color: #a8a29e; }
.sl-act { margin: 0 0 0.5rem; font-size: 0.85em; color: #d6d3d1; }
.sl-k { margin: 0.65rem 0 0.15rem; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: #e4b86a; font-weight: 700; }
.sl-sub { margin: 0.25rem 0 0; font-size: 0.85em; color: #bae6fd; }
.sl-knot { margin-top: 0.4rem; }
.sl-knot summary { font-size: 0.8em; color: #7dd3fc; cursor: pointer; }
.sl-knot ol { margin: 0.3rem 0 0; padding-left: 1.2rem; list-style: decimal; }

/* ---------- v6: chat community stile WhatsApp ---------- */
html.wa-open nav.fixed { display: none !important; }
.wa-chat { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #0b1410; max-width: 32rem; margin: 0 auto; }
.wa-chat.hidden { display: none; }
.wa-head { display: flex; align-items: center; gap: 0.5rem; padding: calc(env(safe-area-inset-top) + 0.55rem) 0.75rem 0.55rem 0.4rem; background: #10201a; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.wa-back { color: #d6d3d1; padding: 0.35rem; border-radius: 999px; }
.wa-back:hover { background: rgba(255, 255, 255, 0.06); }
.wa-head-main { min-width: 0; flex: 1; }
.wa-title { margin: 0; font-weight: 700; font-size: 0.98rem; color: #f5f5f4; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-status { margin: 0.05rem 0 0; font-size: 0.7rem; color: #a8a29e; }
.wa-status.is-typing { color: #86efac; font-style: italic; }
.wa-messages { flex: 1; overflow-y: auto; padding: 0.6rem 0.7rem 0.8rem; background-color: #0b1410; background-image: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px); background-size: 18px 18px; -webkit-overflow-scrolling: touch; }
.wa-empty { text-align: center; color: #78716c; margin-top: 30%; font-size: 0.85rem; }
.wa-empty p:first-child { font-size: 2rem; }
.wa-day { text-align: center; margin: 0.7rem 0; }
.wa-day span { font-size: 0.68rem; color: #d6d3d1; background: rgba(30, 50, 42, 0.95); padding: 0.25rem 0.7rem; border-radius: 8px; text-transform: capitalize; }
.wa-row { display: flex; flex-direction: column; align-items: flex-start; margin: 2px 0; }
.wa-row.has-tail { margin-top: 8px; }
.wa-row.is-mine { align-items: flex-end; }
.wa-bubble { position: relative; max-width: 82%; padding: 0.35rem 0.55rem 0.3rem; border-radius: 12px; background: #1c2b25; color: #f1f5f2; font-size: 0.88rem; line-height: 1.38; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3); word-wrap: break-word; overflow-wrap: anywhere; }
.wa-row.is-mine .wa-bubble { background: #005c4b; }
.wa-row.has-tail:not(.is-mine) .wa-bubble { border-top-left-radius: 3px; }
.wa-row.has-tail.is-mine .wa-bubble, .wa-row.is-mine:first-child .wa-bubble { border-top-right-radius: 3px; }
.wa-bubble.is-photo { padding: 3px; }
.wa-author { margin: 0 0 0.1rem; font-size: 0.74rem; font-weight: 700; }
.wa-text { margin: 0; white-space: pre-wrap; display: inline; }
.wa-text a { color: #7dd3fc; text-decoration: underline; }
.wa-text.is-translated { font-style: italic; }
.wa-meta { float: right; margin: 0.35rem 0 -0.1rem 0.6rem; font-size: 0.62rem; color: rgba(241, 245, 242, 0.6); display: inline-flex; align-items: center; gap: 3px; }
.wa-bubble.is-photo .wa-meta { position: absolute; right: 8px; bottom: 6px; margin: 0; color: #fff; background: rgba(0, 0, 0, 0.45); padding: 1px 6px; border-radius: 8px; }
.wa-tick { color: #53bdeb; font-size: 0.66rem; letter-spacing: -2px; }
.wa-tick.is-pending { letter-spacing: 0; color: rgba(241, 245, 242, 0.6); }
.wa-img { display: block; border-radius: 9px; overflow: hidden; margin-bottom: 2px; }
.wa-img img { display: block; max-width: 100%; max-height: 320px; width: 100%; object-fit: cover; border-radius: 9px; background: #000; }
.wa-quote { border-left: 3px solid var(--qc, #86efac); background: rgba(0, 0, 0, 0.22); border-radius: 7px; padding: 0.25rem 0.5rem; margin-bottom: 0.25rem; font-size: 0.75rem; }
.wa-quote b { display: block; color: var(--qc, #86efac); font-size: 0.72rem; }
.wa-quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #d6d3d1; }
.wa-actions { display: none; gap: 6px; margin: 3px 2px 2px; }
.wa-row.show-actions .wa-actions { display: flex; }
.wa-actions button { font-size: 0.7rem; color: #d6d3d1; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); padding: 0.2rem 0.55rem; border-radius: 999px; }
.wa-jump { position: absolute; right: 14px; bottom: 76px; width: 38px; height: 38px; border-radius: 50%; background: #1c2b25; color: #e7e5e4; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); font-size: 1.1rem; }
.wa-jump.hidden { display: none; }
.wa-reply-bar, .wa-photo-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.7rem; background: #10201a; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.wa-reply-bar.hidden, .wa-photo-bar.hidden { display: none; }
.wa-reply-quote { flex: 1; min-width: 0; border-left: 3px solid #86efac; padding-left: 0.5rem; }
.wa-reply-author { margin: 0; font-size: 0.72rem; font-weight: 700; }
.wa-reply-text { margin: 0; font-size: 0.75rem; color: #a8a29e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-photo-bar img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.wa-photo-info { flex: 1; font-size: 0.72rem; color: #a8a29e; }
.wa-composer { display: flex; align-items: flex-end; gap: 0.45rem; padding: 0.5rem 0.6rem calc(env(safe-area-inset-bottom) + 0.5rem); background: #10201a; }
.wa-icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: #a8a29e; flex-shrink: 0; cursor: pointer; }
.wa-icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: #e7e5e4; }
.wa-input { flex: 1; resize: none; max-height: 140px; min-height: 42px; border-radius: 22px; border: none; background: #1f2f29; color: #f5f5f4; padding: 0.62rem 0.95rem; font-size: 0.92rem; line-height: 1.3; outline: none; }
.wa-input::placeholder { color: #8b9590; }
.wa-send { width: 44px; height: 44px; border-radius: 50%; background: #00a884; color: #08130f; display: grid; place-items: center; flex-shrink: 0; }
.wa-send:active { transform: scale(0.94); }
.wa-viewer { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.94); display: grid; place-items: center; }
.wa-viewer.hidden { display: none; }
.wa-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.wa-viewer-close { position: absolute; top: calc(env(safe-area-inset-top) + 12px); right: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 1.1rem; }
#activityDetailModal .activity-premium-lock { position: static; inset: auto; backdrop-filter: none; background: linear-gradient(135deg, rgba(228, 184, 106, 0.12), rgba(228, 184, 106, 0.04)); border: 1px solid rgba(228, 184, 106, 0.3); border-radius: 16px; padding: 0.9rem; margin-bottom: 1rem; display: grid; place-items: center; gap: 0.4rem; }
#activityDetailModal .activity-premium-lock.hidden { display: none; }
#speciesLightboxBaits, #speciesLightboxAi { white-space: normal; }
#communityChat #communityMessages, #communityMessages.wa-messages { height: auto !important; max-height: none !important; min-height: 0 !important; flex: 1 1 auto; }
.wa-back svg { width: 26px; height: 26px; display: block; }
.wa-icon-btn svg { width: 24px; height: 24px; }
.wa-send svg { width: 20px; height: 20px; }

/* ---------- v7: attività a livelli (pesci) e ore migliori ---------- */
.lv-meter { display: inline-flex; gap: 2px; vertical-align: middle; }
.lv-meter i { width: 16px; height: 10px; color: rgba(255, 255, 255, 0.14); display: inline-block; }
.lv-meter i svg { width: 100%; height: 100%; display: block; }
.lv-meter.is-big i { width: 26px; height: 16px; }
.lv-meter.lv-4 i.on { color: #a3e635; } .lv-meter.lv-3 i.on { color: #86efac; } .lv-meter.lv-2 i.on { color: #fbbf24; } .lv-meter.lv-1 i.on { color: #f87171; }
.lv-text-4 { color: #bef264; } .lv-text-3 { color: #86efac; } .lv-text-2 { color: #fde68a; } .lv-text-1 { color: #fecaca; }
.lv-bg-4 { background: linear-gradient(180deg, #bef264, #65a30d); } .lv-bg-3 { background: linear-gradient(180deg, #86efac, #16a34a); }
.lv-bg-2 { background: linear-gradient(180deg, #fde68a, #d97706); } .lv-bg-1 { background: linear-gradient(180deg, #fca5a5, #b91c1c); }
.act-hero { align-items: stretch; }
.act-hero-main { flex-shrink: 0; min-width: 118px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding-right: 0.8rem; border-right: 1px solid rgba(255, 255, 255, 0.08); }
.act-hero-kicker { margin: 0; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: #a8a29e; }
.act-hero-main .act-hero-label { margin: 0; font-size: 1.5rem; line-height: 1.05; font-weight: 800; }
.act-hero-text { display: flex; flex-direction: column; justify-content: center; }
.ah-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.ah-cell { flex: 0 0 52px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px 6px; border-radius: 14px; background: linear-gradient(180deg, rgba(20, 48, 56, 0.9), rgba(10, 23, 19, 0.95)); border: 1px solid rgba(255, 255, 255, 0.07); color: inherit; }
.ah-cell.is-now { border-color: rgba(56, 189, 248, 0.55); }
.ah-cell.is-best { border-color: rgba(228, 184, 106, 0.6); background: linear-gradient(180deg, rgba(58, 48, 20, 0.85), rgba(16, 22, 14, 0.95)); }
.ah-cell.is-sel { box-shadow: 0 0 0 2px rgba(163, 230, 53, 0.55); }
.ah-time { font-size: 0.66rem; color: #d6d3d1; font-weight: 600; }
.ah-icon { width: 22px; height: 22px; color: #fbbf24; display: grid; place-items: center; }
.ah-icon svg { width: 22px; height: 22px; }
.ah-temp { font-size: 0.72rem; color: #f5f5f4; font-weight: 600; }
.ah-bar { width: 12px; height: 46px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); display: flex; align-items: flex-end; overflow: hidden; }
.ah-bar i { display: block; width: 100%; border-radius: 6px; }
.ah-star { color: #e4b86a; font-size: 0.8rem; height: 0.9rem; line-height: 0.9rem; }
.ah-legend { margin: 0.1rem 0 0; font-size: 0.66rem; color: #78716c; }
.fc-level { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 0.7rem; }
.activity-ring-value { font-size: 0.62rem !important; text-align: center; line-height: 1.1; padding: 0 4px; }
.activity-day-score .lv-meter i { width: 9px; height: 6px; }
.sl-knot-steps { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 10px; -webkit-overflow-scrolling: touch; }
.sl-knot-step { flex: 0 0 82%; max-width: 340px; scroll-snap-align: start; margin: 0; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid rgba(255, 255, 255, 0.12); }
.sl-knot-step button { display: block; width: 100%; }
.sl-knot-step img { display: block; width: 100%; height: auto; }
.sl-knot-step figcaption { background: #0f1c17; color: #e7e5e4; font-size: 0.78rem; padding: 0.45rem 0.6rem; line-height: 1.35; }
.sl-knot-step figcaption b { color: #e4b86a; margin-right: 4px; }
.lake-depth { margin: 0.25rem 0 0; font-size: 0.75rem; color: #7dd3fc; }
.lake-notify-btn { display: flex; align-items: center; gap: 0.4rem; width: 100%; justify-content: center; font-size: 0.8rem; font-weight: 600; padding: 0.55rem 0.8rem; border-radius: 14px; border: 1px dashed rgba(228, 184, 106, 0.45); color: #fde68a; background: rgba(228, 184, 106, 0.06); margin-top: -0.6rem; }
.lake-notify-btn.is-on { border-style: solid; background: rgba(132, 204, 22, 0.12); color: #d9f99d; border-color: rgba(132, 204, 22, 0.45); }
.lake-notify-btn.is-on .lake-notify-pro { display: none; }
.lake-notify-pro { font-style: normal; font-size: 0.58rem; font-weight: 800; color: #e4b86a; border: 1px solid rgba(228, 184, 106, 0.5); border-radius: 999px; padding: 0 0.35rem; }
.rules-edit-btn { margin-top: 0.6rem; width: 100%; min-height: 44px; border-radius: 14px; border: 1px solid rgba(228, 184, 106, 0.45); background: rgba(228, 184, 106, 0.12); color: #fde68a; font-size: 0.82rem; font-weight: 700; padding: 0.6rem 0.8rem; touch-action: manipulation; position: relative; z-index: 2; }
.rules-edit-btn:active { transform: scale(0.98); }
.rules-verify { margin: 0.5rem 0 0; font-size: 0.72rem; color: #bbf7d0; line-height: 1.4; }
.rules-verify a { color: #7dd3fc; text-decoration: underline; }
.rules-verify .rv-note { color: #d6d3d1; }
.rules-pending { margin: 0.35rem 0 0; font-size: 0.7rem; color: #fde68a; }
.private-vote { border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); padding: 0.6rem 0.7rem; }
.private-vote-info { margin: 0 0 0.45rem; font-size: 0.72rem; color: #a8a29e; }
.private-vote-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.private-vote-btns button[data-pv="banned"].is-on { border-color: rgba(239, 68, 68, 0.6); background: rgba(239, 68, 68, 0.14); color: #fecaca; }
.private-vote-btns button { min-height: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); color: #e7e5e4; font-size: 0.74rem; font-weight: 600; touch-action: manipulation; }
.private-vote-btns button.is-on { border-color: rgba(132, 204, 22, 0.55); background: rgba(132, 204, 22, 0.14); color: #ecfccb; }
/* la tendina finisce sopra la barra di navigazione: gli ultimi pulsanti restano toccabili */
#lakeSheet .sheet-content, #lakeSheet [data-sheet-scroll], #lakeRulesBlock { scroll-margin-bottom: 120px; }
#lakeRulesBlock { margin-bottom: calc(96px + env(safe-area-inset-bottom)); }
#lakeRulesEditText{font-size:16px !important}

/* ---------- v7: ricerca con suggerimenti ---------- */
#searchHints { max-height: min(55vh, 420px) !important; }
.ws-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; padding: 0.5rem 0.6rem; border-radius: 12px; color: #e7e5e4; }
.ws-item:hover, .ws-item:focus { background: rgba(255, 255, 255, 0.06); }
.ws-ico { width: 1.6rem; text-align: center; font-size: 1rem; flex-shrink: 0; }
.ws-txt { display: flex; flex-direction: column; min-width: 0; }
.ws-txt b { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-txt small { font-size: 0.7rem; color: #a8a29e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-sec { margin: 0.4rem 0.6rem 0.1rem; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; color: #78716c; }
.ws-loading { margin: 0.3rem 0.6rem; font-size: 0.72rem; color: #a8a29e; }

/* ---------- v7: Premium e partner ---------- */
.pw-card { max-width: 26rem; }
.pw-list { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.pw-list li { font-size: 0.84rem; color: #e7e5e4; line-height: 1.35; display: flex; gap: 0.5rem; }
.pw-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 1rem; }
.pw-plan { position: relative; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.12); padding: 0.7rem; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.pw-plan b { font-size: 1.2rem; color: #f5f5f4; }
.pw-plan span { font-size: 0.7rem; color: #a8a29e; }
.pw-plan.is-best { border-color: rgba(228, 184, 106, 0.6); background: rgba(228, 184, 106, 0.08); }
.pw-plan em { position: absolute; top: -9px; right: 10px; font-style: normal; font-size: 0.62rem; font-weight: 800; background: #e4b86a; color: #0a1713; border-radius: 999px; padding: 1px 7px; }
.pw-fine { text-align: center; font-size: 0.68rem; color: #78716c; margin: 0.2rem 0 0; }
.pt-card { display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.75rem; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.08); background: linear-gradient(135deg, rgba(30, 41, 59, 0.55), rgba(12, 22, 18, 0.9)); color: inherit; text-decoration: none; }
.pt-card img, .pt-logo { width: 42px; height: 42px; border-radius: 10px; object-fit: contain; background: #fff; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.pt-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pt-tag { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8; }
.pt-body b { font-size: 0.86rem; color: #f5f5f4; }
.pt-body small { font-size: 0.72rem; color: #a8a29e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-go { font-size: 0.72rem; color: #7dd3fc; white-space: nowrap; }
.pt-invite { width: 100%; text-align: left; font-size: 0.74rem; color: #a8a29e; border: 1px dashed rgba(255, 255, 255, 0.14); border-radius: 14px; padding: 0.6rem 0.75rem; }
.pt-slot { margin-top: 0.7rem; }
.pt-slot-h { margin: 0 0 0.35rem; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em; color: #78716c; }
.pt-form { display: grid; gap: 0.55rem; }
.pt-consent { font-size: 0.7rem; color: #a8a29e; display: flex; gap: 0.4rem; align-items: flex-start; }

/* ---------- v7: legale ---------- */
.lg-modal { z-index: 2147483100 !important; }
.lg-card { max-width: 26rem; }
.lg-check { display: flex; gap: 0.55rem; align-items: flex-start; margin-top: 0.8rem; font-size: 0.84rem; color: #e7e5e4; }
.lg-check input { margin-top: 0.2rem; width: 18px; height: 18px; flex-shrink: 0; }
.lg-check a { color: #7dd3fc; text-decoration: underline; }
.lg-list { list-style: none; padding: 0; margin: 0.6rem 0; display: grid; gap: 0.4rem; font-size: 0.84rem; color: #e7e5e4; }
.lg-links { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.lg-link { font-size: 0.78rem; color: #a8a29e; text-decoration: underline; }
.lg-actions { display: grid; gap: 6px; margin-top: 0.7rem; }
.lg-actions button { text-align: left; min-height: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03); color: #e7e5e4; font-size: 0.8rem; padding: 0 0.75rem; }
.lg-actions button.is-danger { color: #fecaca; border-color: rgba(248, 113, 113, 0.3); }
/* v7: tendina leggibile sopra la barra in basso; campi da 16px su telefono (niente zoom su iPhone) */
.sheet-content { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
@media (max-width: 640px) { #lakeRulesEditText, .field, textarea, input[type="search"], input[type="text"] { font-size: 16px !important; } }
.cm-nudge { position: fixed; z-index: 55; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; transition: all .3s ease; width: min(92vw, 26rem); border-radius: 18px; padding: 0.9rem 1rem; background: linear-gradient(135deg, #1e1a0e, #0f1712); border: 1px solid rgba(228, 184, 106, 0.4); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); }
.cm-nudge.is-on { transform: translate(-50%, 0); opacity: 1; }
.cm-nudge-x { position: absolute; top: 8px; right: 10px; color: #a8a29e; font-size: 0.9rem; }
.cm-nudge-k { margin: 0; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; color: #e4b86a; }
.cm-nudge-t { margin: 0.2rem 0 0; font-weight: 800; color: #f5f5f4; font-size: 0.95rem; }
.cm-nudge-s { margin: 0.25rem 0 0.6rem; font-size: 0.76rem; color: #d6d3d1; }
.cm-nudge-cta { width: 100%; border-radius: 12px; background: #e4b86a; color: #0a0f0c; font-weight: 800; font-size: 0.85rem; padding: 0.6rem; }
/* v8: attività che si ricalcola per ora / giorno */
.act-hero-back { margin-top: 0.4rem; font-size: 0.72rem; color: #7dd3fc; border: 1px solid rgba(125, 211, 252, 0.35); border-radius: 999px; padding: 0.2rem 0.6rem; background: rgba(56, 189, 248, 0.08); }
.act-tabs { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.act-tabs::-webkit-scrollbar { display: none; }
.act-tabs button { white-space: nowrap; }
.ah-cell.is-sel { outline: 2px solid #a3e635; outline-offset: 1px; }
.other-species { margin: 0.6rem 0 0.4rem; }
.other-species.hidden { display: none; }
.other-species-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: #78716c; margin: 0 0 0.4rem; }
.other-species-list { display: flex; flex-wrap: wrap; gap: 6px; }
.other-species-chip { font-size: 0.78rem; color: #e7e5e4; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; padding: 0.3rem 0.7rem; }
.other-species-chip:hover { border-color: rgba(163, 230, 53, 0.4); }
.other-species-chip em { color: #fbbf24; font-style: normal; }
.lake-name-report { display: inline-block; margin-top: 0.3rem; font-size: 0.68rem; color: #78716c; text-decoration: underline; text-underline-offset: 2px; }
.lake-name-report.hidden { display: none; }
.pt-profile-link { display: block; margin-top: 0.6rem; font-size: 0.78rem; color: #e4b86a; text-decoration: underline; text-underline-offset: 2px; }

/* conferma della presenza di una specie */
.species-confirm { margin-top: 0.75rem; padding: 0.75rem; border-radius: 0.9rem; background: rgba(132, 204, 22, 0.07); border: 1px solid rgba(132, 204, 22, 0.25); }
.species-confirm-q { font-size: 0.8rem; color: #d6d3d1; line-height: 1.45; }
.species-confirm-btn { margin-top: 0.6rem; width: 100%; min-height: 44px; border-radius: 0.75rem; background: #84cc16; color: #0a1713; font-weight: 700; font-size: 0.875rem; }
.species-confirm-btn:disabled { opacity: 0.6; }
.species-confirm-done { font-size: 0.8rem; color: #bef264; }

.fc-ab { font-weight: 500; color: #a8a29e; }
.fc-ab-common { color: #bef264; }
.fc-ab-unsure { color: #fbbf24; }

/* pallino "sei qui" disegnato dall'app (quello di Mapbox è nascosto per non averne due) */
.mapboxgl-user-location-dot, .mapboxgl-user-location-accuracy-circle, .mapboxgl-user-location { display: none !important; }
.cm-user-dot { position: relative; width: 22px; height: 22px; pointer-events: none; z-index: 5; }
.cm-user-core { position: absolute; inset: 3px; border-radius: 50%; background: #1d9bf0; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.45); }
.cm-user-pulse { position: absolute; inset: 0; border-radius: 50%; background: rgba(29,155,240,.45); animation: cmUserPulse 2s ease-out infinite; }
.cm-user-acc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(29,155,240,.12); border: 1px solid rgba(29,155,240,.35); display: none; }
@keyframes cmUserPulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cm-user-pulse { animation: none; } }

/* ─── scheda "Attività dettagliata" di un pesce ─── */
.sa-modal { position: fixed; inset: 0; z-index: 100500; background: rgba(2, 8, 6, 0.72); display: flex; align-items: flex-end; justify-content: center; }
.sa-modal.hidden { display: none; }
.sa-sheet { width: 100%; max-width: 640px; height: 100%; max-height: 100dvh; overflow-y: auto; background: #0a1713; border-top-left-radius: 22px; border-top-right-radius: 22px; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
@media (min-width: 700px) { .sa-modal { align-items: center; } .sa-sheet { height: auto; max-height: 92dvh; border-radius: 22px; } }
.sa-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: calc(0.75rem + env(safe-area-inset-top)) 1rem 0.6rem; background: linear-gradient(#0a1713 80%, rgba(10, 23, 19, 0)); }
.sa-close { min-height: 40px; padding: 0 0.9rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #e7e5e4; font-size: 0.8rem; font-weight: 600; }
.sa-kicker { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: #84cc16; font-weight: 700; }
.sa-body { padding: 0 1rem; }
.sa-head { display: flex; gap: 0.9rem; align-items: center; padding: 0.85rem; border-radius: 18px; background: linear-gradient(135deg, rgba(20, 48, 36, 0.9), rgba(8, 20, 16, 0.9)); border: 1px solid rgba(163, 230, 53, 0.18); }
.sa-img { width: 96px; height: 96px; object-fit: contain; border-radius: 14px; background: #000; flex-shrink: 0; }
.sa-head-txt { min-width: 0; }
.sa-name { font-size: 1.4rem; color: #f5f5f4; line-height: 1.1; }
.sa-sci { font-size: 0.72rem; color: #a8a29e; font-style: italic; margin-top: 0.1rem; }
.sa-now { margin-top: 0.45rem; font-size: 0.8rem; color: #d6d3d1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.sa-next { margin-top: 0.3rem; font-size: 0.78rem; color: #fde68a; }
.sa-sec { margin-top: 1.1rem; }
.sa-note { font-size: 0.75rem; color: #a8a29e; margin-top: 0.4rem; line-height: 1.4; }
.sa-gauge { padding: 0.25rem 0 0; }
.sa-g-bar { position: relative; height: 12px; border-radius: 999px; overflow: visible; background: rgba(255, 255, 255, 0.06); margin-top: 1.4rem; }
.sa-g-z { position: absolute; top: 0; bottom: 0; }
.sa-g-bad { background: rgba(239, 68, 68, 0.55); } .sa-g-mid { background: rgba(245, 158, 11, 0.6); } .sa-g-good { background: rgba(132, 204, 22, 0.85); }
.sa-g-bar .sa-g-z:first-child { border-radius: 999px 0 0 999px; } .sa-g-bar .sa-g-z:nth-child(5) { border-radius: 0 999px 999px 0; }
.sa-g-mark { position: absolute; top: -6px; width: 4px; height: 24px; margin-left: -2px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 2px #0a1713; }
.sa-g-mark b { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); font-size: 0.72rem; color: #fff; white-space: nowrap; font-style: normal; }
.sa-g-scale { position: relative; height: 1.1rem; margin-top: 0.3rem; font-size: 0.65rem; color: #a8a29e; }
.sa-g-scale span { position: absolute; transform: translateX(-50%); }
.sa-week { display: grid; gap: 0.4rem; }
.sa-day { display: grid; grid-template-columns: 5.2rem auto 1fr; grid-template-rows: auto auto; gap: 0.1rem 0.6rem; align-items: center; text-align: left; padding: 0.6rem 0.7rem; border-radius: 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); min-height: 44px; }
.sa-day.is-on { border-color: rgba(132, 204, 22, 0.6); background: rgba(132, 204, 22, 0.08); }
.sa-day-name { font-size: 0.8rem; font-weight: 700; color: #f5f5f4; text-transform: capitalize; grid-row: span 2; }
.sa-day-win { font-size: 0.75rem; color: #fde68a; grid-column: 2 / 4; }
.sa-day-win em { color: #a8a29e; font-style: normal; }
.sa-day-avg { font-size: 0.68rem; color: #a8a29e; grid-column: 3; grid-row: 1; justify-self: end; }
.sa-readout { margin-top: 0.6rem; padding: 0.65rem 0.75rem; border-radius: 14px; background: rgba(255, 255, 255, 0.05); }
.sa-ro-head { font-size: 0.8rem; color: #e7e5e4; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.sa-ro-wx { font-size: 0.75rem; color: #a8a29e; margin-top: 0.3rem; line-height: 1.5; }
.sa-bio { display: grid; gap: 0.35rem; font-size: 0.8rem; color: #d6d3d1; line-height: 1.45; }
.sa-how p { font-size: 0.8rem; color: #d6d3d1; line-height: 1.45; margin-bottom: 0.4rem; }
.sa-how .fc-lbl { display: block; }
.sa-open-btn { margin-top: 0.7rem; width: 100%; min-height: 44px; border-radius: 12px; background: rgba(132, 204, 22, 0.12); border: 1px solid rgba(132, 204, 22, 0.45); color: #d9f99d; font-weight: 700; font-size: 0.82rem; }
.sa-open-btn--big { margin: 0 0 0.75rem; min-height: 48px; font-size: 0.9rem; }
.sa-lock { font-weight: 600; color: #fde68a; font-size: 0.75rem; }

/* ─── stato dello specchio d'acqua: divieto, pescosità, no-kill ─── */
.lake-status { border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.03); padding: 0.75rem; display: grid; gap: 0.75rem; }
.ws-ban { border-radius: 12px; background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(239, 68, 68, 0.5); padding: 0.65rem 0.75rem; }
.ws-ban-t { font-weight: 800; color: #fecaca; font-size: 0.95rem; }
.ws-ban-n { font-size: 0.78rem; color: #fee2e2; margin-top: 0.2rem; line-height: 1.4; }
.ws-k { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: #a8a29e; font-weight: 700; margin-bottom: 0.25rem; }
.ws-prod { font-size: 0.85rem; color: #e7e5e4; }
.ws-prod span { color: #a8a29e; font-size: 0.72rem; }
.ws-prod-excellent b, .ws-prod-good b { color: #bef264; } .ws-prod-average b { color: #fde68a; } .ws-prod-poor b { color: #fbbf24; } .ws-prod-empty b { color: #f87171; }
.ws-note { font-size: 0.75rem; color: #a8a29e; line-height: 1.4; margin-top: 0.15rem; }
.ws-ask { font-size: 0.72rem; color: #d6d3d1; margin-top: 0.45rem; }
.ws-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 0.35rem; }
.ws-btns-wrap { display: flex; flex-wrap: wrap; }
.ws-btns button { min-height: 38px; padding: 0 0.6rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); color: #e7e5e4; font-size: 0.72rem; font-weight: 600; touch-action: manipulation; }
.ws-btns button.is-on { border-color: rgba(132, 204, 22, 0.55); background: rgba(132, 204, 22, 0.14); color: #ecfccb; }
.ws-nk { display: grid; gap: 0.3rem; font-size: 0.78rem; color: #e7e5e4; line-height: 1.4; }
.ws-src { font-size: 0.68rem; color: #a8a29e; }
.ws-src a, .ws-sources a { color: #bef264; text-decoration: underline; }
.ws-link { margin-top: 0.35rem; font-size: 0.72rem; color: #bef264; text-decoration: underline; min-height: 32px; }
.act-hero-warn { margin-top: 0.35rem; font-size: 0.74rem; font-weight: 700; color: #fbbf24; }
.act-hero-warn.is-ban { color: #fca5a5; } .act-hero-warn.is-good { color: #bef264; }

/* ─── spot dei pescatori ─── */
/* (spot dei pescatori: bordo azzurro + badge 👤, colore = voto) */
.cm-hs-btn--ghost { background: transparent !important; border: 1px solid rgba(228, 184, 106, 0.55) !important; color: #fde68a !important; margin-top: 0.4rem; }
.cm-hs-vote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0.5rem 0; font-size: 0.72rem; color: #a8a29e; }
.cm-hs-vote button { min-height: 32px; padding: 0 0.6rem; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.05); color: #e7e5e4; font-weight: 600; font-size: 0.72rem; }
.cm-hs-by { color: #fde68a; }
body.cm-picking-spot #mapboxMap { cursor: crosshair; }
.cm-hs-add { position: fixed; inset: 0; z-index: 100600; background: rgba(2, 8, 6, 0.7); display: flex; align-items: flex-end; justify-content: center; padding: 0 0 env(safe-area-inset-bottom); }
.cm-hs-add-card { width: 100%; max-width: 520px; background: #0a1713; border-top-left-radius: 20px; border-top-right-radius: 20px; padding: 1rem 1rem 1.25rem; border: 1px solid rgba(255, 255, 255, 0.08); }
.cm-hs-add-t { font-weight: 800; color: #f5f5f4; font-size: 1rem; }
.cm-hs-add-s { font-size: 0.78rem; color: #a8a29e; margin: 0.5rem 0 0.35rem; }
.cm-hs-add-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-hs-add-chips button { min-height: 36px; padding: 0 0.7rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04); color: #e7e5e4; font-size: 0.78rem; }
.cm-hs-add-chips button.is-on { border-color: rgba(132, 204, 22, 0.6); background: rgba(132, 204, 22, 0.16); color: #ecfccb; }
.cm-hs-add-card textarea { width: 100%; margin-top: 0.7rem; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); color: #f5f5f4; padding: 0.6rem; font-size: 0.85rem; }
.cm-hs-add-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 0.7rem; }
.cm-hs-add-row button { min-height: 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); color: #e7e5e4; font-weight: 700; }
.cm-hs-add-row button.is-main { background: #84cc16; color: #0a1713; border-color: transparent; }
.cm-hs-add-foot { font-size: 0.68rem; color: #a8a29e; margin-top: 0.5rem; }

/* v13: "C'è" / "Non c'è" sulle specie, permessi e costi */
.species-confirm-row { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.species-confirm-row .species-confirm-btn, .species-confirm-row .species-absent-btn { margin-top: 0; flex: 1; }
.species-absent-btn { margin-top: 0.6rem; width: 100%; min-height: 44px; border-radius: 0.75rem; background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.45); color: #fca5a5; font-weight: 700; font-size: 0.875rem; }
.species-absent-btn:disabled { opacity: 0.6; }
.species-confirm--quiet { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.08); }
.species-confirm--quiet .species-absent-btn { min-height: 38px; font-size: 0.8rem; }
.ws-price { font-weight: 700; color: #bef264; white-space: nowrap; }
.cm-hs-legend { margin: 8px 0 0; font-size: 10.5px; color: #a8a29e; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cm-hs-lg { width: 9px; height: 9px; border-radius: 50% 50% 50% 2px; transform: rotate(-45deg); display: inline-block; border: 1px solid #fff; margin-left: 4px; }
.cm-hs-lg.r3 { background: #fbbf24; } .cm-hs-lg.r2 { background: #a3e635; } .cm-hs-lg.r1 { background: #7dd3c0; }

/* v14: scheda unica "Permessi e costi" (in fondo alla scheda del lago) */
.permits-card { border-radius: 1rem; border: 1px solid rgba(228, 184, 106, 0.25); background: rgba(228, 184, 106, 0.05); padding: 0.85rem; }
.permits-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #f3cf86; margin: 0 0 0.5rem; }
.permits-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.permits-list li { position: relative; padding-left: 1rem; font-size: 0.8rem; line-height: 1.45; color: #e7e5e4; }
.permits-list li::before { content: ""; position: absolute; left: 0.2rem; top: 0.55em; width: 5px; height: 5px; border-radius: 50%; background: #f3cf86; }
.permits-list li.permits-loading { color: #a8a29e; font-style: italic; }
.permits-list .ws-price { color: #bef264; }
.permits-warn { margin: 0.55rem 0 0; font-size: 0.68rem; color: #a8a29e; line-height: 1.4; }
.permits-warn a { color: #7dd3fc; }
.permits-portal { display: inline-block; margin-top: 0.55rem; font-size: 0.75rem; font-weight: 700; color: #7dd3fc; }
.species-absent-foot { margin-top: 1.5rem; padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.06); text-align: center; }
.species-absent-link { background: none; border: 0; padding: 0.4rem; font-size: 0.68rem; color: #78716c; text-decoration: underline; text-underline-offset: 2px; }
.species-absent-confirm p { font-size: 0.72rem; color: #a8a29e; line-height: 1.4; margin: 0; }
.species-absent-cancel { flex: 1; min-height: 38px; border-radius: 0.75rem; border: 1px solid rgba(255, 255, 255, 0.12); color: #a8a29e; font-size: 0.8rem; }
.species-absent-done { font-size: 0.7rem; color: #a8a29e; }
.species-absent-foot .species-absent-btn { min-height: 38px; font-size: 0.8rem; }
/* v14: attività — il momento scelto è scritto in ogni sezione */
.act-when-cap { margin: 0 0 0.4rem; }
.sa-now-k { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #a8a29e; margin-right: 0.25rem; }

/* v15: accesso obbligatorio */
body.cm-locked { overflow: hidden; }
body.cm-locked #appTutorial, body.cm-locked .lg-modal { display: none !important; }
.auth-gate { position: fixed; inset: 0; z-index: 9999; overflow-y: auto; background: radial-gradient(120% 80% at 50% 0%, #12352a 0%, #071510 55%, #040b08 100%); display: flex; justify-content: center; align-items: flex-start; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.auth-gate.hidden { display: none; }
.ag-card { width: 100%; max-width: 400px; margin: auto 0; display: flex; flex-direction: column; gap: 0.55rem; color: #e7e5e4; }
.ag-logo { width: 150px; height: auto; align-self: center; box-sizing: content-box; padding: 12px 16px; background: #fff; border-radius: 22px; box-shadow: 0 10px 24px rgba(0, 0, 0, .45); }
.ag-title { text-align: center; font-size: 1.6rem; line-height: 1.15; margin: 0.4rem 0 0; color: #f5f5f4; }
.ag-sub { text-align: center; font-size: 0.85rem; color: #a8a29e; line-height: 1.45; margin: 0 0 0.4rem; }
.ag-consent { display: grid; gap: 0.35rem; padding: 0.65rem 0.75rem; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
.ag-consent.ag-shake { animation: agShake .5s; border-color: rgba(248, 113, 113, .6); }
@keyframes agShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.ag-check { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.8rem; line-height: 1.4; color: #d6d3d1; }
.ag-check input { margin-top: 0.15rem; width: 18px; height: 18px; accent-color: #a3e635; flex: none; }
.ag-check a, .ag-foot a { color: #7dd3fc; }
.ag-social { display: grid; gap: 0.5rem; margin-top: 0.3rem; }
.ag-btn { display: flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 48px; border-radius: 14px; font-weight: 700; font-size: 0.92rem; border: 1px solid rgba(255, 255, 255, .14); }
.ag-btn svg { width: 20px; height: 20px; flex: none; }
.ag-google { background: #fff; color: #1f2937; }
.ag-apple { background: #000; color: #fff; border-color: rgba(255, 255, 255, .3); }
.ag-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.ag-divider { display: flex; align-items: center; gap: 0.6rem; color: #78716c; font-size: 0.75rem; margin: 0.3rem 0; }
.ag-divider::before, .ag-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .1); }
.ag-lbl { font-size: 0.72rem; color: #a8a29e; margin-top: 0.2rem; }
.ag-main { margin-top: 0.4rem; min-height: 50px; border-radius: 14px; background: #a3e635; color: #0a1713; font-weight: 800; font-size: 0.95rem; }
.ag-main:disabled { opacity: .6; }
.ag-msg { min-height: 1.1em; font-size: 0.8rem; color: #fca5a5; text-align: center; margin: 0; }
.ag-msg.is-ok { color: #bef264; }
.ag-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1rem; }
.ag-links button { background: none; border: 0; color: #7dd3fc; font-size: 0.8rem; padding: 0.35rem 0; }
.ag-links .ag-signup-cta { flex-basis: 100%; font-size: 1.05rem; font-weight: 700; color: #bef264; padding: 0.8rem 1rem; border: 1.5px solid rgba(190, 242, 100, .55); border-radius: 1rem; background: rgba(190, 242, 100, .08); margin-bottom: 0.25rem; }
.ag-links .ag-signup-cta:hover { background: rgba(190, 242, 100, .16); }
.ag-links button[data-ag-mode="reset"] { font-size: 0.9rem; }
.ag-foot { text-align: center; font-size: 0.7rem; color: #78716c; margin-top: 0.4rem; }
.ag-offline { text-align: center; font-size: 0.75rem; color: #fde68a; }

/* v16: logo ufficiale */
.brand-logo { width: 50px; height: auto; display: block; box-sizing: content-box; padding: 4px 6px; background: #fff; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); }
.app-tutorial-logo { display: block; width: 84px; height: auto; margin: 0 auto 0.4rem; box-sizing: content-box; padding: 8px 12px; background: #fff; border-radius: 16px; box-shadow: 0 6px 14px rgba(0, 0, 0, .45); }
.lm-badge { display: inline-block; margin: 0.5rem 0 0; padding: 0.25rem 0.7rem; border-radius: 999px; background: rgba(163, 230, 53, .14); border: 1px solid rgba(163, 230, 53, .4); color: #bef264; font-size: 0.78rem; font-weight: 700; }
.market-more > summary { cursor: pointer; list-style: none; font-size: 0.78rem; font-weight: 600; color: #a8a29e; padding: 0.45rem 0.1rem; }
.market-more > summary::-webkit-details-marker { display: none; }
.market-more > summary::before { content: "▸ "; color: #bef264; }
.market-more[open] > summary::before { content: "▾ "; }
#paywall #goPremium { background: linear-gradient(90deg, #e4b86a, #f3cf86); color: #0a1713; border-color: transparent; font-weight: 800; }
.fa-species-hint { font-size: 0.68rem; color: #a3e635; padding: 0.35rem 0.6rem 0.2rem; margin: 0; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

/* v17: chat salvate dell'IA, spot visto dall'IA, ricomincia */
.ai-tool-btn { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.3rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #d6d3d1; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); white-space: nowrap; }
.ai-tool-btn--new { color: #0a1713; background: #a3e635; border-color: #a3e635; }
#baitAdvisorPremium { position: relative; }
.ai-spot-line { margin: 0; padding: 0.45rem 1rem 0; font-size: 0.72rem; color: #d6d3d1; line-height: 1.35; }
.ai-spot-line b { color: #bef264; }
.ai-spot-line span { color: #78716c; }
.ai-chats-panel { position: absolute; inset: 0; z-index: 30; background: rgba(7, 18, 14, .98); border-radius: inherit; display: flex; flex-direction: column; padding: 0.9rem; overflow: hidden; }
.ai-chats-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.ai-chats-head p { flex: 1; margin: 0; font-weight: 800; font-size: 0.9rem; color: #f5f5f4; }
.ai-chats-x { width: 32px; height: 32px; border-radius: 999px; color: #a8a29e; background: rgba(255, 255, 255, .06); }
.ai-chats-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: grid; gap: 0.4rem; align-content: start; }
.ai-chats-list li { display: flex; align-items: stretch; gap: 0.3rem; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.ai-chats-list li.is-on { border-color: rgba(163, 230, 53, .5); }
.ai-chats-open { flex: 1; text-align: left; padding: 0.55rem 0.7rem; display: grid; gap: 0.15rem; min-width: 0; }
.ai-chats-open b { font-size: 0.82rem; color: #e7e5e4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-chats-open span { font-size: 0.68rem; color: #78716c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-chats-del { padding: 0 0.7rem; color: #a8a29e; }
.ai-chats-empty { color: #a8a29e; font-size: 0.82rem; text-align: center; margin: 2rem 0; flex: 1; }
.ai-chats-foot { font-size: 0.65rem; color: #57534e; text-align: center; margin: 0.5rem 0 0; }
#view-market.is-soon { overflow: hidden; position: relative; }
#view-market.is-soon > *:not(.market-soon) { filter: blur(3px); pointer-events: none; user-select: none; opacity: .45; }
.market-soon { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; }
.market-soon-card { max-width: 320px; text-align: center; padding: 1.4rem 1.2rem; border-radius: 22px; background: rgba(10, 23, 19, .92); border: 1px solid rgba(228, 184, 106, .35); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.market-soon-card svg { width: 40px; height: 40px; color: #e4b86a; margin: 0 auto 0.5rem; }
.market-soon-badge { display: inline-block; margin: 0 0 0.5rem; padding: 0.2rem 0.7rem; border-radius: 999px; background: rgba(228, 184, 106, .15); color: #f3cf86; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.market-soon-card h3 { font-size: 1.25rem; margin: 0 0 0.4rem; color: #f5f5f4; }
.market-soon-card p:last-child { font-size: 0.85rem; color: #a8a29e; line-height: 1.45; margin: 0; }
/* v18: riquadro Premium del profilo = stesso stile del paywall */
.pw-card--profile { padding: 1.1rem 1.1rem 1rem; border: 1px solid rgba(228, 184, 106, .3); background: radial-gradient(120% 90% at 0% 0%, rgba(228, 184, 106, .12), transparent 60%), rgba(10, 23, 19, .7); }
.pw-card--profile .lm-badge { margin: 0.4rem 0 0.1rem; }
.pp-status { margin: 0.5rem 0 0; padding: 0.5rem 0.7rem; border-radius: 12px; background: rgba(163, 230, 53, .12); border: 1px solid rgba(163, 230, 53, .35); color: #d9f99d; font-size: 0.82rem; font-weight: 700; }
.pp-cta { background: linear-gradient(90deg, #e4b86a, #f3cf86); color: #0a1713; }

/* Community: benvenuto visibile solo a chi entra la prima volta */
.wa-welcome { margin: 0.6rem auto 0.9rem; max-width: 92%; padding: 0.8rem 0.95rem; border-radius: 14px; background: #2a2412; border: 1px solid rgba(234, 179, 8, 0.28); color: #f5efe0; font-size: 0.84rem; line-height: 1.45; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.wa-welcome p { margin: 0.3rem 0; }
.wa-welcome ul { margin: 0.2rem 0 0.4rem; padding-left: 1.1rem; list-style: disc; }
.wa-welcome li { margin: 0.15rem 0; }
.wa-welcome-badge { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: #facc15; font-weight: 700; margin-top: 0 !important; }
.wa-welcome-title { font-weight: 700; font-size: 0.98rem; }
.wa-welcome-h { font-weight: 700; color: #fde68a; margin-top: 0.55rem !important; }
.wa-tick.is-failed { letter-spacing: 0; }
