/* =========================================================
   LevantGo Home V3 - Experience Compass
   Additive CSS: keeps legacy public portal logic intact.
========================================================= */

:root{
  --v3-bg: #f7efe4;
  --v3-surface: rgba(255,255,255,.84);
  --v3-surface-strong: rgba(255,255,255,.96);
  --v3-text: #192027;
  --v3-muted: #68717b;
  --v3-border: rgba(31,41,55,.12);
  --v3-shadow: 0 20px 60px rgba(21,31,43,.16);
  --v3-shadow-soft: 0 12px 34px rgba(21,31,43,.12);
  --v3-blue: #176b87;
  --v3-green: #2f7d64;
  --v3-coral: #e36f55;
  --v3-sand: #d8a85c;
  --v3-ink: #111827;
  --v3-radius-xl: 30px;
  --v3-radius-lg: 22px;
  --v3-safe-bottom: max(16px, env(safe-area-inset-bottom));
}

html[data-theme="dark"]{
  --v3-bg: #0d1318;
  --v3-surface: rgba(18,25,32,.82);
  --v3-surface-strong: rgba(18,25,32,.96);
  --v3-text: #f3f5f7;
  --v3-muted: #a8b2bd;
  --v3-border: rgba(255,255,255,.13);
  --v3-shadow: 0 22px 70px rgba(0,0,0,.42);
  --v3-shadow-soft: 0 14px 38px rgba(0,0,0,.34);
  --v3-blue: #65bfd6;
  --v3-green: #7bd6a5;
  --v3-coral: #ff977e;
  --v3-sand: #f0c46f;
  --v3-ink: #f8fafc;
}

body.public-portal{
  background:
    radial-gradient(circle at 10% 0%, rgba(227,111,85,.18), transparent 32%),
    radial-gradient(circle at 100% 12%, rgba(23,107,135,.20), transparent 30%),
    var(--v3-bg);
  color: var(--v3-text);
}

.portal-shell{
  position:relative;
  min-height:100dvh;
  isolation:isolate;
  overflow:hidden;
}

.portal-main,
.portal-map-wrap{
  position:relative;
  z-index:1;
  min-height:100dvh;
  isolation:isolate;
}

.portal-map-wrap{
  padding:76px 12px calc(22px + var(--v3-safe-bottom));
}

.portal-map{
  border-radius:32px;
  overflow:hidden;
  box-shadow: var(--v3-shadow-soft);
  filter:saturate(.98) contrast(.96);
}

.portal-map-wrap .leaflet-container{
  z-index:1;
  border-radius:32px;
}

.portal-map-wrap .leaflet-control-container{ z-index:25; }
.portal-map-status{ z-index:45; }

.portal-header{
  z-index:140;
  background: color-mix(in srgb, var(--v3-surface-strong) 88%, transparent);
  border:1px solid var(--v3-border);
  box-shadow:0 12px 40px rgba(0,0,0,.08);
  backdrop-filter: blur(18px);
}

.portal-header__center{ min-width:0; }
.portal-ai-bar--header{ max-width:720px; margin:0 auto; }

.portal-lang-quick{
  position:relative;
  z-index:150;
  flex:0 0 auto;
}

.portal-lang-quick summary{
  list-style:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:42px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--v3-border);
  background:var(--v3-surface-strong);
  color:var(--v3-text);
  font-weight:800;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}

.portal-lang-quick summary::-webkit-details-marker{ display:none; }

.portal-lang-quick__menu{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:170px;
  padding:8px;
  border-radius:18px;
  border:1px solid var(--v3-border);
  background:var(--v3-surface-strong);
  box-shadow:var(--v3-shadow-soft);
  display:grid;
  gap:4px;
}

.portal-lang-quick:not([open]) .portal-lang-quick__menu{ display:none; }
.portal-lang-quick__menu a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 11px;
  border-radius:13px;
  color:var(--v3-text);
  text-decoration:none;
  font-weight:750;
}
.portal-lang-quick__menu a:hover,
.portal-lang-quick__menu a.is-current{
  background: color-mix(in srgb, var(--v3-blue) 12%, transparent);
}

.portal-experience{
  position:absolute;
  left:clamp(12px, 3vw, 30px);
  top:clamp(92px, 11vh, 118px);
  width:min(520px, calc(100vw - 24px));
  max-height:calc(100dvh - 132px);
  z-index:90;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-width:none;
  padding:12px;
  border-radius:36px;
  border:1px solid var(--v3-border);
  background:linear-gradient(145deg, color-mix(in srgb, var(--v3-surface-strong) 94%, transparent), color-mix(in srgb, var(--v3-surface) 88%, transparent));
  box-shadow:var(--v3-shadow);
  backdrop-filter:blur(22px) saturate(1.16);
  transition:transform .28s ease, opacity .22s ease, visibility .22s ease;
}

.portal-experience::-webkit-scrollbar{ display:none; }

.portal-experience__hero{
  padding:20px 18px 14px;
}

.portal-experience__eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  color:var(--v3-blue);
  font-size:.82rem;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.portal-experience h1{
  margin:0;
  color:var(--v3-text);
  font-size:clamp(2rem, 5vw, 3.15rem);
  line-height:.98;
  letter-spacing:-.055em;
}

.portal-experience__hero p:not(.portal-experience__eyebrow){
  margin:14px 0 0;
  color:var(--v3-muted);
  font-size:1rem;
  line-height:1.45;
}

.portal-experience__actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.portal-experience__primary,
.portal-experience__secondary,
.portal-map-modebar button{
  appearance:none;
  border:0;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:46px;
  padding:0 16px;
  border-radius:999px;
  font-weight:900;
}

.portal-experience__primary{
  color:#fff;
  background:linear-gradient(135deg, var(--v3-blue), var(--v3-green));
  box-shadow:0 14px 32px color-mix(in srgb, var(--v3-blue) 28%, transparent);
}

