

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
  overflow: hidden;
  height: 100%;
}

#map {
  height: 100vh;
  width: 100%;
  z-index: 1;
}

/* SPLASH */
#splash {
  position: fixed;
  inset: 0;
  background: #003366;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.35s ease-out, visibility 0.35s ease-out;
}

#splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#splash img {
  width: 140px;
  height: auto;
  margin-bottom: 15px;
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#splash-title {
  font-size: 32px;
  font-weight: 800;
  color: white;
  letter-spacing: 2px;
  margin-bottom: 30px;
}

.loader {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* WELCOME */
#welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 51, 102, 0.98);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  color: white;
  text-align: center;
  padding: 30px;
  box-sizing: border-box;
}

#welcome-overlay h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 15px;
}

#welcome-overlay p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 30px;
  opacity: 0.9;
}

.welcome-logo {
  width: 80px;
  margin-bottom: 20px;
  border-radius: 20px;
}

.btn-start {
  background: #10b981;
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-start:active {
  transform: scale(0.95);
}

/* TOP UI */
#ui-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1001;
  padding: 15px 0 9px 0 !important;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

#app-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
}

#app-title-wrap {
  text-align: center;
  margin-bottom: 12px;
}

#app-title {
  font-size: 22px;
  font-weight: 800;
  color: #003366;
  letter-spacing: 0.3px;
  line-height: 1;
}

#app-subtitle {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.btn-info-top,
.btn-credits-top {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.btn-credits-top {
  left: 16px;
  color: #334155;
}

.btn-info-top {
  right: 16px;
  color: #0b4d8c;
}

.btn-info-top svg,
.btn-credits-top svg {
  width: 22px;
  height: 22px;
}

.btn-info-top:active,
.btn-credits-top:active {
  transform: translateY(-50%) scale(0.96);
}

/* ZONE */
.zones-scroll {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 2px 15px 7px 15px !important;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.zones-scroll::-webkit-scrollbar {
  display: none;
}

.zones-scroll button {
  flex: 0 0 auto;
  background: #f1f5f9;
  border: none;
  color: #475569;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.zones-scroll button.active {
  background: #003366;
  color: white;
  box-shadow: 0 4px 10px rgba(0,51,102,0.2);
  transform: scale(1.02);
}

/* BOTTOM UI */
#ui-bottom {
  position: fixed;
  bottom: calc(64px + env(safe-area-inset-bottom)) !important;
  left: 0;
  width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.btn-locate-fab {
  background: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  color: #10b981;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}

.btn-locate-fab svg {
  width: 22px;
  height: 22px;
}

#search-bar {
  width: calc(100% - 176px) !important;
  height: 46px !important;
  align-self: flex-end !important;
  border-radius: 23px !important;
  padding: 0 15px !important;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  box-sizing: border-box;
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.05);
  pointer-events: auto;
}

#search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: #1e293b;
  font-size: 14px !important;
  margin-left: 8px !important;
  font-weight: 500;
  font-family: inherit;
}

#search-bar input:focus {
  outline: none;
}

#search-bar input::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

#spot-list-container {
  position: absolute;
  bottom: calc(156px + env(safe-area-inset-bottom));
  left: 5%;
  width: 90%;
  background: white;
  border-radius: 16px;
  max-height: 40vh;
  overflow-y: auto;
  z-index: 1002;
  box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
  display: none;
  padding: 5px;
}

.spot-list-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  color: #1e293b;
}

.spot-list-item:last-child {
  border-bottom: none;
}

/* MARKERS */
.wave-marker-container {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.crystal-capsule {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.98);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.wave-visual-box {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.wave-visual-box svg {
  width: 14px;
  height: 14px;
}

.wave-info-box {
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  min-width: 78px;
}

.wave-main-val {
  font-size: 12px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}

.wave-loc-name {
  font-size: 8px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 2px;
  line-height: 1.05;
}

.mini-arrow-circle {
  width: 18px;
  height: 18px;
  background: #1e293b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.map-zoomed-out .wave-marker-container {
  transform: scale(0.68);
}

.map-zoomed-out .wave-loc-name,
.map-zoomed-out .mini-arrow-circle {
  display: none !important;
}

.map-zoomed-out .wave-info-box {
  min-width: auto;
  padding: 0 5px 0 3px;
}

.map-zoomed-out .crystal-capsule {
  border-radius: 30px;
  padding: 2px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* =====================================================
   POPUP SPOT MODERNA - COMPATTA SENZA SCROLL INTERNO
===================================================== */

.search-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 10050;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  overflow: hidden;
}

.search-popup-overlay.show {
  display: flex !important;
}

.search-popup-card {
  position: relative;
  width: min(96vw, 430px);
  max-height: calc(100dvh - 18px);
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
  transform: translateY(0);
}

.search-popup-close {
  position: absolute;
  top: 10px;
  right: 13px;
  z-index: 40;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 42px;
  font-weight: 950;
  line-height: 28px;
  cursor: pointer;
  box-shadow: none;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.34);
}

/* COMPONENTI CARD */
.spot-modern-card,
.spot-modern-card * {
  box-sizing: border-box;
}

.spot-modern-card {
  width: 100%;
  height: auto;
  max-height: none;
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  color: #0f172a;
}

.spot-modern-card svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

/* HERO SECTION */
.spot-modern-hero {
  position: relative;
  min-height: 268px;
  padding: 14px 20px 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #003366 0%, #0069b8 54%, #0ea5e9 100%);
  overflow: hidden;
}

.spot-modern-wave-bg {
  position: absolute;
  right: -52px;
  bottom: -4px;
  width: 175px;
  height: 108px;
  opacity: 1;
  pointer-events: none;
}

.spot-modern-wave-bg svg {
  width: 175px;
  height: 108px;
}

.spot-modern-title-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 54px;
}

