/* =====================================================================
   SKOOB · componenti condivisi su SMARTPHONE (design/MOBILE-REGOLE.md)
   Testata, footer e barra legale, finestre (FAQ, recupero link, assistenza, autori, rimozione dati,
   benvenuto, rinvio link), banner e pulsante cookie, pulsante aiuto e "torna su", messaggi, loader.
   Caricato per ultimo su tutte le pagine pubbliche (skin.php, priorità 1002): qui stanno SOLO le regole
   condivise; la composizione delle singole pagine resta nei CSS di pagina (home, funnel, utente, quiz…).
   Scala: 4/8/12/16/24/32/40/48. Margini laterali: 16 (≤390) / 20 (≤480) / 24 (≤768). Touch ≥ 44px.
   ===================================================================== */
:root{--c-gut:24px;--c-hdr:64px;--c-safe-b:env(safe-area-inset-bottom,0px);--c-fab:48px;--c-fab-gap:16px}
@media(max-width:480px){:root{--c-gut:20px}}
@media(max-width:390px){:root{--c-gut:16px}}

/* ---------------------------------------------------------------------
   1) TESTATA: stessa altezza (64px), logo a sinistra 44×49, strumenti a destra
   --------------------------------------------------------------------- */
@media(max-width:719px){
  /* Logo: stesso ritaglio del PNG ufficiale (84→64px) su home, funnel, pagine di contenuto e 404 */
  html body .skoob-top .skoob-logo--top,
  html body.pg-body .pg-topbar .pg-brand,
  html body .skoob-header .skoob-brand{width:44px!important;height:49px!important;flex:none;margin:0!important}
  html body .skoob-top .skoob-logo--top img,
  html body.pg-body .pg-topbar .pg-brand img.pgn-logo--light{width:64px!important;height:64px!important;left:-10px!important;top:-8px!important}
  html body .skoob-header .skoob-brand{background-size:64px 64px!important;background-position:-10px -8px!important}
  html body .skoob-top .skoob-brand{display:block;flex:none}

  /* Home (testata fissa sopra le slide) */
  html body .skoob-top .skoob-top__in{min-height:var(--c-hdr)!important;padding:7px var(--c-gut) 8px!important;align-items:center!important;gap:8px}
  html body .skoob-top .skoob-top__end{margin-top:0!important;gap:0}

  /* Funnel, contatti, chi siamo */
  html body.pg-body .pg-topbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-height:var(--c-hdr);padding:7px 0 8px!important;margin:0 0 8px!important}
  html body.pg-body .pg-topbar .pg-brand{order:0}
  html body.pg-body .pg-topbar__right{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;padding:0!important;margin-left:auto}
  html body.pg-body .pg-topbar__tools{gap:0}

  /* Pagine di contenuto (privacy, cookie, termini, quiz), 404, rimozione dati */
  html body .skoob-header{padding:0!important;margin:0 0 8px}
  html body .skoob-header .skoob-header__in{min-height:var(--c-hdr);padding-top:7px!important;padding-bottom:8px!important;padding-left:var(--c-gut)!important;padding-right:var(--c-gut)!important;align-items:center!important;gap:8px!important}
  html body .skoob-header .skoob-header__in .skoob-langsq{margin-left:auto!important}

  /* Bandierine: 26×18 a vista, area di tocco 44px in altezza */
  html body .skoob-langsq.skoob-langsq--flags{gap:5px!important}
  html body .skoob-langsq--flags>.skoob-sq,html body .skoob-langsq--flags>button{width:26px!important;height:18px!important;position:relative!important;overflow:visible!important}
  html body .skoob-langsq--flags>.skoob-sq svg,html body .skoob-langsq--flags>button svg{border-radius:3px}

  /* Selettore tema: due pulsanti da 28px nella pillola, filo di separazione più corto */
  html body .themesw button,html body.pg-body .pg-topbar__tools .themesw button,html body .skoob-u-tools .themesw button{width:28px!important;height:28px!important;position:relative}
  html body .themesw button svg{width:14px!important;height:14px!important}
  html body .skoob-header .skoob-u-tools{margin-left:0!important}
  html body.p404-body .skoob-header .skoob-u-tools,html body.skoob-rdc-page .skoob-header .skoob-u-tools{margin-left:auto!important}

  /* "Torna alla home": un solo pulsante tondo da 40px (area 44) su funnel e pagine di contenuto */
  html body.pg-body .pg-topbar .pg-back,
  html body .skoob-header .skoob-doc__back{position:relative;flex:none;display:inline-flex!important;align-items:center!important;justify-content:center!important;width:40px!important;height:40px!important;padding:0!important;margin:0 0 0 10px!important;gap:0!important;font-size:0!important;border:1.5px solid var(--pg-ink)!important;border-radius:50%!important;background:var(--pg-surface)!important;color:var(--pg-ink)!important;box-shadow:none!important;text-decoration:none!important}
  html body.pg-body .pg-topbar .pg-back svg,html body .skoob-header .skoob-doc__back svg{display:block!important;width:18px!important;height:18px!important;color:currentColor!important}
  html body.pg-body .pg-topbar .pg-back span,html body .skoob-header .skoob-doc__back span{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important}
  html body.pg-body .pg-topbar .pg-back::after,html body .skoob-header .skoob-doc__back::after{content:"";position:absolute;inset:-3px}
  html[data-theme="dark"] body.pg-body .pg-topbar .pg-back{background:#27201a!important;border-color:rgba(241,230,211,.4)!important;color:#f1e6d3!important}
}
/* Tablet (720–1023): stessa altezza (80px) e stesso logo 58×64 su tutte le testate; impaginazione di ciascuna invariata */
@media(min-width:720px) and (max-width:1023px){
  html body .skoob-top .skoob-logo--top,html body.pg-body .pg-topbar .pg-brand,html body .skoob-header .skoob-brand{width:58px!important;height:64px!important;margin:0!important}
  html body .skoob-top .skoob-logo--top img,html body.pg-body .pg-topbar .pg-brand img.pgn-logo--light{width:84px!important;height:84px!important;left:-13px!important;top:-10px!important}
  html body .skoob-header .skoob-brand{background-size:84px 84px!important;background-position:-13px -10px!important}
  html body .skoob-top .skoob-top__in{min-height:80px!important;padding-top:8px!important;padding-bottom:8px!important;align-items:center!important}
  html body .skoob-top .skoob-top__end{margin-top:0!important}
  html body.pg-body .pg-topbar{min-height:80px;padding:8px 0!important;align-items:center!important}
  html body.pg-body .pg-topbar__right{gap:4px!important}
  html body .skoob-header{padding:0!important}
  html body .skoob-header .skoob-header__in{min-height:80px;padding-top:8px!important;padding-bottom:8px!important;align-items:center!important}
}