.portal-experience__secondary,
.portal-map-modebar button,
.portal-map-modebar a{
  color:var(--v3-text);
  background:var(--v3-surface-strong);
  border:1px solid var(--v3-border);
}

.portal-experience__quick{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  padding:0 8px 8px;
}

.portal-experience-card,
.portal-experience-mini{
  appearance:none;
  border:1px solid var(--v3-border);
  cursor:pointer;
  text-decoration:none;
  text-align:left;
  color:var(--v3-text);
  background:var(--v3-surface-strong);
}

.portal-experience-card{
  min-height:138px;
  padding:14px;
  border-radius:24px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:16px;
  box-shadow:0 10px 26px rgba(0,0,0,.06);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.portal-experience-card:hover,
.portal-experience-card:focus-visible{
  transform:translateY(-2px);
  box-shadow:0 16px 36px rgba(0,0,0,.12);
  border-color: color-mix(in srgb, var(--v3-blue) 34%, var(--v3-border));
}

.portal-experience-card__icon{
  width:44px;
  height:44px;
  border-radius:17px;
  display:grid;
  place-items:center;
  color:#fff;
  background:var(--v3-blue);
  font-size:1.1rem;
}

.portal-experience-card--food .portal-experience-card__icon{ background:var(--v3-coral); }
.portal-experience-card--events .portal-experience-card__icon{ background:var(--v3-sand); }
.portal-experience-card--trails .portal-experience-card__icon{ background:var(--v3-green); }
.portal-experience-card--near .portal-experience-card__icon{ background:var(--v3-blue); }
.portal-experience-card--services .portal-experience-card__icon{ background:#7c5ac7; }
.portal-experience-card--places .portal-experience-card__icon{ background:#2b8a9b; }

.portal-experience-card__body{ display:grid; gap:5px; }
.portal-experience-card strong{ font-size:1.02rem; line-height:1.08; }
.portal-experience-card small{ color:var(--v3-muted); line-height:1.25; font-weight:650; }

.portal-experience__today{
  margin:4px 8px 8px;
  padding:14px;
  border-radius:26px;
  background:color-mix(in srgb, var(--v3-blue) 7%, transparent);
  border:1px solid var(--v3-border);
}

.portal-experience__section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}

.portal-experience__section-head div{ display:grid; gap:3px; }
.portal-experience__section-head strong{ color:var(--v3-text); }
.portal-experience__section-head span{ color:var(--v3-muted); font-size:.86rem; font-weight:650; }
.portal-experience__section-head a{ color:var(--v3-blue); font-weight:900; text-decoration:none; white-space:nowrap; }

.portal-experience-strip{
  display:grid;
  gap:8px;
}

.portal-experience-mini{
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  border-radius:19px;
}
.portal-experience-mini i{
  width:38px;
  height:38px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border-radius:14px;
  color:#fff;
  background:var(--v3-blue);
}
.portal-experience-mini span{ display:grid; gap:2px; min-width:0; }
.portal-experience-mini strong{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.portal-experience-mini small{ color:var(--v3-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.portal-map-modebar{
  position:absolute;
  left:50%;
  top:88px;
  transform:translateX(-50%) translateY(-16px);
  z-index:100;
  display:flex;
  gap:8px;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:.22s ease;
}

body.portal-map-mode .portal-map-modebar{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateX(-50%) translateY(0);
}

body.portal-map-mode .portal-experience{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(18px) scale(.98);
}

body.portal-map-mode .portal-map{
  border-radius:24px;
}

body.portal-map-mode .portal-map-wrap{
  padding-bottom:12px;
}

.portal-search-panel{
  z-index:340 !important;
  border-radius:28px;
  box-shadow:var(--v3-shadow);
}

.portal-backdrop{
  z-index:300 !important;
  background:rgba(8,13,18,.48);
  backdrop-filter:blur(8px);
}

.portal-drawer{ z-index:330 !important; }
.portal-modal{ z-index:420 !important; }
.portal-toast{ z-index:520 !important; }
.cookie-consent{ z-index:430 !important; }
.portal-weather-badge{ z-index:110; }

.legal-footer,
.public-legal-footer,
.portal-legal-footer,
.portal-legal-footer-public,
.cookie-preferences-badge{
  z-index:42 !important;
}

body.has-filters-open .legal-footer,
body.has-drawer-open .legal-footer,
body.portal-map-mode .legal-footer,
body.has-filters-open .public-legal-footer,
body.has-drawer-open .public-legal-footer,
body.portal-map-mode .public-legal-footer,
body.has-filters-open .portal-legal-footer,
body.has-drawer-open .portal-legal-footer,
body.portal-map-mode .portal-legal-footer,
body.has-filters-open .portal-legal-footer-public,
body.has-drawer-open .portal-legal-footer-public,
body.portal-map-mode .portal-legal-footer-public{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

@media (min-width: 980px){
  .portal-map-wrap{ padding-left:clamp(440px, 37vw, 590px); }
  body.portal-map-mode .portal-map-wrap{ padding-left:12px; }
}

@media (max-width: 760px){
  .portal-header{
    top:10px;
    left:10px;
    right:10px;
    gap:8px;
  }

  .portal-header__search{ display:none; }
  .portal-ai-bar__submit span{ display:none; }
  .portal-ai-bar__input{ font-size:.92rem; }
  .portal-lang-quick summary{ min-height:40px; padding:0 10px; }
  .portal-lang-quick summary i{ display:none; }

  .portal-map-wrap{
    padding:68px 0 0;
  }

  .portal-map,
  .portal-map-wrap .leaflet-container{
    border-radius:0;
    box-shadow:none;
  }

  .portal-experience{
    position:fixed;
    left:10px;
    right:10px;
    top:auto;
    bottom:calc(10px + var(--v3-safe-bottom));
    width:auto;
    max-height:min(72dvh, 650px);
    border-radius:30px;
    padding:9px;
  }

  .portal-experience__hero{
    padding:15px 13px 10px;
  }

  .portal-experience h1{
    font-size:2rem;
    max-width:11ch;
  }

  .portal-experience__hero p:not(.portal-experience__eyebrow){
    font-size:.92rem;
    margin-top:10px;
  }

  .portal-experience__actions{
    margin-top:12px;
    gap:8px;
  }

  .portal-experience__primary,
  .portal-experience__secondary{
    min-height:42px;
    padding:0 13px;
    font-size:.9rem;
  }

  .portal-experience__quick{
    grid-template-columns:1fr 1fr;
    gap:8px;
    padding:0 4px 4px;
  }

  .portal-experience-card{
    min-height:106px;
    padding:11px;
    border-radius:21px;
    gap:10px;
  }

  .portal-experience-card__icon{
    width:36px;
    height:36px;
    border-radius:14px;
  }

  .portal-experience-card small{
    display:none;
  }

  .portal-experience__today{
    display:none;
  }

  .portal-map-modebar{
    top:auto;
    bottom:calc(14px + var(--v3-safe-bottom));
    width:calc(100vw - 20px);
    justify-content:center;
    transform:translateX(-50%) translateY(18px);
    padding:8px;
    border-radius:999px;
    border:1px solid var(--v3-border);
    background:var(--v3-surface-strong);
    box-shadow:var(--v3-shadow-soft);
    backdrop-filter:blur(18px);
  }

  .portal-map-modebar button{
    min-height:42px;
    padding:0 12px;
    flex:1 1 0;
    font-size:.88rem;
  }

  .portal-search-panel{
    position:fixed !important;
    left:10px !important;
    right:10px !important;
    top:76px !important;
    bottom:calc(10px + var(--v3-safe-bottom)) !important;
    max-height:none !important;
    overflow:auto;
  }
}

@media (max-width: 380px){
  .portal-experience h1{ font-size:1.75rem; }
  .portal-experience__hero p:not(.portal-experience__eyebrow){ display:none; }
  .portal-experience-card{ min-height:94px; }
  .portal-experience__quick{ grid-template-columns:1fr 1fr; }
}


/* =========================================================
   LevantGo Home V3.1 - Stack + Header Refinement
   Purpose:
   - filters/drawer/modal live above backdrop
   - header becomes a floating, softer capsule
   - map mode controls never stay under header on desktop
========================================================= */

.portal-shell{
  isolation:isolate;
}

/* Keep the map as a low layer. UI overlays must not be trapped by it. */
.portal-main,
.portal-map-wrap{
  z-index:1;
}

/* JS moves the live filter panel to .portal-shell.
   This prevents .portal-main stacking-context from trapping it under backdrop. */
.portal-search-panel{
  position:fixed !important;
  z-index:920 !important;
  pointer-events:auto;
}

.portal-backdrop{
  z-index:820 !important;
}

.portal-drawer{
  z-index:940 !important;
}

.portal-modal,
.cookie-consent{
  z-index:980 !important;
}

.portal-toast{
  z-index:1060 !important;
}

/* Header: softer, app-like, less rectangular. */
.portal-header{
  position:fixed;
  top:max(12px, env(safe-area-inset-top));
  left:50%;
  right:auto;
  width:min(860px, calc(100vw - 28px));
  min-height:58px;
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:46px minmax(0, 1fr) auto 46px;
  align-items:center;
  gap:10px;
  padding:7px 9px;
  border-radius:999px;
  z-index:720;
  background:color-mix(in srgb, var(--v3-surface-strong) 84%, transparent);
  border:1px solid color-mix(in srgb, var(--v3-border) 78%, transparent);
  box-shadow:0 14px 42px rgba(15,23,42,.12);
  backdrop-filter:blur(22px) saturate(1.15);
}

.portal-header .icon-btn,
.portal-header__search,
.portal-header__menu{
  width:46px;
  height:46px;
  border-radius:999px;
}

.portal-ai-bar--header{
  max-width:none;
}

.portal-ai-bar--header .portal-ai-bar__inner{
  min-height:44px;
  border-radius:999px;
  box-shadow:none;
}

.portal-lang-quick{
  z-index:760;
}

.portal-lang-quick summary{
  min-height:44px;
  border-radius:999px;
  box-shadow:none;
}

/* Map mode controls: priority above the header and positioned away from it on desktop. */
.portal-map-modebar{
  z-index:780;
}

@media (min-width: 981px){
  body.portal-map-mode .portal-header{
    width:min(620px, calc(100vw - 420px));
    left:auto;
    right:18px;
    transform:none;
    grid-template-columns:minmax(0, 1fr) auto 46px;
  }

  body.portal-map-mode .portal-header__search{
    display:none;
  }

  body.portal-map-mode .portal-map-modebar{
    left:18px;
    top:max(16px, env(safe-area-inset-top));
    transform:none;
    max-width:390px;
    flex-wrap:wrap;
    justify-content:flex-start;
    padding:8px;
    border-radius:28px;
    border:1px solid var(--v3-border);
    background:color-mix(in srgb, var(--v3-surface-strong) 88%, transparent);
    box-shadow:0 14px 40px rgba(15,23,42,.13);
    backdrop-filter:blur(20px) saturate(1.12);
  }

  body.portal-map-mode .portal-map-modebar button{
    min-height:42px;
    padding:0 14px;
  }
}

/* =========================================================
   V3.4.1 HOTFIX - Hide header only when drawer is really open
========================================================= */

body:has(.portal-drawer.is-open) .portal-header{
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

/* Filters sheet: explicit geometry on desktop and mobile. */
@media (min-width: 761px){
  .portal-search-panel{
    top:86px !important;
    right:24px !important;
    left:auto !important;
    bottom:24px !important;
    width:min(440px, calc(100vw - 48px)) !important;
    max-height:none !important;
    overflow:auto;
  }

  body.portal-map-mode .portal-search-panel{
    top:96px !important;
  }
}

@media (max-width: 760px){
  .portal-header{
    top:max(10px, env(safe-area-inset-top));
    left:10px;
    right:10px;
    width:auto;
    min-height:54px;
    transform:none;
    grid-template-columns:minmax(0, 1fr) auto 44px;
    padding:6px;
    border-radius:26px;
  }

  .portal-header__search{
    display:none !important;
  }

  .portal-header .icon-btn,
  .portal-header__menu{
    width:44px;
    height:44px;
  }

  .portal-lang-quick summary{
    min-height:42px;
    padding:0 10px;
  }

  .portal-search-panel{
    left:10px !important;
    right:10px !important;
    top:76px !important;
    bottom:calc(10px + var(--v3-safe-bottom)) !important;
    width:auto !important;
    max-height:none !important;
    overflow:auto;
    border-radius:26px;
  }

  .portal-map-modebar{
    z-index:780;
  }
}

/* The legal/footer layer must never steal focus from active UI. */
body.has-filters-open .portal-legal-footer,
body.is-portal-drawer-open .portal-legal-footer,
body.portal-map-mode .portal-legal-footer{
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

/* =========================================================
   V3.2 hotfix - header language/menu no-wrap
   Prevents the quick language switcher + menu button from
   forcing the header onto two visual rows.
========================================================= */
.portal-header,
.portal-header.portal-header--map{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  overflow:visible !important;
}

.portal-header__search,
.portal-header__menu,
.portal-lang-quick{
  flex:0 0 auto !important;
}

.portal-header__center{
  flex:1 1 auto !important;
  min-width:0 !important;
  width:auto !important;
  max-width:none !important;
}

.portal-ai-bar--header,
.portal-ai-bar--header .portal-ai-bar__inner{
  width:100% !important;
  min-width:0 !important;
}

.portal-ai-bar__input{
  min-width:0 !important;
}

.portal-header__menu{
  margin-left:0 !important;
  align-self:center !important;
}

.portal-lang-quick summary{
  white-space:nowrap !important;
}

@media (min-width: 981px){
  body.portal-map-mode .portal-header,
  body.portal-map-mode .portal-header.portal-header--map{
    display:flex !important;
    flex-wrap:nowrap !important;
    width:min(620px, calc(100vw - 420px));
  }

  body.portal-map-mode .portal-header__center{
    flex:1 1 auto !important;
    min-width:0 !important;
  }
}

@media (max-width: 1120px) and (min-width: 761px){
  .portal-header,
  .portal-header.portal-header--map{
    width:min(780px, calc(100vw - 28px));
  }

  .portal-ai-bar__submit span{
    display:none !important;
  }

  .portal-lang-quick summary{
    width:48px;
    padding:0 !important;
    justify-content:center;
  }

  .portal-lang-quick summary i{
    display:none !important;
  }
}

@media (max-width: 760px){
  .portal-header,
  .portal-header.portal-header--map{
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:7px !important;
  }

  .portal-header__center{
    flex:1 1 auto !important;
    min-width:0 !important;
  }

  .portal-lang-quick summary{
    width:44px;
    padding:0 !important;
    justify-content:center;
  }

  .portal-header__menu{
    flex-basis:44px !important;
  }
}

@media (max-width: 420px){
  .portal-lang-quick summary{
    width:40px;
    min-height:40px;
    font-size:.78rem;
  }

  .portal-header__menu,
  .portal-header .icon-btn,
  .portal-header__menu.icon-btn{
    width:40px !important;
    height:40px !important;
  }

  .portal-ai-bar__badge{
    width:34px;
    height:34px;
  }
}

/* =========================================================
   V3.3 hotfix - responsive map modebar
   Desktop: compact floating control cluster, no half-empty bar.
   Mobile: safe horizontal dock; buttons cannot overflow outside.
========================================================= */
.portal-map-modebar,
body.portal-map-mode .portal-map-modebar{
  box-sizing:border-box !important;
}

body.portal-map-mode .portal-map-modebar button{
  white-space:nowrap !important;
}

@media (min-width: 981px){
  body.portal-map-mode .portal-map-modebar{
    display:inline-flex !important;
    width:auto !important;
    max-width:min(620px, calc(100vw - 680px)) !important;
    min-width:0 !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:7px !important;
    padding:7px !important;
    border-radius:999px !important;
    overflow:visible !important;
  }

  body.portal-map-mode .portal-map-modebar button{
    flex:0 0 auto !important;
    min-height:40px !important;
    min-width:40px !important;
    padding:0 13px !important;
    border-radius:999px !important;
    box-shadow:none !important;
  }

  body.portal-map-mode .portal-map-modebar button[data-experience-reset]:not([hidden]){
    color:#fff !important;
    background:linear-gradient(135deg, var(--v3-coral), var(--v3-sand)) !important;
    border-color:transparent !important;
  }
}

@media (min-width: 981px) and (max-width: 1280px){
  body.portal-map-mode .portal-map-modebar{
    max-width:min(520px, calc(100vw - 560px)) !important;
  }

  body.portal-map-mode .portal-map-modebar button{
    padding:0 11px !important;
  }

  body.portal-map-mode .portal-map-modebar button span{
    font-size:.88rem !important;
  }
}

@media (min-width: 981px) and (max-width: 1120px){
  body.portal-map-mode .portal-map-modebar{
    max-width:calc(100vw - 420px) !important;
  }

  body.portal-map-mode .portal-map-modebar button span{
    display:none !important;
  }

  body.portal-map-mode .portal-map-modebar button{
    width:42px !important;
    height:42px !important;
    padding:0 !important;
  }
}

@media (max-width: 760px){
  body.portal-map-mode .portal-map-modebar{
    left:10px !important;
    right:10px !important;
    width:auto !important;
    max-width:none !important;
    transform:translateY(0) !important;
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:7px !important;
    padding:7px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    overscroll-behavior-x:contain !important;
    -webkit-overflow-scrolling:touch !important;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    border-radius:24px !important;
  }

  body.portal-map-mode .portal-map-modebar::-webkit-scrollbar{
    display:none;
  }

  body.portal-map-mode .portal-map-modebar button{
    flex:0 0 auto !important;
    min-width:max-content !important;
    min-height:40px !important;
    height:40px !important;
    padding:0 11px !important;
    gap:7px !important;
    scroll-snap-align:start;
    border-radius:999px !important;
    font-size:.84rem !important;
  }

  body.portal-map-mode .portal-map-modebar button[data-experience-discover]{
    position:sticky;
    left:0;
    z-index:2;
    color:#fff !important;
    background:linear-gradient(135deg, var(--v3-blue), var(--v3-green)) !important;
    border-color:transparent !important;
    box-shadow:0 8px 22px color-mix(in srgb, var(--v3-blue) 24%, transparent);
  }

  body.portal-map-mode .portal-map-modebar button[data-experience-reset]:not([hidden]){
    color:#fff !important;
    background:linear-gradient(135deg, var(--v3-coral), var(--v3-sand)) !important;
    border-color:transparent !important;
  }
}

@media (max-width: 430px){
  body.portal-map-mode .portal-map-modebar{
    left:8px !important;
    right:8px !important;
    bottom:calc(10px + var(--v3-safe-bottom)) !important;
    gap:6px !important;
    padding:6px !important;
    border-radius:22px !important;
  }

  body.portal-map-mode .portal-map-modebar button{
    min-width:40px !important;
    width:40px !important;
    height:40px !important;
    padding:0 !important;
    justify-content:center !important;
  }

  body.portal-map-mode .portal-map-modebar button span{
    display:none !important;
  }

  body.portal-map-mode .portal-map-modebar button[data-experience-discover]{
    width:auto !important;
    min-width:82px !important;
    padding:0 12px !important;
  }

  body.portal-map-mode .portal-map-modebar button[data-experience-discover] span{
    display:inline !important;
  }
}

@media (max-width: 340px){
  body.portal-map-mode .portal-map-modebar button[data-experience-discover]{
    min-width:40px !important;
    width:40px !important;
    padding:0 !important;
  }

  body.portal-map-mode .portal-map-modebar button[data-experience-discover] span{
    display:none !important;
  }
}

/* =========================================================
   V3.4 refinements - drawer, SEO card, place CTA, filters layer,
   desktop legal footer and AI prompt chips
========================================================= */

.portal-drawer{
  z-index:420 !important;
}

.portal-backdrop{
  z-index:300 !important;
}

.portal-shell > .portal-search-panel,
.portal-search-panel[data-map-search-panel]{
  z-index:360 !important;
}

.portal-modal,
.cookie-consent{
  z-index:460 !important;
}

.portal-toast{
  z-index:560 !important;
}

.portal-experience__place-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.portal-experience__place-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:0 13px;
  border-radius:999px;
  color:var(--v3-text);
  text-decoration:none;
  font-weight:900;
  border:1px solid var(--v3-border);
  background:color-mix(in srgb, var(--v3-surface-strong) 92%, transparent);
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}

.portal-experience__place-link i{
  color:var(--v3-coral);
}

.portal-experience-about{
  margin:4px 8px 8px;
  padding:15px;
  border-radius:26px;
  display:flex;
  gap:13px;
  border:1px solid var(--v3-border);
  background:linear-gradient(145deg,
    color-mix(in srgb, var(--v3-surface-strong) 94%, transparent),
    color-mix(in srgb, var(--v3-blue) 7%, transparent)
  );
}

.portal-experience-about__icon{
  width:42px;
  height:42px;
  flex:0 0 42px;
  border-radius:16px;
  display:grid;
  place-items:center;
  color:#fff;
  background:linear-gradient(135deg, var(--v3-blue), var(--v3-green));
}

.portal-experience-about h2{
  margin:0;
  color:var(--v3-text);
  font-size:1.05rem;
  letter-spacing:-.02em;
}

.portal-experience-about p{
  margin:6px 0 0;
  color:var(--v3-muted);
  font-size:.90rem;
  line-height:1.42;
  font-weight:650;
}

.portal-experience-about__links{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:10px;
}

.portal-experience-about__links a{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  text-decoration:none;
  color:var(--v3-blue);
  background:color-mix(in srgb, var(--v3-blue) 10%, transparent);
  font-size:.80rem;
  font-weight:900;
}

/* Keep legal public info visible on desktop in map mode, but adapted to V3. */
@media (min-width: 1181px){
  body.portal-map-mode .portal-legal-footer,
  body.portal-map-mode .portal-legal-footer-public,
  body.portal-map-mode .public-legal-footer,
  body.portal-map-mode .legal-footer{
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    position:fixed !important;
    left:18px !important;
    right:auto !important;
    bottom:18px !important;
    width:min(560px, calc(100vw - 36px)) !important;
    max-width:560px !important;
    border-radius:22px !important;
    border:1px solid var(--v3-border) !important;
    background:color-mix(in srgb, var(--v3-surface-strong) 82%, transparent) !important;
    backdrop-filter:blur(18px) saturate(1.1) !important;
    box-shadow:0 16px 44px rgba(0,0,0,.16) !important;
    z-index:82 !important;
  }

  body.portal-map-mode.has-filters-open .portal-legal-footer,
  body.portal-map-mode.is-portal-drawer-open .portal-legal-footer,
  body.portal-map-mode.has-filters-open .portal-legal-footer-public,
  body.portal-map-mode.is-portal-drawer-open .portal-legal-footer-public,
  body.portal-map-mode.has-filters-open .public-legal-footer,
  body.portal-map-mode.is-portal-drawer-open .public-legal-footer,
  body.portal-map-mode.has-filters-open .legal-footer,
  body.portal-map-mode.is-portal-drawer-open .legal-footer{
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
}

/* Mobile: keep SEO card compact, not intrusive. */
@media (max-width: 760px){
  .portal-experience-about{
    display:none;
  }
}

/* Live filters placement after JS relocation. */
@media (min-width: 761px){
  .portal-shell > .portal-search-panel[data-map-search-panel]{
    position:fixed !important;
    top:96px !important;
    right:24px !important;
    bottom:24px !important;
    left:auto !important;
    width:min(460px, calc(100vw - 48px)) !important;
    max-height:none !important;
    overflow:auto !important;
  }
}

@media (max-width: 760px){
  .portal-shell > .portal-search-panel[data-map-search-panel]{
    position:fixed !important;
    left:10px !important;
    right:10px !important;
    top:76px !important;
    bottom:calc(10px + max(16px, env(safe-area-inset-bottom))) !important;
    width:auto !important;
    max-height:none !important;
    overflow:auto !important;
    border-radius:28px !important;
  }
}

/* AI quick prompt chips shown on input focus. */
.portal-header{
  overflow:visible !important;
}

.portal-ai-quick-prompts{
  position:absolute;
  left:64px;
  right:64px;
  top:calc(100% + 9px);
  z-index:155;
  display:flex;
  align-items:center;
  gap:8px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
  padding:3px;
}

.portal-ai-quick-prompts::-webkit-scrollbar{
  display:none;
}

.portal-ai-quick-prompts[hidden]{
  display:none !important;
}

.portal-ai-quick-prompts__btn{
  appearance:none;
  border:1px solid var(--v3-border);
  cursor:pointer;
  flex:0 0 auto;
  min-height:36px;
  padding:0 13px;
  border-radius:999px;
  color:var(--v3-text);
  background:color-mix(in srgb, var(--v3-surface-strong) 90%, transparent);
  box-shadow:0 10px 24px rgba(0,0,0,.10);
  backdrop-filter:blur(14px);
  font-weight:900;
}

.portal-ai-quick-prompts__btn:hover,
.portal-ai-quick-prompts__btn:focus-visible{
  background:color-mix(in srgb, var(--v3-blue) 14%, var(--v3-surface-strong));
}

@media (max-width: 760px){
  .portal-ai-quick-prompts{
    left:8px;
    right:8px;
    top:calc(100% + 7px);
  }

  .portal-ai-quick-prompts__btn{
    min-height:34px;
    padding:0 11px;
    font-size:.84rem;
  }
}

/* Weather state for night icons/classes. */
.portal-weather-badge.is-night{
  background:linear-gradient(135deg, rgba(15,23,42,.92), rgba(30,41,59,.86));
  color:#fff;
}

.portal-weather-badge.is-night i{
  color:#dbeafe;
}


/* =========================================================
   V3.5 - AI popup readability hotfix
   The AI response panel must be readable above the map in both themes.
========================================================= */
.portal-ai-popup{
  opacity:1 !important;
  color:var(--v3-text, var(--portal-text, #111827)) !important;
  background:var(--v3-surface-strong, var(--portal-card, #ffffff)) !important;
  border:1px solid var(--v3-border, var(--portal-line, rgba(15,23,42,.12))) !important;
  box-shadow:0 22px 70px rgba(0,0,0,.28) !important;
  backdrop-filter:blur(18px) saturate(1.08) !important;
  -webkit-backdrop-filter:blur(18px) saturate(1.08) !important;
}

.portal-ai-popup[hidden]{
  display:none !important;
}

.portal-ai-popup__head,
.portal-ai-popup__body,
.portal-ai-popup__foot,
.portal-ai-popup__content,
.portal-ai-popup__titlewrap,
.portal-ai-popup__titlewrap strong,
.portal-ai-popup__titlewrap span{
  opacity:1 !important;
  color:var(--v3-text, var(--portal-text, #111827)) !important;
}

.portal-ai-popup__content{
  background:color-mix(in srgb, var(--v3-surface-strong, #ffffff) 92%, transparent) !important;
  border-radius:16px;
}

html[data-theme="dark"] .portal-ai-popup{
  background:rgba(18,25,32,.98) !important;
  color:#f8fafc !important;
  border-color:rgba(255,255,255,.14) !important;
}

html[data-theme="dark"] .portal-ai-popup__head,
html[data-theme="dark"] .portal-ai-popup__body,
html[data-theme="dark"] .portal-ai-popup__foot,
html[data-theme="dark"] .portal-ai-popup__content,
html[data-theme="dark"] .portal-ai-popup__titlewrap,
html[data-theme="dark"] .portal-ai-popup__titlewrap strong,
html[data-theme="dark"] .portal-ai-popup__titlewrap span{
  color:#f8fafc !important;
}

/* =========================================================
   V3.9 CLEAN - Desktop map rail + footer + mobile cards
========================================================= */

/* ---------------------------------------------------------
   Desktop largo: header a destra, modebar a sinistra
--------------------------------------------------------- */

@media (min-width: 1181px){
  body.portal-map-mode .portal-header.portal-header--map{
    position:fixed !important;
    top:max(12px, env(safe-area-inset-top)) !important;
    right:18px !important;
    left:auto !important;

    width:min(680px, calc(100vw - 510px)) !important;
    min-height:58px !important;

    transform:none !important;

    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:10px !important;

    z-index:720 !important;
  }

  body.portal-map-mode .portal-header__search{
    display:none !important;
  }

  body.portal-map-mode .portal-header__center{
    flex:1 1 auto !important;
    min-width:0 !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools{
    position:fixed !important;
    z-index:760 !important;

    left:18px !important;
    right:auto !important;
    top:max(12px, env(safe-area-inset-top)) !important;
    bottom:auto !important;

    width:auto !important;
    max-width:430px !important;
    min-width:0 !important;

    transform:none !important;

    display:inline-flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:flex-start !important;
    flex-wrap:nowrap !important;

    gap:7px !important;
    padding:7px !important;

    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;

    border-radius:999px !important;
    border:1px solid var(--v3-border) !important;
    background:color-mix(in srgb, var(--v3-surface-strong) 90%, transparent) !important;
    box-shadow:0 14px 40px rgba(15,23,42,.13) !important;
    backdrop-filter:blur(20px) saturate(1.12) !important;
    -webkit-backdrop-filter:blur(20px) saturate(1.12) !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool{
    width:42px !important;
    min-width:42px !important;
    height:42px !important;
    min-height:42px !important;
    padding:0 !important;
    gap:0 !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:999px !important;
    white-space:nowrap !important;
    box-shadow:none !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool span{
    display:none !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--back,
  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--reset:not([hidden]){
    width:auto !important;
    min-width:unset !important;
    padding:0 14px !important;
    gap:8px !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--back span,
  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--reset:not([hidden]) span{
    display:inline !important;
    font-size:.86rem !important;
    font-weight:900 !important;
  }
}

/* ---------------------------------------------------------
   Tablet e mobile: header alto, modebar in basso centrata
--------------------------------------------------------- */

@media (max-width: 1180px){
  body.portal-map-mode .portal-header.portal-header--map{
    position:fixed !important;
    top:max(10px, env(safe-area-inset-top)) !important;
    left:10px !important;
    right:10px !important;
    width:auto !important;
    transform:none !important;
    z-index:720 !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools{
    position:fixed !important;
    z-index:760 !important;

    left:50% !important;
    right:auto !important;
    top:auto !important;
    bottom:calc(10px + var(--v3-safe-bottom)) !important;

    width:auto !important;
    max-width:calc(100vw - 20px) !important;

    transform:translateX(-50%) !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex-wrap:nowrap !important;

    gap:6px !important;
    padding:6px !important;
    border-radius:22px !important;

    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;

    border:1px solid var(--v3-border) !important;
    background:color-mix(in srgb, var(--v3-surface-strong) 92%, transparent) !important;
    box-shadow:0 16px 42px rgba(0,0,0,.18) !important;
    backdrop-filter:blur(18px) saturate(1.08) !important;
    -webkit-backdrop-filter:blur(18px) saturate(1.08) !important;

    overflow-x:auto !important;
    overflow-y:hidden !important;
    scrollbar-width:none !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools::-webkit-scrollbar{
    display:none !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool{
    width:40px !important;
    min-width:40px !important;
    height:40px !important;
    min-height:40px !important;
    padding:0 !important;
    gap:0 !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:999px !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool span{
    display:none !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--back{
    width:auto !important;
    min-width:82px !important;
    padding:0 12px !important;
    gap:7px !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--back span{
    display:inline !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--reset:not([hidden]){
    width:auto !important;
    min-width:74px !important;
    padding:0 12px !important;
    gap:7px !important;
  }

  body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--reset:not([hidden]) span{
    display:inline !important;
  }
  
  .portal-legal-footer {
      display: none !important;
  }
}

/* Stati attivi modebar */
body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool.is-active,
body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool[aria-pressed="true"]{
  color:#fff !important;
  background:linear-gradient(135deg, var(--v3-blue), var(--v3-green)) !important;
  border-color:transparent !important;
  box-shadow:0 12px 28px color-mix(in srgb, var(--v3-blue) 28%, transparent) !important;
}

body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool.is-active i,
body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool[aria-pressed="true"] i{
  color:#fff !important;
}

body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--back{
  color:#fff !important;
  background:linear-gradient(135deg, var(--v3-blue), var(--v3-green)) !important;
  border-color:transparent !important;
}

body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--reset:not([hidden]){
  color:#fff !important;
  background:linear-gradient(135deg, var(--v3-coral), var(--v3-sand)) !important;
  border-color:transparent !important;
}

body.portal-map-mode .portal-map-modebar.portal-map-tools .portal-map-tool--reset[hidden]{
  display:none !important;
}

/* ---------------------------------------------------------
   Rail categorie attività: visibile in modalità mappa
   Desktop: icona + nome
   Mobile: solo icone
--------------------------------------------------------- */

.portal-map-category-rail{
  display:none !important;
}

body.portal-map-mode .portal-map-category-rail[data-map-activity-rail]{
  position:fixed !important;
  z-index:290 !important;

  left:18px !important;
  top:88px !important;
  //bottom:96px !important;

  width:242px !important;
  max-width:242px !important;

  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;

  padding:11px !important;
  border-radius:28px !important;
  border:1px solid var(--v3-border) !important;

  background:color-mix(in srgb, var(--v3-surface-strong) 94%, transparent) !important;
  box-shadow:0 18px 48px rgba(0,0,0,.22) !important;

  backdrop-filter:blur(18px) saturate(1.08) !important;
  -webkit-backdrop-filter:blur(18px) saturate(1.08) !important;

  opacity:1 !important;
  visibility:visible !important;
  pointer-events:auto !important;
  transform:none !important;
}

.portal-map-category-rail__head{
  min-height:38px;
  padding:0 10px;
  display:flex !important;
  align-items:center;
  gap:9px;
  color:var(--v3-text);
  font-size:.86rem;
  font-weight:950;
}

.portal-map-category-rail__head i{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:13px;
  color:#fff;
  background:linear-gradient(135deg, var(--v3-blue), var(--v3-green));
}

.portal-map-category-rail__list{
  min-height:0 !important;
  display:flex;
  flex-direction:column;
  gap:7px;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:1px 2px 1px 1px;
  scrollbar-width:thin;
}

.portal-map-category-rail__btn{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 10px;
  border-radius:17px;
  border:1px solid color-mix(in srgb, var(--cat-color, var(--v3-blue)) 22%, var(--v3-border));
  color:var(--v3-text);
  background:color-mix(in srgb, var(--v3-surface-strong) 88%, transparent);
  font:inherit;
  font-weight:850;
  text-align:left;
  cursor:pointer;
}

.portal-map-category-rail__btn.is-active,
.portal-map-category-rail__btn[aria-pressed="true"]{
  color:#fff;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--cat-color, var(--v3-blue)) 96%, #111827),
      color-mix(in srgb, var(--cat-color, var(--v3-blue)) 68%, var(--v3-blue))
    );
  border-color:transparent;
}

.portal-map-category-rail__icon{
  width:28px;
  height:28px;
  flex:0 0 28px;
  display:grid;
  place-items:center;
  border-radius:12px;
  color:var(--cat-color, var(--v3-blue));
  background:color-mix(in srgb, var(--cat-color, var(--v3-blue)) 12%, transparent);
}

.portal-map-category-rail__btn.is-active .portal-map-category-rail__icon,
.portal-map-category-rail__btn[aria-pressed="true"] .portal-map-category-rail__icon{
  color:var(--cat-color, var(--v3-blue));
  background:#fff;
}

.portal-map-category-rail__label{
  display:inline !important;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.88rem;
}

.portal-map-category-rail__clear{
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 12px;
  border-radius:999px;
  border:0;
  color:#fff;
  background:linear-gradient(135deg, var(--v3-coral), var(--v3-sand));
  font:inherit;
  font-size:.84rem;
  font-weight:950;
  cursor:pointer;
}

.portal-map-category-rail__clear[hidden]{
  display:none !important;
}

html[data-theme="dark"] body.portal-map-mode .portal-map-category-rail[data-map-activity-rail]{
  background:rgba(18,25,32,.94) !important;
  border-color:rgba(255,255,255,.12) !important;
}

/* Mobile / tablet: rail visibile ma compatto, solo icone */
@media (max-width: 1180px){
  body.portal-map-mode .portal-map-category-rail[data-map-activity-rail]{
    left:8px !important;
    top:132px !important;
    bottom:calc(82px + var(--v3-safe-bottom)) !important;

    width:54px !important;
    max-width:54px !important;

    padding:7px !important;
    border-radius:22px !important;
    gap:7px !important;
  }

  .portal-map-category-rail__head{
    display:none !important;
  }

  .portal-map-category-rail__label{
    display:none !important;
  }

  .portal-map-category-rail__btn{
    width:40px !important;
    height:40px !important;
    min-height:40px !important;
    padding:0 !important;
    justify-content:center !important;
    border-radius:16px !important;
  }

  .portal-map-category-rail__icon{
    width:28px !important;
    height:28px !important;
    flex-basis:28px !important;
    border-radius:11px !important;
  }

  .portal-map-category-rail__clear{
    width:40px !important;
    height:40px !important;
    min-height:40px !important;
    padding:0 !important;
    border-radius:16px !important;
  }

  .portal-map-category-rail__clear span{
    display:none !important;
  }
}

/* Mobile molto stretto */
@media (max-width: 390px){
  body.portal-map-mode .portal-map-category-rail[data-map-activity-rail]{
    left:6px !important;
    top:126px !important;
    width:48px !important;
    max-width:48px !important;
    padding:6px !important;
  }

  .portal-map-category-rail__btn,
  .portal-map-category-rail__clear{
    width:36px !important;
    height:36px !important;
    min-height:36px !important;
    border-radius:14px !important;
  }

  .portal-map-category-rail__icon{
    width:25px !important;
    height:25px !important;
    flex-basis:25px !important;
  }
}

/* ---------------------------------------------------------
   Legal footer: visibile su desktop / schermi larghi
--------------------------------------------------------- */

@media (min-width: 1181px){
  body.portal-map-mode .portal-legal-footer,
  body.portal-map-mode .portal-legal-footer-public,
  body.portal-map-mode .public-legal-footer,
  body.portal-map-mode .legal-footer{
    display:block !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;

    position:fixed !important;
    left:18px !important;
    right:auto !important;
    bottom:18px !important;

    width:min(560px, calc(100vw - 36px)) !important;
    max-width:560px !important;

    z-index:905 !important;

    transform:none !important;

    border-radius:22px !important;
    border:1px solid var(--v3-border) !important;
    background:color-mix(in srgb, var(--v3-surface-strong) 88%, transparent) !important;
    backdrop-filter:blur(18px) saturate(1.1) !important;
    -webkit-backdrop-filter:blur(18px) saturate(1.1) !important;
    box-shadow:0 16px 44px rgba(0,0,0,.16) !important;
  }
}

/* Se pannelli veri sono aperti, il footer può sparire */
@media (min-width: 1181px){
  body.has-filters-open .portal-legal-footer,
  body.has-filters-open .portal-legal-footer-public,
  body.has-filters-open .public-legal-footer,
  body.has-filters-open .legal-footer,
  body.is-portal-drawer-open .portal-legal-footer,
  body.is-portal-drawer-open .portal-legal-footer-public,
  body.is-portal-drawer-open .public-legal-footer,
  body.is-portal-drawer-open .legal-footer,
  body:has(.portal-drawer.is-open) .portal-legal-footer,
  body:has(.portal-drawer.is-open) .portal-legal-footer-public,
  body:has(.portal-drawer.is-open) .public-legal-footer,
  body:has(.portal-drawer.is-open) .legal-footer{
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
}

/* ---------------------------------------------------------
   Mobile: mostra anche today + about dentro la bussola
--------------------------------------------------------- */

@media (max-width: 760px){
  .portal-experience{
    max-height:min(82dvh, 680px) !important;
    overflow:auto !important;
    padding-bottom:12px !important;
  }

  .portal-experience__today{
    display:block !important;
    margin:4px 4px 8px !important;
    padding:12px !important;
    border-radius:22px !important;
  }

  .portal-experience-about{
    display:flex !important;
    margin:4px 4px 8px !important;
    padding:12px !important;
    border-radius:22px !important;
    gap:10px !important;
  }

  .portal-experience-about__icon{
    width:36px !important;
    height:36px !important;
    flex-basis:36px !important;
    border-radius:14px !important;
  }

  .portal-experience-about h2{
    font-size:.98rem !important;
  }

  .portal-experience-about p{
    font-size:.84rem !important;
    line-height:1.35 !important;
  }

  .portal-experience-about__links{
    gap:6px !important;
  }

  .portal-experience-about__links a{
    min-height:28px !important;
    padding:0 9px !important;
    font-size:.76rem !important;
  }
}