.spot-modern-title {
  color: #ffffff;
  font-size: 27px;
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-pin-icon {
  width: 19px;
  height: 19px;
  min-width: 19px;
  color: rgba(255, 255, 255, 0.86);
  flex-shrink: 0;
}

.spot-modern-location {
  position: relative;
  z-index: 2;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12.5px;
  line-height: 1.15;
  font-weight: 850;
}

/* STATO MARE E TREND */
.spot-modern-status-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  min-width: 0;
}

.spot-modern-status {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 23px;
  padding: 0 12px;
  margin-top: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 11.7px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.spot-modern-status span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.spot-modern-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 10.3px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.42px;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

/* METRICHE PRINCIPALI + DATI SECONDARI INTEGRATI */
.spot-modern-metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.spot-modern-metrics-with-details {
  align-items: flex-start;
}

.spot-modern-metric {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

.spot-modern-icon,
.spot-hero-icon-svg {
  width: 27px;
  height: 27px;
  min-width: 27px;
  color: #ffffff;
  flex-shrink: 0;
}

.spot-modern-icon {
  margin-top: 16px;
}

.spot-modern-metric-content {
  min-width: 0;
}

.spot-modern-label {
  color: rgba(255, 255, 255, 0.74);
  font-size: 9.6px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 5px;
}

.spot-modern-value {
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.6px;
  white-space: nowrap;
}

.spot-modern-value span {
  font-size: 12px;
  font-weight: 850;
}

.spot-modern-subdata {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 9px;
  min-width: 0;
}

.spot-modern-subdata div {
  display: block;
  min-width: 0;
  line-height: 1.05;
}

.spot-modern-subdata span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 8.5px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.38px;
  white-space: nowrap;
}

.spot-modern-subdata b {
  display: block;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.08;
  font-weight: 950;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

/* NON SERVONO PIÙ LE VECCHIE SEI CELLE */
.spot-hero-details {
  display: none !important;
}

.spot-modern-live-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 10.8px;
  font-weight: 800;
}

.spot-modern-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #84cc16;
  box-shadow: 0 0 0 4px rgba(132, 204, 22, 0.18);
}

/* PREFERITO MODERNO */
.spot-favorite-btn.spot-favorite-btn-modern {
  position: absolute;
  top: 50px;
  right: 6px;
  left: auto;
  z-index: 8;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.spot-favorite-btn.spot-favorite-btn-modern svg {
  width: 21px;
  height: 21px;
}

.spot-favorite-btn.spot-favorite-btn-modern.is-favorite {
  background: rgba(245, 158, 11, 0.96);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.30);
}

.spot-favorite-btn.spot-favorite-btn-modern.is-favorite svg path {
  fill: currentColor;
}

/* BODY */
.spot-modern-body {
  padding: 7px 12px 11px;
  background: #ffffff;
}

/* ATMOSFERA COMPATTA */
.spot-atmo-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0 0 5px;
  padding: 6px 9px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fafdff 0%, #f3f8fc 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.045);
}

.spot-atmo-title {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  flex-shrink: 0;
}

/* Icona tolta: era più vento che atmosfera */
.spot-atmo-icon {
  display: none !important;
}

.spot-atmo-title span {
  color: #64748b;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.62px;
}

.spot-atmo-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 7px;
  min-width: 0;
}

.spot-atmo-values div {
  min-width: 0;
  text-align: center;
  padding: 5px 7px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(226, 232, 240, 0.85);
}

.spot-atmo-values span {
  display: block;
  margin-bottom: 3px;
  color: #94a3b8;
  font-size: 7.8px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.42px;
}

.spot-atmo-values b {
  display: block;
  color: #0f172a;
  font-size: 12px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}
/* CLASSI VECCHIE DISATTIVATE */
.spot-mini-grid,
.spot-detail-strip,
.spot-wind-strip,
.spot-data-panel,
.spot-sea-panel,
.spot-wind-panel,
.spot-atmo-panel,
.spot-panel-head,
.spot-panel-grid,
.spot-panel-item {
  display: none !important;
}

