:root{
      --top-layer: 116px;
      --bottom-layer: 68px;
      --white: #fff;
      --ink: #fff;
      --dark: #004646;
      --accent: #ffad00;
      --muted: rgba(255,255,255,.58);
    }

    *{box-sizing:border-box}
    html,body{margin:0;width:100%;height:100%;background:#071717;font-family:Arial,Helvetica,sans-serif}
    body{overflow:hidden;color:var(--white)}
    button,a{font:inherit}
    a{color:inherit;text-decoration:none}

    /* DIV1 — logo fisso, trasparente */
    #div1{
      position:fixed;
      inset:0 0 auto 0;
      z-index:100;
      height:var(--top-layer);
      display:flex;
      justify-content:center;
      align-items:center;
      pointer-events:none;
      background:transparent;
    }
    .brand{
      width:min(225px,56vw);
      text-align:center;
      line-height:1;
    }
    #logoMount{
      width:100%;
      height:88px;
      display:flex;
      align-items:center;
      justify-content:center;
    }
    #logoMount svg{width:100%;height:100%;display:block}
    .tagline{
      margin-top:5px;
      font-size:10px;
      font-weight:800;
      letter-spacing:.22em;
      color:#fff;
      text-shadow:0 1px 8px rgba(0,0,0,.55);
    }

    /* contenitore a scatto */
    #snapRoot{
      height:100dvh;
      overflow-y:auto;
      overflow-x:hidden;
      scroll-snap-type:y mandatory;
      overscroll-behavior-y:contain;
      scroll-behavior:smooth;
      scrollbar-width:none;
    }
    #snapRoot::-webkit-scrollbar{display:none}

    .screen{
      position:relative;
      min-height:100dvh;
      height:100dvh;
      scroll-snap-align:start;
      scroll-snap-stop:always;
      overflow:hidden;
      isolation:isolate;
      padding:calc(var(--top-layer) + 12px) 20px calc(var(--bottom-layer) + env(safe-area-inset-bottom) + 16px);
      display:flex;
      flex-direction:column;
      justify-content:center;
      background:#183a3b;
    }
    .screen-bg{
      position:absolute;
      inset:0;
      z-index:-2;
      width:100%;
      height:100%;
      object-fit:cover;
    }

    /* Nessun pannello dietro i testi: solo tipografia */
    .eyebrow{
      margin:0 0 10px;
      font-size:12px;
      font-weight:800;
      letter-spacing:.16em;
      text-transform:uppercase;
    }
    h1,h2,h3,p{margin-top:0}
    .big-title{
      max-width:900px;
      margin-bottom:14px;
      font-size:clamp(34px,10vw,76px);
      line-height:.98;
      letter-spacing:-.04em;
      text-wrap:balance;
    }
    .body-copy{
      max-width:720px;
      margin-bottom:0;
      font-size:clamp(16px,4.6vw,23px);
      line-height:1.46;
      text-wrap:pretty;
    }


    [hidden]{display:none !important}

    /* DIV2 prima del consenso GPS: tinta unita, nessuna immagine provvisoria */
    #div2.gps-gate{
      background:#1f595b;
      color:#fff;
    }
    #div2.gps-ready{
      background:#183a3b;
    }

    /* DIV2 */
    #div2{justify-content:flex-end}
    .gps-instructions{max-width:720px}
    .gps-actions{position:relative;z-index:6;display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
    .plain-btn{
      position:relative;
      z-index:7;
      touch-action:manipulation;
      border:1px solid rgba(255,255,255,.9);
      border-radius:999px;
      padding:12px 18px;
      background:transparent;
      color:#fff;
      font-weight:800;
      cursor:pointer;
    }
    .plain-btn.primary{background:#fff;color:#004646}
    .plain-btn:disabled{opacity:.6;cursor:wait}
    #areaContent[hidden],#gpsContent[hidden]{display:none}


    /* DIV3 — descrizione area + luoghi vicini affiancati */
    #div3{
      justify-content:flex-start;
      background:#fff;
      color:#004646;
      padding-top:calc(var(--top-layer) + 24px);
    }
    .area-story{
      position:relative;
      z-index:2;
      max-width:760px;
      padding-right:4px;
    }
    .area-story-title{
      margin:0 0 14px;
      font-size:clamp(26px,8vw,54px);
      line-height:1;
      letter-spacing:-.035em;
    }
    .area-story-copy{
      margin:0;
      font-size:clamp(16px,4.4vw,22px);
      line-height:1.45;
      color:#174f50;
      text-wrap:pretty;
    }
    .screen-label{
      position:absolute;
      z-index:4;
      left:18px;
      top:calc(var(--top-layer) + 8px);
      font-size:11px;
      font-weight:900;
      letter-spacing:.15em;
      text-transform:uppercase;
      text-shadow:0 2px 12px rgba(0,0,0,.65);
    }

    /* DIV4 meteo */
    #div4{background:#64d1d4;color:#003f40}
    .weather-list{
      display:grid;
      grid-template-columns:1fr;
      gap:0;
      width:100%;
      max-width:760px;
      margin:auto 0;
    }
    .weather-slot{
      min-height:20vh;
      display:grid;
      grid-template-columns:80px 1fr auto;
      align-items:center;
      gap:14px;
      border-bottom:1px solid rgba(0,63,64,.22);
    }
    .weather-slot:last-child{border-bottom:0}
    .weather-icon{width:64px;height:64px;object-fit:contain}
    .weather-time{font-weight:900;font-size:clamp(20px,7vw,34px)}
    .weather-humidity{margin-top:5px;font-size:14px;font-weight:700}
    .weather-temp{font-size:clamp(34px,11vw,62px);font-weight:900}
    .weather-error{font-size:19px;font-weight:800}
    .weather-advice{
      margin:18px 0 0;
      max-width:760px;
      font-size:clamp(16px,4.5vw,22px);
      line-height:1.4;
      font-weight:800;
    }

    /* DIV5 eventi */
    #div5{justify-content:flex-end;background:#bf6b35}
    .full-link::after{content:"";position:absolute;inset:0}
    .action-word{
      display:inline-block;
      margin-top:22px;
      padding-bottom:4px;
      border-bottom:2px solid currentColor;
      font-weight:900;
      letter-spacing:.05em;
    }

    /* DIV6 carosello */
    #div6{padding-left:0;padding-right:0;background:#111}
    .carousel{
      position:absolute;
      inset:0;
      display:flex;
      overflow-x:auto;
      scroll-snap-type:x mandatory;
      scrollbar-width:none;
    }
    .carousel::-webkit-scrollbar{display:none}
    .carousel-slide{
      position:relative;
      min-width:100%;
      height:100%;
      scroll-snap-align:start;
      overflow:hidden;
    }
    .carousel-slide img{
      width:100%;
      height:100%;
      object-fit:cover;
    }
    .carousel-title{
      position:absolute;
      left:22px;
      right:22px;
      bottom:calc(var(--bottom-layer) + env(safe-area-inset-bottom) + 55px);
      font-size:clamp(35px,11vw,68px);
      font-weight:900;
      line-height:.98;
      text-shadow:0 2px 18px rgba(0,0,0,.65);
    }
    .carousel-indicators{
      position:absolute;
      z-index:5;
      left:22px;
      right:22px;
      bottom:calc(var(--bottom-layer) + env(safe-area-inset-bottom) + 22px);
      display:grid;
      grid-template-columns:repeat(var(--slides,2),1fr);
      gap:8px;
    }
    .indicator{
      height:3px;
      border:0;
      border-radius:999px;
      background:rgba(255,255,255,.35);
      padding:0;
    }
    .indicator.active{background:#fff}

    /* DIV7 */
    #div7{justify-content:flex-end;background:#9d2760}
    /* DIV8 */
    #div8{justify-content:flex-end;background:#004646}

    /* DIV9 — menu fisso, gruppo sempre centrato */
    #div9{
      position:fixed;
      z-index:110;
      left:0;right:0;bottom:0;
      min-height:var(--bottom-layer);
      padding-bottom:env(safe-area-inset-bottom);
      background:#fff;
      color:#004646;
      display:flex;
      justify-content:center;
      align-items:center;
      box-shadow:0 -6px 22px rgba(0,0,0,.13);
    }
    .nav-btn{
      flex:0 0 clamp(82px,24vw,112px);
      min-height:var(--bottom-layer);
      border:0;
      background:transparent;
      color:#004646;
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:center;
      gap:3px;
      cursor:pointer;
      font-size:10px;
      font-weight:800;
    }
    .nav-btn[hidden]{display:none !important}
    .nav-btn svg{width:25px;height:25px;stroke:currentColor;fill:none;stroke-width:2}
    .nav-btn.active{color:#ff9500}

    .loading{
      position:absolute;
      inset:0;
      display:grid;
      place-items:center;
      padding:25px;
      text-align:center;
      font-weight:800;
      background:#183a3b;
    }
    .loading[hidden]{display:none}

    
    /* DIV2: immagini dell’area con dissolvenza */
    .area-backgrounds{
      position:absolute;
      inset:0;
      z-index:-2;
      overflow:hidden;
      pointer-events:none;
    }
    .area-bg{
      position:absolute;
      inset:0;
      width:100%;
      height:100%;
      object-fit:cover;
      opacity:0;
      transition:opacity 1.2s ease;
    }
    .area-bg.is-visible{opacity:1}
    @media (prefers-reduced-motion: reduce){
      .area-bg{transition:none}
    }
@media (min-width:768px){
      :root{--top-layer:132px;--bottom-layer:74px}
      .screen{padding-left:6vw;padding-right:6vw}
      .weather-list{grid-template-columns:repeat(3,1fr);gap:24px}
      .weather-slot{
        min-height:44vh;
        display:flex;
        flex-direction:column;
        justify-content:center;
        text-align:center;
        border-bottom:0;
        border-right:1px solid rgba(0,63,64,.22);
      }
      .weather-slot:last-child{border-right:0}
    }

    @media (min-width:1100px){
      .screen{padding-left:10vw;padding-right:10vw}
    }

/* Traduzione: richiamo visivo fino alla prima attivazione */
#translateBtn.translation-attention { animation: lgTranslatePulse 1.7s ease-in-out infinite; }
@keyframes lgTranslatePulse {
  0%,100% { color:#004646; }
  50% { color:#d85c5c; }
}
@media (prefers-reduced-motion: reduce) {
  #translateBtn.translation-attention { animation:none; color:#d85c5c; }
}
#google_translate_element,
.goog-te-banner-frame,
.goog-te-gadget { position:absolute!important; width:1px!important; height:1px!important; overflow:hidden!important; opacity:0!important; pointer-events:none!important; }
body { top:0!important; }
.skiptranslate iframe { display:none!important; }