/* Menu amministratore (pulsante tondo + tendina): tutto in adminnav.css */

/* ---------------------------------------------------------------------
   2) FOOTER e BARRA LEGALE (colonna unica fino a 859px)
   --------------------------------------------------------------------- */
@media(max-width:859px){
  html body .skoob-footer{padding-bottom:calc(88px + var(--c-safe-b))!important}
  html body .skoob-footer .skoob-footer__in{padding-left:var(--c-gut)!important;padding-right:var(--c-gut)!important;gap:24px!important}
  html body .skoob-footer .skoob-footer__col{gap:8px!important;justify-items:center;width:100%;justify-self:stretch}
  html body .skoob-footer .skoob-footer__col--right{margin-top:-16px}
  /* Pulsanti del footer: stessa larghezza, icona allineata a sinistra */
  html body .skoob-footer .skoob-fbtn{width:min(100%,320px)!important;min-width:0!important;min-height:52px;justify-content:flex-start!important;box-sizing:border-box;font-size:15px}
  html body .skoob-footer .skoob-footer__bar{padding:0 var(--c-gut)!important;gap:8px!important;margin-top:32px!important}
  /* Link legali: area di tocco 44px, separati da puntino */
  html body .skoob-footer .skoob-legal{gap:0!important;row-gap:0!important;justify-content:center}
  html body .skoob-footer .skoob-legal__b{min-height:44px;padding:0 8px!important;font-size:13px!important;display:inline-flex!important;align-items:center}
  html body .skoob-footer .skoob-legal__b+.skoob-legal__b::before{margin-right:8px!important;margin-left:-8px!important}
  html body .skoob-footer .skoob-copy{font-size:13px!important}
  html body .skoob-footer .skoob-removedata{min-height:44px;padding:0 16px!important;font-size:13px!important;margin-top:4px}
}

/* ---------------------------------------------------------------------
   3) PULSANTI FISSI: aiuto (destra), cookie (sinistra), torna su
   Stessa linea di base (16px + area sicura); nascosti mentre il banner cookie è aperto.
   --------------------------------------------------------------------- */