/* MAREA */
.dash-tide-box {
  margin: 0 0 7px !important;
  padding: 7px 10px !important;
  background: linear-gradient(180deg, #f0f9ff 0%, #eaf6ff 100%) !important;
  border: none !important;
  border-radius: 15px !important;
  text-align: center !important;
}

.dash-tide-title {
  display: block !important;
  margin: 0 0 7px !important;
  color: #003366 !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: 0.65px !important;
  text-transform: uppercase !important;
}

.dash-tide-title::after {
  content: none !important;
  display: none !important;
}

.dash-tide-title-icon {
  color: #0f5f9c !important;
  margin-right: 4px !important;
}

.dash-tide-grid {
  display: grid !important;
  grid-template-columns: 1fr 1px 1fr !important;
  align-items: center !important;
  gap: 8px !important;
}

.dash-tide-item {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.dash-tide-item span {
  display: inline !important;
  font-size: 8.8px !important;
  font-weight: 950 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.dash-tide-item b {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.tide-arrow {
  font-style: normal !important;
  font-size: 15px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

.tide-up {
  color: #10b981 !important;
}

.tide-down {
  color: #0ea5e9 !important;
}

.dash-tide-sep {
  width: 1px !important;
  height: 24px !important;
  background: rgba(148, 163, 184, 0.48) !important;
}

.dash-tide-note {
  display: none !important;
}

/* PREVISIONE MARE */
.dash-forecast-title {
  padding: 0 0 5px !important;
  background: #ffffff !important;
  color: #94a3b8 !important;
  text-align: center !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.7px !important;
}

.dash-forecast-wrap {
  position: relative;
  background: #ffffff !important;
  margin-bottom: 7px !important;
  overflow: hidden !important;
}

.dash-forecast-slider {
  display: flex;
  gap: 8px !important;
  overflow-x: auto;
  padding: 0 2px 3px !important;
  background: #ffffff !important;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.dash-forecast-slider::-webkit-scrollbar {
  display: none;
}

.dash-forecast-slider .fc-card {
  min-width: calc((100% - 16px) / 3) !important;
  flex: 0 0 calc((100% - 16px) / 3) !important;
  scroll-snap-align: start;
}


.fc-card {
  background: #f4f8fc !important;
  padding: 7px 7px !important;
  border-radius: 14px !important;
  text-align: center;
  box-shadow: none !important;
}

.fc-hour {
  color: #64748b !important;
  font-size: 9.4px !important;
  font-weight: 900 !important;
  margin-bottom: 3px !important;
}

.fc-val {
  color: #0f172a !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  margin-bottom: 3px !important;
}

.fc-val span {
  font-size: 10.2px !important;
  font-weight: 850 !important;
}

.fc-line {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  color: #475569 !important;
  font-size: 9px !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
  margin: 1px 0 !important;
}

.fc-line svg {
  width: 10px !important;
  height: 10px !important;
}

.fc-dir-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  margin-top: 3px !important;
}

.fc-dir-icon {
  width: 17px !important;
  height: 17px !important;
  border-radius: 999px !important;
  background: #0f172a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.fc-dir-icon svg {
  width: 9px !important;
  height: 9px !important;
}

.fc-dir-row span {
  color: #475569 !important;
  font-size: 9.8px !important;
  font-weight: 950 !important;
}

.forecast-dots {
  display: flex !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-top: 0 !important;
}

.forecast-dots span {
  width: 12px !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: #dbeafe !important;
}

.forecast-dots span.active {
  background: #0ea5e9 !important;
}

/* TEMPERATURA MARE */
.sst-val  { font-weight: 900; }
.sst-cold { color: #0ea5e9; }
.sst-cool { color: #22c55e; }
.sst-mild { color: #f59e0b; }
.sst-warm { color: #ef4444; }

/* =====================================================
   CASSETTO SPIAGGE VICINE - LISTA PROFESSIONALE
===================================================== */

#nearby-spots-drawer {
  position: absolute;
  bottom: calc(148px + env(safe-area-inset-bottom));
  left: 50%;
  width: min(94vw, 430px);
  max-height: 58vh;
  transform: translateX(-50%) translateY(0);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 26px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22);
  z-index: 1002;
  transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 1;
  overflow: hidden;
}

#nearby-spots-drawer.hidden {
  transform: translateX(-50%) translateY(34px);
  opacity: 0;
  pointer-events: none;
}

.nearby-drawer-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 13px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.nearby-drawer-header::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 999px;
}

.nearby-drawer-header span {
  font-size: 17px;
  font-weight: 950;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.nearby-drawer-header button {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nearby-container {
  display: block;
  padding: 12px 14px 16px;
  max-height: calc(58vh - 62px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nearby-container::-webkit-scrollbar {
  display: none;
}

.nearby-section {
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.nearby-section:last-child {
  margin-bottom: 0;
}

.nearby-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 2px 10px;
  padding: 0 0 8px;
  border: none;
  border-bottom: 1px solid #e8eef5;
  background: transparent;
  color: #0f5f9c;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.75px;
  text-transform: uppercase;
}

.nearby-section-title::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #0ea5e9;
  flex-shrink: 0;
}

.nearby-section-title span {
  display: none !important;
}

.nearby-section.north .nearby-section-title,
.nearby-section.east .nearby-section-title {
  color: #0f5f9c;
}

.nearby-section.south .nearby-section-title,
.nearby-section.west .nearby-section-title {
  color: #475569;
}

.nearby-section.south .nearby-section-title::before,
.nearby-section.west .nearby-section-title::before {
  background: #94a3b8;
}

.nearby-card {
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #e5edf5;
  border-radius: 18px;
  padding: 13px;
  margin: 0 0 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.055);
}

.nearby-card:active {
  transform: scale(0.985);
  background: #f8fafc;
}

.nearby-card-main {
  min-width: 0;
  flex: 1;
}

.nearby-name {
  font-size: 15px;
  font-weight: 950;
  color: #0f172a;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nearby-sea {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.nearby-card.has-live-report {
  border-color: rgba(14, 165, 233, 0.32);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.10);
}

.nearby-report-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  color: #075985;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  white-space: nowrap;
}

.nearby-report-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #0ea5e9;
  box-shadow: 0 0 0 rgba(14, 165, 233, 0.45);
  animation: ondasNearbyReportPulse 1.6s infinite;
}

@keyframes ondasNearbyReportPulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.nearby-sea-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.04);
}

.nearby-card-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nearby-dist {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #047857;
  font-weight: 950;
  background: #ecfdf5;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
  white-space: nowrap;
}

.nearby-dist svg {
  width: 12px;
  height: 12px;
}

.nearby-arrow {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f4f7fb;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  border: 1px solid #e8eef5;
}

/* =====================================================
   INSTALL BANNER
===================================================== */

.install-banner {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 350px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 51, 102, 0.2);
  z-index: 10005;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: #1e293b;
}

.install-title {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 8px;
  color: #003366;
}

.install-text {
  font-size: 13px;
  color: #475569;
  margin-bottom: 12px;
  line-height: 1.4;
}

.install-btn-secondary,
.install-btn-primary {
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.install-btn-secondary {
  background: #f1f5f9;
  color: #1e293b;
}

.install-btn-primary {
  background: #10b981;
  color: white;
}

.install-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.install-arrow {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid rgba(255, 255, 255, 0.95);
}

.share-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin: 0 2px;
  color: #007AFF;
}

.spot-photo-slider {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 5px 10px;
  background: #ffffff;
}

.spot-photo-slide {
  width: 40%;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

/* =====================================================
   PUSH FAB + POPUP
===================================================== */

.btn-push-fab {
  background: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  color: #003366;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}

.btn-push-fab svg {
  width: 23px;
  height: 23px;
}

.btn-push-fab:active {
  transform: scale(0.96);
}

#ondasPushBtn.push-active {
  background: #16a34a !important;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.35) !important;
}

#ondasPushBtn.push-active svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

.push-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10080;
  padding: 22px;
}

.push-popup-overlay.show {
  display: flex;
}

.push-popup-card {
  width: min(90vw, 340px);
  background: white;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.push-popup-title {
  font-size: 20px;
  font-weight: 800;
  color: #003366;
  margin-bottom: 8px;
}

.push-popup-text {
  font-size: 14px;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 18px;
}

.push-popup-danger,
.push-popup-cancel {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 13px;
  font-weight: 800;
  font-size: 15px;
  margin-top: 10px;
}

.push-popup-danger {
  background: #ef4444;
  color: white;
}

.push-popup-cancel {
  background: #f1f5f9;
  color: #1e293b;
}

/* =====================================================
   POPUP NUOVA NOTIFICA
===================================================== */

.ondas-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.ondas-popup-overlay.show {
  display: flex;
}

.ondas-popup {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 28px;
  padding: 22px 18px 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  animation: ondasPopupIn 0.28s ease;
}

@keyframes ondasPopupIn {
  from {
    transform: translateY(30px) scale(0.96);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.ondas-popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: 0.55px;
}

.ondas-popup-title {
  font-size: 22px;
  font-weight: 800;
  color: #003366;
  line-height: 1.15;
  margin-bottom: 10px;
}

.ondas-popup-body {
  font-size: 15px;
  line-height: 1.6;
  color: #334155;
}

.ondas-popup-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.ondas-popup-actions button {
  flex: 1;
  border: none;
  border-radius: 16px;
  padding: 14px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

.ondas-popup-later {
  background: #f1f5f9;
  color: #334155;
}

.ondas-popup-open {
  background: linear-gradient(135deg, #003366, #0b4d8c);
  color: #fff;
}

/* =====================================================
   REPORT SPOT + NAVIGA + SPONSOR NELLA SCHEDA MODERNA
===================================================== */

.ondas-report-box {
  background: #ffffff;
  border-top: 1px solid #edf2f7;
  padding: 6px 0 7px !important;
}

.ondas-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px !important;
}

.ondas-report-title {
  font-size: 11.6px;
  font-weight: 950;
  color: #0f5f9c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ondas-report-time {
  font-size: 10.4px;
  font-weight: 850;
  color: #94a3b8;
  white-space: nowrap;
}

.ondas-report-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ondas-report-content.has-photo {
  justify-content: space-between;
}

.ondas-report-lines {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.ondas-report-line {
  font-size: 12px !important;
  font-weight: 850;
  color: #334155;
  line-height: 1.16 !important;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

.ondas-report-line strong {
  color: #0f172a;
  font-weight: 950;
}

.ondas-report-empty {
  font-size: 12px;
  font-weight: 850;
  color: #64748b;
  line-height: 1.16;
}

.ondas-report-mini-note {
  display: none !important;
}

.ondas-report-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px !important;
}

.ondas-report-btn {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 7px 9px;
  min-height: 32px;
  font-size: 12.1px;
  font-weight: 950;
  cursor: pointer;
  font-family: inherit;
}

.ondas-report-btn.secondary {
  background: #eef6ff;
  color: #075985;
}

.ondas-report-btn.primary {
  background: linear-gradient(135deg, #075985, #0ea5e9);
  color: #ffffff;
}

.ondas-report-ok { color: #059669; }
.ondas-report-limit { color: #f59e0b; }
.ondas-report-no { color: #dc2626; }

/* FOTO REPORT */
.ondas-report-thumb,
.ondas-report-thumb-link {
  display: block !important;
  width: 82px !important;
  height: 56px !important;
  border-radius: 13px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  background: #e2e8f0;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.14);
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
}

.ondas-report-photo-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.ondas-report-photo-side {
  width: 82px !important;
  flex-shrink: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.ondas-report-photo-side .ondas-report-thumb-link {
  width: 82px !important;
  height: 56px !important;
  border-radius: 13px !important;
}

.ondas-report-photo-side .ondas-report-photo-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.ondas-report-photo-open,
.ondas-report-photo-side .ondas-report-photo-open {
  display: none !important;
}

/* PULSANTE NAVIGA */
.dash-nav-box {
  background: transparent;
  padding: 0 0 7px !important;
}

.dash-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  min-height: 38px !important;
  padding: 8px 12px;
  border-radius: 15px;
  background: linear-gradient(135deg, #075985, #0ea5e9);
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 12.8px;
  font-weight: 950;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 7px 16px rgba(14, 165, 233, 0.22);
}

.dash-nav-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* SPONSOR */
.spot-sponsor-card {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 17px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.spot-sponsor-badge {
  display: none !important;
}

.spot-sponsor-main,
.spot-modern-body .spot-sponsor-main,
body .spot-modern-body .spot-sponsor-main,
body .spot-modern-card .spot-sponsor-main {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 8 / 5 !important;
  overflow: hidden !important;
  border-radius: 17px !important;
  background: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}

.spot-sponsor-logo,
.spot-modern-body .spot-sponsor-logo,
body .spot-modern-body .spot-sponsor-logo,
body .spot-modern-card .spot-sponsor-logo {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  border-radius: 17px !important;
  object-fit: contain !important;
  object-position: center center !important;
  transform: none !important;
  background: #ffffff !important;
  padding: 0 !important;
  margin: 0 !important;
}

.spot-sponsor-logo.fallback {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #003366, #0ea5e9) !important;
  color: #ffffff !important;
  font-size: 20px !important;
  font-weight: 950 !important;
}

.spot-sponsor-info,
.spot-sponsor-name,
.spot-sponsor-text {
  display: none !important;
}

/* Il bottone diventa overlay invisibile cliccabile sopra tutta l'immagine */
.spot-sponsor-btn,
.spot-modern-body .spot-sponsor-btn,
body .spot-modern-body .spot-sponsor-btn,
body .spot-modern-card .spot-sponsor-btn {
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  background: transparent !important;
  color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 0 !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}

/* =====================================================
   FORM REPORT SPOT
===================================================== */

.ondas-report-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10090;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.ondas-report-modal-overlay.show {
  display: flex;
}

.ondas-report-modal {
  width: min(100%, 430px);
  max-height: calc(100dvh - 60px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
  padding: 17px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.ondas-report-modal::-webkit-scrollbar {
  display: none;
}

.ondas-report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 13px;
}

.ondas-report-modal-title {
  font-size: 20px;
  font-weight: 950;
  color: #003366;
  line-height: 1.1;
}

.ondas-report-modal-subtitle {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 750;
  color: #64748b;
  line-height: 1.35;
}

.ondas-report-modal-close {
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
  flex-shrink: 0;
}

.ondas-report-section {
  margin-top: 13px;
}

.ondas-report-section-title {
  font-size: 12px;
  font-weight: 950;
  color: #0f5f9c;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  margin-bottom: 8px;
}

.ondas-report-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-chip,
.report-sport-chip {
  border: 1px solid #dbeafe;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 850;
  font-family: inherit;
}

.report-chip.selected,
.report-sport-chip.selected {
  background: linear-gradient(135deg, #075985, #0ea5e9);
  border-color: #0ea5e9;
  color: #ffffff;
  box-shadow: 0 5px 12px rgba(14, 165, 233, 0.22);
}

.ondas-report-note {
  width: 100%;
  min-height: 58px;
  resize: none;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 15px;
  padding: 11px 12px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 13px;
  color: #0f172a;
  outline: none;
}

.ondas-report-note:focus {
  border-color: #0ea5e9;
  background: #ffffff;
}

.ondas-report-photo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ondas-report-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef6ff;
  color: #075985;
  border: 1px solid #bfdbfe;
  border-radius: 15px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.ondas-report-photo-btn input {
  display: none;
}

.ondas-report-photo-text {
  font-size: 12px;
  font-weight: 750;
  color: #64748b;
  line-height: 1.3;
}

.ondas-report-footer {
  display: flex;
  gap: 10px;
  margin-top: 17px;
}

.ondas-report-cancel,
.ondas-report-submit {
  flex: 1;
  border: none;
  border-radius: 16px;
  padding: 13px 10px;
  font-size: 14px;
  font-weight: 950;
  font-family: inherit;
}

.ondas-report-cancel {
  background: #f1f5f9;
  color: #334155;
}

.ondas-report-submit {
  background: linear-gradient(135deg, #075985, #0ea5e9);
  color: #ffffff;
}

.ondas-report-error {
  display: none;
  margin-top: 10px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.ondas-report-error.show {
  display: block;
}

/* =====================================================
   MODALE FOTO REPORT
===================================================== */

.ondas-report-photo-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ondas-report-photo-modal-overlay.show {
  display: flex;
}

.ondas-report-photo-modal-box {
  position: relative;
  width: min(94vw, 760px);
  max-height: 88vh;
  border-radius: 22px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.ondas-report-photo-modal-img {
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  background: #020617;
}

.ondas-report-photo-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-size: 28px;
  line-height: 36px;
  font-weight: 850;
  cursor: pointer;
}

body.ondas-report-photo-opened {
  overflow: hidden;
}

/* =====================================================
   ONDAS PREMIUM READY - SOLO NAV IN BASSO / ICONE APPLE STYLE
===================================================== */

#home-premium-panel {
  display: none !important;
}

#ondas-bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(0px + env(safe-area-inset-bottom));
  height: 60px;
  z-index: 1200;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px 6px 5px;
  box-sizing: border-box;
}

.ondas-nav-item {
  position: relative;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 18px;
  font-family: inherit;
  font-weight: 850;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ondas-nav-item:active {
  transform: scale(0.95);
}

.ondas-nav-item.active {
  color: #075985;
  background: #eef6ff;
}

.ondas-nav-icon {
  width: 23px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apple-tab-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.ondas-nav-label {
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.1px;
}

.ondas-nav-item.premium::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 17px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

#ondas-ai-btn {
  position: fixed !important;
  left: 18px !important;
  bottom: calc(65px + env(safe-area-inset-bottom)) !important;
  width: 128px !important;
  height: 43px !important;
  z-index: 1300 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border: none !important;
  border-radius: 22px !important;
  background: linear-gradient(135deg, #075985, #0ea5e9) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.24) !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}

#ondas-ai-btn:active {
  transform: scale(0.96) !important;
}

.ondas-ai-btn-icon {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
}
/* PREFERITI LEGACY */
.spot-hero-box {
  position: relative;
  padding-left: 108px !important;
  padding-right: 62px !important;
}

.spot-favorite-btn {
  position: absolute;
  top: 13px;
  left: 14px;
  right: auto;
  height: 34px;
  min-width: 78px;
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 950;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 4;
}

.spot-favorite-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.spot-favorite-btn.is-favorite {
  background: rgba(245, 158, 11, 0.95);
  border-color: rgba(255,255,255,0.42);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.28);
}

.spot-favorite-btn.is-favorite svg path {
  fill: currentColor;
}

.spot-favorite-btn:active {
  transform: scale(0.94);
}

.spot-favorite-btn.spot-favorite-btn-modern {
  position: absolute;
  top: 50px;
  right: 15px;
  left: auto;
  z-index: 8;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.spot-favorite-btn.spot-favorite-btn-modern svg {
  width: 21px;
  height: 21px;
}

.spot-favorite-btn.spot-favorite-btn-modern.is-favorite {
  background: rgba(245, 158, 11, 0.96);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.30);
}
/* MONITORAGGIO SPOT */
.spot-monitor-btn {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 8;
}

.spot-monitor-btn svg {
  display: block;
}

.spot-monitor-btn.spot-monitor-btn-modern {
  position: absolute;
  top: 94px;
  right: 5px;
  left: auto;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spot-monitor-btn.spot-monitor-btn-modern svg {
  width: 21px;
  height: 21px;
}

.spot-monitor-btn.spot-monitor-btn-modern.is-monitored {
  background: rgba(34, 197, 94, 0.96);
  border-color: rgba(255,255,255,0.55);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.34);
}
.spot-monitor-btn:active {
  transform: scale(0.94);
}
/* =====================================================
   TOAST SALVATAGGIO PREFERITI
===================================================== */

.ondas-toast {
  position: fixed;
  left: 50%;
  bottom: calc(176px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(18px);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 11px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.ondas-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =====================================================
   ROSA DEI VENTI
===================================================== */

.wind-compass,
.wind-rose,
.compass,
.compass-box,
.wind-direction-compass,
.dash-wind-compass {
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  flex: 0 0 60px !important;
}

.wind-compass svg,
.wind-rose svg,
.compass svg,
.compass-box svg,
.wind-direction-compass svg,
.dash-wind-compass svg {
  width: 60px !important;
  height: 60px !important;
}

.wind-direction-box,
.wind-direction-row,
.dash-wind-direction,
.dash-wind-row {
  gap: 12px !important;
  align-items: center !important;
}

.wind-name,
.wind-label,
.wind-dir-name,
.dash-wind-name {
  font-size: 15px !important;
  font-weight: 950 !important;
  letter-spacing: 0.35px !important;
  line-height: 1.1 !important;
}

.wind-deg,
.wind-dir-detail,
.dash-wind-detail {
  font-size: 12px !important;
  font-weight: 850 !important;
  color: #64748b !important;
}

/* =====================================================
   MARKER CON REPORT LIVE
===================================================== */

.wave-marker-container.has-live-report .crystal-capsule {
  position: relative !important;
  border-color: rgba(245, 158, 11, 0.72) !important;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.08),
    0 0 0 0 rgba(245, 158, 11, 0.55) !important;
  animation: ondasMarkerReportPulse 1.55s ease-out infinite;
}

.wave-marker-container.has-live-report .crystal-capsule::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #f59e0b;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
  animation: ondasMarkerReportDotPulse 1.55s ease-out infinite;
}

@keyframes ondasMarkerReportPulse {
  0% {
    box-shadow:
      0 4px 8px rgba(0,0,0,0.08),
      0 0 0 0 rgba(245, 158, 11, 0.42);
  }

  70% {
    box-shadow:
      0 4px 8px rgba(0,0,0,0.08),
      0 0 0 9px rgba(245, 158, 11, 0);
  }

  100% {
    box-shadow:
      0 4px 8px rgba(0,0,0,0.08),
      0 0 0 0 rgba(245, 158, 11, 0);
  }
}

@keyframes ondasMarkerDotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
  }

  70% {
    box-shadow: 0 0 0 7px rgba(245, 158, 11, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

@keyframes ondasMarkerReportDotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
  }

  70% {
    box-shadow: 0 0 0 7px rgba(245, 158, 11, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.map-zoomed-out .wave-marker-container.has-live-report .crystal-capsule::after {
  top: -6px;
  right: -6px;
  width: 12px;
  height: 12px;
}

/* =====================================================
   OTTIMIZZAZIONE SCHERMI PICCOLI
===================================================== */

@media (max-width: 420px) {
  #ondas-bottom-nav {
    height: 68px;
    border-radius: 24px;
    bottom: calc(2px + env(safe-area-inset-bottom));
  }

  .ondas-nav-label {
    font-size: 10px;
  }

  .apple-tab-icon {
    width: 22px;
    height: 22px;
  }

  #ui-bottom {
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
  }

  #ondas-ai-btn {
    left: 16px !important;
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    width: 124px !important;
    height: 44px !important;
    font-size: 12px !important;
  }

  .ondas-ai-btn-icon {
    width: 15px;
    height: 15px;
  }

  #search-bar {
    width: calc(100% - 164px) !important;
    height: 44px !important;
    border-radius: 22px !important;
    padding: 0 13px !important;
  }

  #search-bar input {
    font-size: 13.5px !important;
  }

  /* SCHEDA SPOT - BADGE E COLONNA ACQUA SU SCHERMI PICCOLI */
  .spot-modern-status-row {
    gap: 5px !important;
  }

  .spot-modern-status {
    padding: 0 10px !important;
    font-size: 11px !important;
    letter-spacing: 0.25px !important;
  }

  .spot-modern-trend {
    min-height: 22px !important;
    padding: 0 7px !important;
    font-size: 8.9px !important;
    letter-spacing: 0.18px !important;
  }

  .spot-modern-metric:nth-child(3) .spot-modern-icon,
  .spot-modern-metric:nth-child(3) .spot-hero-icon-svg {
    width: 23px !important;
    height: 23px !important;
    min-width: 23px !important;
  }
}
/* SCHERMI BASSI */
@media (max-height: 760px) {
  .search-popup-overlay {
    padding-top: 6px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .search-popup-card {
    max-height: calc(100dvh - 14px);
  }

  .spot-modern-hero {
    min-height: 258px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .spot-modern-title {
    font-size: 25px;
  }

  .spot-modern-status-row {
    margin-top: 7px;
  }

  .spot-modern-metrics {
    margin-top: 12px;
    gap: 8px;
  }

  .spot-modern-metric {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 6px;
  }

  .spot-modern-icon,
  .spot-hero-icon-svg {
    width: 25px;
    height: 25px;
    min-width: 25px;
  }

  .spot-modern-icon {
    margin-top: 14px;
  }

  .spot-modern-value {
    font-size: 21px;
  }

  .spot-modern-subdata {
    margin-top: 8px;
    gap: 5px;
  }

  .spot-modern-subdata span {
    font-size: 8px;
  }

  .spot-modern-subdata b {
    font-size: 12.2px;
    line-height: 1.08;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  .spot-modern-live-row {
    margin-top: 11px;
  }

  .spot-atmo-strip {
    padding: 6px 8px;
    margin-bottom: 6px;
  }

  .spot-atmo-values div {
    padding: 5px 5px;
  }

  .dash-tide-box {
    padding: 6px 10px !important;
    margin-bottom: 6px !important;
  }

  .dash-tide-title {
    font-size: 10.5px !important;
    margin-bottom: 5px !important;
  }

  .fc-card {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }

  .ondas-report-box {
    padding-top: 6px !important;
    padding-bottom: 7px !important;
  }

  .ondas-report-actions {
    margin-top: 6px !important;
  }

  .ondas-report-btn {
    min-height: 31px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  .dash-nav-btn {
    min-height: 36px !important;
  }
}

@media (max-height: 720px) {
  .search-popup-overlay {
    padding-top: 4px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }

  .search-popup-card {
    transform: translateY(0);
    max-height: calc(100dvh - 10px);
  }

  .spot-modern-hero {
    min-height: 250px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .spot-modern-title {
    font-size: 24px;
  }

  .spot-modern-status-row {
    margin-top: 6px;
  }

  .spot-modern-metrics {
    margin-top: 11px;
    gap: 7px;
  }

  .spot-modern-metric {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 6px;
  }

  .spot-modern-icon,
  .spot-hero-icon-svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }

  .spot-modern-icon {
    margin-top: 13px;
  }

  .spot-modern-value {
    font-size: 20px;
  }

  .spot-modern-subdata {
    margin-top: 7px;
    gap: 4px;
  }

  .spot-modern-subdata span {
    font-size: 7.7px;
  }

  .spot-modern-subdata b {
    font-size: 11.5px;
    line-height: 1.08;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  .spot-modern-live-row {
    margin-top: 10px;
  }

  .spot-atmo-strip {
    padding: 6px 8px;
    margin-bottom: 6px;
  }

  .spot-atmo-title span {
    font-size: 9px;
  }

  .spot-atmo-values span {
    font-size: 7.5px;
  }

  .spot-atmo-values b {
    font-size: 10.8px;
  }

  .dash-tide-box {
    padding: 6px 10px !important;
    margin-bottom: 6px !important;
  }

  .dash-tide-title {
    font-size: 10.2px !important;
    margin-bottom: 5px !important;
  }

  .dash-tide-item b {
    font-size: 12px !important;
  }

  .dash-tide-item span {
    font-size: 8.4px !important;
  }

  .fc-card {
    padding: 5px 6px !important;
  }

  .ondas-report-box {
    padding: 5px 0 6px !important;
  }

  .ondas-report-photo-side,
  .ondas-report-photo-side .ondas-report-thumb-link,
  .ondas-report-thumb,
  .ondas-report-thumb-link {
    width: 82px !important;
  }

  .ondas-report-photo-side .ondas-report-thumb-link,
  .ondas-report-thumb,
  .ondas-report-thumb-link {
    height: 56px !important;
  }

  .dash-nav-btn {
    min-height: 35px !important;
    font-size: 12.2px;
  }
}

#ondas-bottom-nav .ondas-nav-item {
  text-decoration: none !important;
  -webkit-appearance: none;
  appearance: none;
}
/* =====================================================
   RIFINITURA SPAZI SCHEDA SPOT
   Recupera spazio senza sovrapporre sponsor e bottoni
===================================================== */

/* 1) HERO BLU: compatta solo leggermente */
.spot-modern-hero {
  min-height: 244px !important;
  padding-bottom: 8px !important;
}

.spot-modern-live-row {
  margin-top: 10px !important;
  margin-bottom: 0 !important;
}

/* 2) CORPO SCHEDA */
.spot-modern-body {
  padding-top: 4px !important;
  padding-bottom: 7px !important;
}

/* 3) ATMOSFERA e MAREA */
.spot-atmo-strip {
  margin: 0 0 5px !important;
  padding: 6px 9px !important;
}

.dash-tide-box {
  margin: 0 0 5px !important;
  padding: 6px 10px !important;
}

/* 4) PREVISIONE MARE */
.dash-forecast-wrap {
  margin-bottom: 5px !important;
}

.dash-forecast-slider {
  padding-bottom: 2px !important;
}

.forecast-dots {
  margin-top: 0 !important;
}

/* 5) REPORT */
.ondas-report-box {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

.ondas-report-head {
  margin-bottom: 3px !important;
}

.ondas-report-actions {
  margin-top: 5px !important;
}

/* 6) NAVIGA: deve restare visibile, senza essere coperto */
.dash-nav-box {
  padding: 0 0 6px !important;
  margin: 0 !important;
}

.dash-nav-btn {
  margin: 0 !important;
}

/* 7) SPONSOR: niente margini negativi */
.spot-sponsor-card {
  margin-top: 0 !important;
  padding-top: 0 !important;
  clear: both !important;
}

/* wrapper sponsor puliti */
.spot-sponsor-wrap,
.spot-sponsor-section,
.spot-sponsor-box,
.sponsor-box {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* sponsor stabile */
.spot-sponsor-main,
.spot-modern-body .spot-sponsor-main,
body .spot-modern-body .spot-sponsor-main,
body .spot-modern-card .spot-sponsor-main {
  margin-top: 0 !important;
}

/* 8) Recupero vero dello spazio: sponsor un filo più basso/compatto, non sovrapposto */
.spot-sponsor-main,
.spot-modern-body .spot-sponsor-main,
body .spot-modern-body .spot-sponsor-main,
body .spot-modern-card .spot-sponsor-main {
  width: 96% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  aspect-ratio: 2 / 1 !important;
}

/* 9) Schermi bassi */
@media (max-height: 760px) {
  .spot-modern-hero {
    min-height: 236px !important;
    padding-bottom: 7px !important;
  }

  .spot-modern-live-row {
    margin-top: 8px !important;
  }

  .spot-modern-body {
    padding-top: 3px !important;
    padding-bottom: 6px !important;
  }

  .ondas-report-box {
    padding-top: 3px !important;
    padding-bottom: 3px !important;
  }

  .dash-nav-box {
    padding-bottom: 5px !important;
  }

  .spot-sponsor-card {
    margin-top: 0 !important;
  }
}
/* =====================================================
   CENTRATURA SCHEDA QUANDO NON C'È SPONSOR
   Non tocca gli spot sponsorizzati
===================================================== */

/* Se nella scheda non esiste lo sponsor, abbassa leggermente la card */
.search-popup-card:not(:has(.spot-sponsor-card)):not(:has(.spot-sponsor-main)) {
  transform: translateY(70px) !important;
}

/* Schermi più bassi: spostamento più leggero */
@media (max-height: 760px) {
  .search-popup-card:not(:has(.spot-sponsor-card)):not(:has(.spot-sponsor-main)) {
    transform: translateY(52px) !important;
  }
}

@media (max-height: 720px) {
  .search-popup-card:not(:has(.spot-sponsor-card)):not(:has(.spot-sponsor-main)) {
    transform: translateY(38px) !important;
  }
}
/* =====================================================
   FIX DIMENSIONE VALORE VENTO
   Rende il numero del vento grande come onda/acqua
===================================================== */

.spot-modern-wind-value {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 3px !important;
  white-space: nowrap !important;
}

.spot-modern-wind-value .wind-speed-main {
  font-size: 22px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: -0.6px !important;
  color: #ffffff !important;
}

.spot-modern-wind-value .wind-unit-main,
.spot-modern-wind-value .wind-from-main {
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  color: #ffffff !important;
}

/* schermi bassi: segue la dimensione compatta della scheda */
@media (max-height: 760px) {
  .spot-modern-wind-value .wind-speed-main {
    font-size: 21px !important;
  }

  .spot-modern-wind-value .wind-unit-main,
  .spot-modern-wind-value .wind-from-main {
    font-size: 11.5px !important;
  }
}

@media (max-height: 720px) {
  .spot-modern-wind-value .wind-speed-main {
    font-size: 20px !important;
  }

  .spot-modern-wind-value .wind-unit-main,
  .spot-modern-wind-value .wind-from-main {
    font-size: 11px !important;
  }
}
/* FIX POSIZIONE STELLINA PREFERITI SPOT */
.search-popup-card .spot-favorite-btn.spot-favorite-btn-modern,
.spot-modern-card .spot-favorite-btn.spot-favorite-btn-modern {
  right: 6px !important;
  left: auto !important;
}