@media(max-width:1023px){
  html body .help-fab,html body .pg-help-fab,html body .skoob-totop{width:var(--c-fab)!important;height:var(--c-fab)!important;right:var(--c-fab-gap)!important;bottom:calc(var(--c-fab-gap) + var(--c-safe-b))!important}
  html body .help-fab svg,html body .pg-help-fab svg{width:21px!important;height:21px!important}
  html body:not(.skoob-u--quiz) .pp-cookie-badge{width:44px!important;height:44px!important;left:var(--c-fab-gap)!important;bottom:calc(var(--c-fab-gap) + 2px + var(--c-safe-b))!important;opacity:.9}
  html body .pp-cookie-badge svg{width:19px!important;height:19px!important}
  html body:has(#pp-cookie:not([hidden])) .help-fab,
  html body:has(#pp-cookie:not([hidden])) .pg-help-fab,
  html body:has(#pp-cookie:not([hidden])) .skoob-totop{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
}

/* Pannello preferenze del banner: chiuso finché non si tocca "Preferenze" (su alcune pagine restava aperto) */
html body .pp-cookie__prefs[hidden]{display:none!important}
/* Con una finestra aperta il banner cookie si mette da parte (torna alla chiusura): non copre mai il pulsante d'invio */
html body:has(dialog.skoob-modal[open]) .pp-cookie,
html body:has(.skoob-rl__overlay:not([hidden])) .pp-cookie,
html body:has(.skoob-rd__overlay:not([hidden])) .pp-cookie,
html body:has(.skoob-au__overlay:not([hidden])) .pp-cookie,
html body:has(#faqModal:not([hidden])) .pp-cookie,
html body:has(.pg-modal:not([hidden])) .pp-cookie,
html body:has(.skb-benv:not([hidden])) .pp-cookie{display:none!important}

/* ---------------------------------------------------------------------
   4) BANNER COOKIE: compatto, azioni su una riga, mai oltre lo schermo
   --------------------------------------------------------------------- */
@media(max-width:719px){
  html body .pp-cookie{padding:0 8px calc(8px + var(--c-safe-b))!important}
  html body .pp-cookie__card{padding:16px!important;gap:12px!important;border-radius:16px!important;max-height:calc(100dvh - 16px);overflow:auto;overscroll-behavior:contain;box-sizing:border-box}
  html body .pp-cookie__main{min-width:0!important;flex-basis:100%!important}
  html body .pp-cookie__title{font-size:15px!important;margin-bottom:4px!important;line-height:1.3}
  html body .pp-cookie__txt{font-size:13.5px!important;line-height:1.5!important}
  html body .pp-cookie__prefs{padding-top:8px!important;gap:4px!important}
  html body .pp-cookie__row{min-height:40px;font-size:14px!important}
  html body .pp-cookie__row input{width:20px;height:20px}
  /* azioni: vanno a capo da sole (testi lunghi in DE/FR), mai oltre il bordo; "Accetta" prende lo spazio che resta */
  html body .pp-cookie__actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;width:100%!important;margin:0!important}
  html body .pp-cookie__actions .pp-btn{flex:1 1 auto!important;min-width:0;max-width:100%;min-height:44px;padding:8px 14px!important;font-size:14px!important;line-height:1.25;white-space:normal;text-align:center;box-sizing:border-box}
  html body .pp-cookie__actions #pp-accept{flex-grow:3!important}
  html body .pp-cookie__actions .pp-btn[hidden]{display:none!important}
}
@media(min-width:480px) and (max-width:719px){
  html body .pp-cookie__card{max-width:600px}
  html body .pp-cookie__actions{justify-content:flex-end}
  html body .pp-cookie__actions .pp-btn{flex:0 1 auto!important}
}

/* FAQ della home: il corpo della finestra porta anche la classe .skoob-faq, che nel tema è il velo a tutto
   schermo delle FAQ del footer; dentro la finestra resta un normale contenitore (niente velo grigio). */
html body dialog.skoob-modal .skoob-modal__body.skoob-faq{position:static!important;inset:auto!important;z-index:auto!important;display:block!important;background:none!important;backdrop-filter:none!important;animation:none!important;justify-content:normal;align-items:normal}

/* ---------------------------------------------------------------------
   5) FINESTRE: a tutta larghezza dal basso (foglio), scroll interno, chiusura 44px
   --------------------------------------------------------------------- */
@keyframes cSheetUp{from{transform:translateY(24px);opacity:.4}to{transform:none;opacity:1}}
@media(max-width:719px){
  /* contenitori a tutto schermo: il foglio si appoggia in basso */
  html body .skoob-rl__overlay,html body .skoob-rd__overlay,html body .skoob-au__overlay,html body .skoob-faq[role="dialog"],html body .skb-benv,html body .pg-modal{align-items:flex-end!important;justify-content:stretch!important;padding:16px 0 0!important;overflow:hidden!important}
  html body .pg-modal:not([hidden]){display:flex!important;position:fixed;inset:0}
  html body .pg-modal .pg-modal__back{position:absolute;inset:0}

  /* il foglio */
  html body .skoob-rl__modal,html body .skoob-rd__modal,html body .skoob-au__modal,html body .skoob-faq__modal,html body .skb-benv__box,html body .pg-modal__box{
    position:relative;width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important;
    max-height:calc(100dvh - 16px)!important;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    border-radius:20px 20px 0 0!important;border-bottom:0!important;
    padding:24px var(--c-gut) calc(24px + var(--c-safe-b))!important;animation:cSheetUp .22s cubic-bezier(.2,.8,.2,1)}
  html body dialog.skoob-modal{
    width:100%!important;max-width:100%!important;margin:auto 0 0!important;inset:auto 0 0 0!important;top:auto!important;
    max-height:calc(100dvh - 16px)!important;border-radius:20px 20px 0 0!important;border-bottom:0!important;
    overflow:hidden!important;flex-direction:column;animation:cSheetUp .22s cubic-bezier(.2,.8,.2,1)}
  html body dialog.skoob-modal[open]{display:flex!important}
  html body dialog.skoob-modal .skoob-modal__head{padding:20px var(--c-gut) 0!important;gap:12px;flex:none}
  html body dialog.skoob-modal .skoob-modal__title{font-size:clamp(22px,6vw,26px)!important;text-wrap:balance}
  html body dialog.skoob-modal .skoob-modal__body{max-height:none!important;flex:1 1 auto;min-height:0;overflow-y:auto!important;overscroll-behavior:contain;padding:12px var(--c-gut) calc(24px + var(--c-safe-b))!important}

  /* maniglia visiva del foglio */
  html body .skoob-rl__modal::before,html body .skoob-rd__modal::before,html body .skoob-au__modal::before,html body .skoob-faq__modal::before,html body .pg-modal__box::before,html body dialog.skoob-modal::before{content:"";position:absolute;top:8px;left:50%;width:40px;height:4px;margin-left:-20px;border-radius:4px;background:color-mix(in srgb,var(--pg-ink,#1f1a14) 18%,transparent);pointer-events:none}

  /* pulsante di chiusura: 44px */
  html body .skoob-rl__close,html body .skoob-rd__close,html body .skoob-au__close,html body .skoob-faq__close,html body .skb-benv__x,html body .pg-modal__x,html body .skoob-modal__x{width:44px!important;height:44px!important;top:12px!important;right:calc(var(--c-gut) - 8px)!important;border-radius:50%!important}
  html body .skoob-modal__x{position:relative;top:auto!important;right:auto!important;margin-right:-8px}
  html body .skoob-rl__close svg,html body .skoob-rd__close svg,html body .skoob-au__close svg,html body .skoob-faq__close svg,html body .skb-benv__x svg,html body .pg-modal__x svg{width:18px!important;height:18px!important}
  html body .skoob-rl__head,html body .skoob-rd__head,html body .skoob-au__head{margin:4px 48px 16px 0!important;gap:12px!important}
  html body .skoob-rl__title,html body .skoob-rd__title,html body .skoob-au__title,html body .skoob-faq__title,html body .pg-modal__title{font-size:20px!important;line-height:1.2!important;text-wrap:balance}
  html body .skoob-faq__head{padding-right:48px}

  /* testi leggibili */
  html body .skoob-rl__intro,html body .skoob-rd__intro,html body .skoob-au__sub,html body .skoob-faq__intro,html body .pg-modal__lead,html body .skb-benv__p{font-size:15px!important;line-height:1.55!important}
  html body .skoob-au__sub{margin-top:4px!important}
  html body .skoob-rl__note{font-size:13px!important;line-height:1.5}
  html body .skoob-check{font-size:13px!important;line-height:1.5!important;gap:12px!important;align-items:flex-start}
  html body .skoob-check input{width:20px!important;height:20px!important;margin-top:0!important}

  /* campi: 48px, testo 16px (niente zoom automatico su iPhone), sempre a tutta larghezza */
  html body .skoob-rl__form,html body .skoob-rd__form{flex-direction:column!important;flex-wrap:nowrap!important;gap:12px!important}
  html body .skoob-rl__form input,html body .skoob-rd__form input,html body .skoob-au__field input,html body .skoob-au__field select,html body .pg-modal__input,html body dialog.skoob-modal input:not([type=checkbox]):not([type=radio]),html body dialog.skoob-modal select,html body dialog.skoob-modal textarea{
    width:100%!important;max-width:none!important;min-width:0!important;min-height:48px;font-size:16px!important;box-sizing:border-box!important;flex:none!important}
  html body dialog.skoob-modal textarea{min-height:120px}
  html body .skoob-au__grid{grid-template-columns:1fr!important;gap:12px!important}
  html body .skoob-au__form{gap:16px!important}
  html body .skoob-au__field{gap:6px!important}
  html body .skoob-au__field>span,html body .skoob-au__set legend{font-size:13.5px!important}
  html body .skoob-au__opts{gap:8px!important}
  html body .skoob-au__opt span{display:inline-flex!important;align-items:center;min-height:40px;padding:0 14px!important;font-size:14px!important}

  /* azione principale: a tutta larghezza, 48px */
  html body .skoob-rl__form button,html body .skoob-rd__form button,html body .skoob-au__form .skoob-btn--send,html body .pg-modal__box .pg-btn,html body .skb-benv__ok,html body dialog.skoob-modal button[type=submit],html body dialog.skoob-modal .skoob-btn{
    width:100%!important;min-height:48px;justify-content:center;font-size:15px!important}

  /* FAQ (pagine non home): voci con area di tocco piena */
  html body .skoob-faq__q{min-height:48px;padding-top:12px!important;padding-bottom:12px!important;font-size:15px!important}
  html body .skoob-faq__a{font-size:15px!important;line-height:1.6!important}

  /* Benvenuto: centrato dentro il foglio */
  html body .skb-benv__box{text-align:center;padding-top:32px!important}
  html body .skb-benv__note{text-align:left;font-size:14px!important}
}
@media(max-width:719px) and (prefers-reduced-motion:reduce){
  html body .skoob-rl__modal,html body .skoob-rd__modal,html body .skoob-au__modal,html body .skoob-faq__modal,html body .skb-benv__box,html body .pg-modal__box,html body dialog.skoob-modal{animation:none!important}
}
/* Orizzontale basso: il foglio occupa tutta l'altezza disponibile */
@media(max-height:480px) and (max-width:932px){
  html body .skoob-rl__modal,html body .skoob-rd__modal,html body .skoob-au__modal,html body .skoob-faq__modal,html body .skb-benv__box,html body .pg-modal__box{max-height:calc(100dvh - 8px)!important;overflow-y:auto!important}
  html body dialog.skoob-modal{max-height:calc(100dvh - 8px)!important}
  html body .pp-cookie__card{max-height:calc(100dvh - 16px)}
}

/* Modulo di assistenza Pagenus (gate, bonus, contatti): campi 48px/16px, invio a tutta larghezza */
@media(max-width:719px){
  html body .pg-supportform .pg-field input,html body .pg-supportform .pg-field textarea,html body .pg-supportform input:not([type=checkbox]):not([type=radio]),html body .pg-supportform textarea{min-height:48px;font-size:16px!important;box-sizing:border-box}
  html body .pg-supportform textarea{min-height:120px}
  html body .pg-supportform .pg-check{gap:12px;font-size:13.5px;line-height:1.5}
  html body .pg-supportform .pg-check input{width:20px;height:20px;flex:none}
  html body .pg-supportform__row{grid-template-columns:1fr!important;gap:16px}
}
@media(max-width:480px){
  html body .pg-supportform .pg-btn--send{width:100%!important;min-height:48px;justify-content:center}
}

/* ---------------------------------------------------------------------
   6) MESSAGGI di errore / conferma e LOADER
   --------------------------------------------------------------------- */
@media(max-width:719px){
  html body .skoob-rl__err,html body .skoob-rd__err,html body .skoob-au__err,html body .pg-modal__msg,html body .pg-alert,html body .pg-notice,html body .skoob-msg,html body .pg-support__ok,html body .skoob-rl__ok,html body .skoob-rd__ok,html body .skoob-au__ok{font-size:14.5px!important;line-height:1.5!important;overflow-wrap:anywhere}
  html body .skoob-loader__card,html body .pg-loader__card{width:calc(100% - 2 * var(--c-gut))!important;max-width:360px!important;box-sizing:border-box;padding:24px 20px!important}
  html body .skoob-loader__title,html body .pg-loader__title{font-size:18px!important;text-wrap:balance}
  html body .skoob-loader__sub,html body .pg-loader__sub{font-size:14.5px!important}
}

/* Tema scuro delle finestre del tema (recupero link, rimozione dati, autori, FAQ): campi scuri con testo
   chiaro e pulsante d'invio leggibile (prima: campo crema con testo crema, etichetta del pulsante invisibile) */
html[data-theme="dark"] body .skoob-rl__form input,html[data-theme="dark"] body .skoob-rd__form input,
html[data-theme="dark"] body .skoob-au__field input,html[data-theme="dark"] body .skoob-au__field select,html[data-theme="dark"] body .skoob-au__form textarea{
  background:#1c1712!important;color:#f1e6d3!important;border-color:rgba(241,230,211,.28)!important;-webkit-text-fill-color:#f1e6d3}
html[data-theme="dark"] body .skoob-rl__form input::placeholder,html[data-theme="dark"] body .skoob-rd__form input::placeholder,html[data-theme="dark"] body .skoob-au__field input::placeholder{color:rgba(241,230,211,.5)!important;-webkit-text-fill-color:rgba(241,230,211,.5)}
html[data-theme="dark"] body .skoob-au__field select option{background:#1c1712;color:#f1e6d3}
html[data-theme="dark"] body .skoob-rl__form button,html[data-theme="dark"] body .skoob-rd__form button,html[data-theme="dark"] body .skoob-au__form .skoob-btn--send{background:#f1e6d3!important;color:#1c1712!important}
html[data-theme="dark"] body .skoob-au__opt span{color:#e6d9c3!important;border-color:rgba(241,230,211,.28)!important}
html[data-theme="dark"] body .skoob-au__opt input:checked + span{background:#3a3026!important;color:#f1e6d3!important;border-color:#c9b98f!important}

/* GuideMap (/guida/<slug>/): con la scheda del luogo aperta il pulsante cookie si mette da parte
   (non copre "Segna visitato"); torna quando la scheda si chiude */
html body:has(#gm-bottomsheet.open) .pp-cookie-badge{opacity:0!important;visibility:hidden!important;pointer-events:none!important}

/* Numero di build (pgn-version): nascosto sul sito pubblico, resta visibile nelle console di gestione */
html body .pgn-ver{display:none!important}

/* Selettore tema: area di tocco senza cambiare la misura visibile. Il sole si allarga solo a sinistra,
   la luna solo a destra; i vicini (lingue, "Torna alla home") stanno abbastanza lontani da non sovrapporsi. */
html body .themesw button{position:relative!important;overflow:visible!important}
html body .themesw button::after{content:"";position:absolute;top:-10px;bottom:-10px;left:-1px;right:-1px}
html body .themesw button:first-child::after{left:-12px}
html body .themesw button:last-child::after{right:-12px}
/* Le testate non scorrono mai in orizzontale (un'area di tocco al bordo non crea scroll) */
html body .skoob-top,html body .skoob-header{overflow-x:clip}

/* Telefono e tablet: pulsanti tema 28px, area 45×48, distanze che evitano sovrapposizioni */
@media(max-width:1023px){
  html body .themesw button,html body.pg-body .pg-topbar__tools .themesw button,html body .skoob-u-tools .themesw button{width:28px!important;height:28px!important}
  html body .themesw button svg{width:14px!important;height:14px!important}
  html body .themesw button:first-child::after{left:-16px}
  html body .themesw button:last-child::after{right:-16px}
  html body .themesw.themesw-sep{--sep:20px!important;margin-left:20px!important}
  html body .themesw.themesw-sep::before{left:-11px!important}
  html body .skoob-header .skoob-doc__back{margin-left:20px!important}
  html body.pg-body .pg-topbar .pg-back{margin-left:20px!important}
}

/* ---------------------------------------------------------------------
   LINGUA su telefono: una sola bandiera (quella attiva) che apre il menu delle 5 lingue con il nome,
   righe da 44px. Il pulsante e il menu li crea skin.php (script in fondo pagina); prima dello script si
   vede già solo la bandiera attiva. Sulle pagine codice (lingua del codice, non selezionabile) resta solo
   l'indicatore della lingua.
   --------------------------------------------------------------------- */
.c-lang{display:contents}
.c-lang__btn{display:none}
@media(max-width:719px){
  html body :not(.c-lang)>.skoob-langsq--flags:not(.skoob-langsq--show)>:not(.is-active):not([aria-pressed="true"]){display:none!important}
  html body .skoob-langsq--show.skoob-langsq--flags>:not(.is-active){display:none!important}
  html body .skoob-header__in>.c-lang{order:1;margin-left:auto!important}
  html body .c-lang{display:flex;position:relative;flex:none}
  html body .c-lang__btn{display:inline-flex;align-items:center;gap:6px;height:44px;min-width:44px;padding:0 6px;margin:0;border:0;border-radius:10px;background:transparent;color:var(--pg-ink2,#4a4034);cursor:pointer;box-shadow:none}
  html body .c-lang__btn>svg:first-child{width:26px;height:18px;flex:none;border-radius:3px;box-shadow:0 0 0 1px color-mix(in srgb,var(--pg-ink,#1f1a14) 30%,transparent)}
  html body .c-lang__btn .c-lang__chev{width:14px;height:14px;flex:none;transition:transform .2s}
  html body .c-lang.is-open .c-lang__chev{transform:rotate(180deg)}
  html body .c-lang__btn:focus-visible{outline:2px solid var(--pg-accent,#56622a);outline-offset:2px}
  html body .c-lang>.skoob-langsq{display:none!important}
  html body .c-lang.is-open>.skoob-langsq{display:flex!important;flex-direction:column;align-items:stretch;gap:2px!important;position:absolute;top:calc(100% + 4px);right:0;min-width:188px;padding:6px;margin:0!important;background:var(--pg-surface,#fff);border:1px solid var(--pg-line,#e0d3bf);border-radius:14px;box-shadow:0 18px 40px -18px rgba(31,26,20,.45);z-index:80}
  html body .c-lang.is-open>.skoob-langsq--flags>*{display:flex!important;align-items:center;gap:12px;width:auto!important;height:44px!important;padding:0 10px!important;margin:0!important;border:0!important;border-radius:9px!important;background:transparent!important;box-shadow:none!important;transform:none!important;filter:none!important;opacity:1!important;overflow:visible!important;font:600 15px/1 var(--font,system-ui,sans-serif);color:var(--pg-ink,#1f1a14)!important;text-decoration:none!important;cursor:pointer}
  html body .c-lang.is-open>.skoob-langsq--flags>* svg{width:26px!important;height:18px!important;flex:none;border-radius:3px;box-shadow:0 0 0 1px color-mix(in srgb,var(--pg-ink,#1f1a14) 22%,transparent)}
  html body .c-lang.is-open>.skoob-langsq--flags>*::after{content:attr(title)!important;position:static!important;inset:auto!important}
  html body .c-lang.is-open>.skoob-langsq--flags>.is-active,html body .c-lang.is-open>.skoob-langsq--flags>[aria-pressed="true"]{background:var(--pg-tint,#e7e9d2)!important}
  html body .c-lang.is-open>.skoob-langsq--flags>*:hover{background:color-mix(in srgb,var(--pg-ink,#1f1a14) 6%,transparent)!important}
  html[data-theme="dark"] body .c-lang.is-open>.skoob-langsq{background:#27201a;border-color:rgba(241,230,211,.18)}
  html[data-theme="dark"] body .c-lang.is-open>.skoob-langsq--flags>*{color:#f1e6d3!important}
  html[data-theme="dark"] body .c-lang.is-open>.skoob-langsq--flags>.is-active,html[data-theme="dark"] body .c-lang.is-open>.skoob-langsq--flags>[aria-pressed="true"]{background:#3a3026!important}
  html[data-theme="dark"] body .c-lang__btn{color:#e6d9c3}
}
/* Tablet: bandiere 29×20 a vista, area 44×44 affiancata (passo 44px, nessuna sovrapposizione) */
@media(min-width:720px) and (max-width:1023px){
  html body .skoob-langsq.skoob-langsq--flags{gap:16px!important}
  html body .skoob-langsq--flags>.skoob-sq,html body .skoob-langsq--flags>button{position:relative!important;overflow:visible!important}
  html body .skoob-langsq--flags>a.skoob-sq::after,html body .skoob-langsq--flags>button::after{content:"";position:absolute;inset:-13px -8px}
  html body.pg-body .pg-topbar .pg-back{position:relative}
  html body.pg-body .pg-topbar .pg-back::after{content:"";position:absolute;top:0;bottom:-14px;left:-4px;right:-4px}
  html body.pg-body .pg-topbar .themesw button::after{bottom:-6px}
  html body .themesw.themesw-sep{--sep:26px!important;margin-left:26px!important}
  html body .themesw.themesw-sep::before{left:-14px!important}
}

/* Footer da 860 a 1279px: spazio in fondo per il pulsante cookie (non copre più il ©) */
@media(min-width:860px) and (max-width:1279px){html body .skoob-footer{padding-bottom:88px!important}}

/* GuideMap: la landing finisce sopra i pulsanti fissi (il pulsante cookie non copre l'ultima card città) */
html body .gm-pub-body .gm-landing{padding-bottom:max(var(--gm-endpad,0px),calc(88px + env(safe-area-inset-bottom,0px)))!important}

/* Quiz: pulsante cookie a 44px come altrove (la posizione resta quella di quiz.css, sopra la barra) */
@media(max-width:1023px){html body.skoob-u--quiz .pp-cookie-badge{width:44px!important;height:44px!important}}

/* Tablet: pulsanti del banner cookie a 44px */
@media(min-width:720px) and (max-width:1023px){html body .pp-cookie__actions .pp-btn{min-height:44px}}

/* =====================================================================
   LOGO GRANDE IN HOME, SOLO DESKTOP (≥1024px; richiesta utente: "nel vecchio skoob era bello grande").
   156px di altezza su tutte e 5 le slide (testata fissa, stessa posizione); bandiere, tema e admin restano in
   alto a destra. Ritaglio del PNG ufficiale 84:93 (immagine 205px, spostata −32/−25). Le slide partono sotto
   il logo. Tablet, telefono e tutte le altre pagine: misure invariate.
   ===================================================================== */
@media(min-width:1024px){
  html body .skoob-top .skoob-logo--top{width:141px!important;height:156px!important}
  html body .skoob-top .skoob-logo--top img{width:205px!important;height:205px!important;left:-32px!important;top:-25px!important}
  html body.pgn-home-deck .slide{padding-top:196px!important}
}

/* =====================================================================
   FUNNEL (gate e pagina bonus, con o senza token): selettore chiaro/scuro all'estrema sinistra della
   testata, sul margine del contenuto; logo al centro; bandiere (o bandiera attiva) e "Torna alla home"
   restano a destra come prima. Contatti e chi siamo (.skoob-uc) e tutte le altre pagine: invariati.
   ===================================================================== */
html body.pg-body:not(.skoob-uc) .pg-topbar{position:relative}
html body.pg-body:not(.skoob-uc) .pg-topbar .themesw{position:absolute!important;left:0;top:50%;transform:translateY(-50%);margin:0!important;z-index:2}
html body.pg-body:not(.skoob-uc) .pg-topbar .themesw.themesw-sep::before{display:none!important}
/* telefono: logo al centro anche qui (prima era a sinistra), a destra bandiera attiva + "Torna alla home" */
@media(max-width:719px){
  html body.pg-body:not(.skoob-uc) .pg-topbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;align-items:center!important;column-gap:12px!important}
  html body.pg-body:not(.skoob-uc) .pg-topbar .pg-brand{grid-column:2;justify-self:center}
  html body.pg-body:not(.skoob-uc) .pg-topbar__right{grid-column:3;justify-self:end;margin-left:0!important}
}
/* funnel su desktop: sole/luna 28px con area 45×48, "Torna alla home" con area alta 44px */
@media(min-width:1024px){
  html body.pg-body:not(.skoob-uc) .pg-topbar .themesw button{width:28px!important;height:28px!important}
  html body.pg-body:not(.skoob-uc) .pg-topbar .themesw button svg{width:14px!important;height:14px!important}
  html body.pg-body:not(.skoob-uc) .pg-topbar .themesw button:first-child::after{left:-16px}
  html body.pg-body:not(.skoob-uc) .pg-topbar .themesw button:last-child::after{right:-16px}
  html body.pg-body:not(.skoob-uc) .pg-topbar .pg-back{position:relative}
  html body.pg-body:not(.skoob-uc) .pg-topbar .pg-back::after{content:"";position:absolute;top:-7px;bottom:-7px;left:-4px;right:-4px}
}
