/* Accessibilità: pannello e modalità (tema scuro, testo più grande, contrasto alto, colori per daltonici, meno animazioni).
   Le modalità sono attributi su <html> messi da uno script in testa alla pagina: nessun lampo all'apertura. */
.rv-a11y{border:0;border-radius:1.5rem;padding:1.1rem 1.25rem 1.25rem;width:min(26rem,calc(100vw - 1.5rem));background:var(--surface);color:var(--ink);box-shadow:0 30px 80px -20px rgb(0 0 0/.5)}
.rv-a11y::backdrop{background:rgb(8 16 18/.5);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.rv-a11y__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.6rem}
.rv-a11y__head strong{display:inline-flex;align-items:center;gap:.5rem;font-size:1.15rem}
.rv-a11y__row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 0;border-top:1px solid var(--line);font-weight:600}
.rv-a11y__row small{display:block;font-weight:400;color:var(--muted);font-size:.8rem}
.rv-a11y__seg{display:inline-flex;border:1px solid var(--line);border-radius:999px;padding:.2rem;gap:.15rem;flex:none}
.rv-a11y__seg button{display:inline-flex;align-items:center;gap:.3rem;border:0;background:none;color:var(--ink);border-radius:999px;padding:.4rem .75rem;font:inherit;font-weight:600;font-size:.85rem;cursor:pointer;min-height:2.2rem}
.rv-a11y__seg button[aria-pressed=true]{background:var(--ink);color:var(--surface)}
.rv-a11y__switch{cursor:pointer}
.rv-a11y__switch input{appearance:none;-webkit-appearance:none;flex:none;width:3rem;height:1.75rem;border-radius:999px;background:var(--line);position:relative;cursor:pointer;transition:background .2s;margin:0}
.rv-a11y__switch input::after{content:"";position:absolute;top:.2rem;left:.2rem;width:1.35rem;height:1.35rem;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgb(0 0 0/.3);transition:transform .2s}
.rv-a11y__switch input:checked{background:var(--accent)}
.rv-a11y__switch input:checked::after{transform:translateX(1.25rem)}
.rv-a11y__reset{margin-top:.5rem;border:0;background:none;color:var(--muted);font:inherit;font-weight:600;text-decoration:underline;cursor:pointer;padding:.4rem 0}
.rv-sheet__a11y{display:flex;align-items:center;gap:.55rem;width:calc(100% - 2rem);margin:.25rem 1rem .5rem;padding:.7rem .9rem;border:1px solid var(--line);border-radius:1rem;background:none;color:var(--ink);font:inherit;font-weight:600;cursor:pointer}

/* Testo più grande */
html[data-text="1"]{font-size:112.5%}
html[data-text="2"]{font-size:125%}

/* Tema scuro */
html[data-theme=dark]{--surface:#0e1716!important;--paper:#17232a;--c-ink:#eef4f3;--c-ink2:#c9d3d1;--c-muted:#9aa8a5;--c-faint:#6f7d7b;--c-line:#2a393b;color-scheme:dark}
html[data-theme=dark] .rv{--ink:#eef4f3;--ink-2:#c9d3d1;--muted:#9aa8a5;--line:#2a393b;
  --tint:color-mix(in srgb,var(--accent) 16%,#0e1716);--tint-2:color-mix(in srgb,var(--accent) 30%,#0e1716);
  --shadow:0 1px 2px rgb(0 0 0/.4),0 14px 40px -22px rgb(0 0 0/.8);--shadow-lg:0 2px 6px rgb(0 0 0/.4),0 30px 80px -30px rgb(0 0 0/.9);
  --rq-ink:#eef4f3;--rq-muted:#9aa8a5;--rq-line:#2a393b;--rq-tint:color-mix(in srgb,var(--accent) 16%,#0e1716);
  --ex-ink:#eef4f3;--ex-muted:#9aa8a5;--ex-line:#2a393b}
html[data-theme=dark] .rv :is(p,li,dd,small,span)>a:not(.btn):not([class]){color:color-mix(in srgb,var(--accent) 62%,#fff)}

/* Contrasto alto */
html[data-contrast=high] .rv{--ink:#000;--ink-2:#000;--muted:#262626;--line:#595959;--ex-ink:#000;--ex-muted:#262626;--ex-line:#595959;--rq-ink:#000;--rq-muted:#262626;--rq-line:#595959}
html[data-contrast=high][data-theme=dark] .rv{--ink:#fff;--ink-2:#fff;--muted:#e6e6e6;--line:#a6a6a6;--ex-ink:#fff;--ex-muted:#e6e6e6;--ex-line:#a6a6a6;--rq-ink:#fff;--rq-muted:#e6e6e6;--rq-line:#a6a6a6}
html[data-contrast=high] .rv :is(a:not(.btn):not([class]),.rv-link){text-decoration:underline;text-underline-offset:.15em}
html[data-contrast=high] .rv :is(.btn,.rv-icon-btn,input,select,textarea){outline:2px solid currentColor;outline-offset:1px}
html[data-contrast=high] .rv :focus-visible{outline:3px solid var(--ink)!important;outline-offset:3px}
html[data-contrast=high] .rv-hero__shade{background:rgb(0 0 0/.62)!important}

/* Colori per daltonici: blu e arancio distinguibili (palette Okabe-Ito), link sottolineati, niente significato affidato solo al colore */
html[data-cb="1"]{--accent:#0072b2!important;--accent-dark:#005a8c!important;--sun:#e69f00!important}
html[data-cb="1"] .rv :is(.rv-main a:not(.btn):not([class]),.rv-link,.prose a){text-decoration:underline;text-underline-offset:.15em}
html[data-cb="1"] .ex__pt--event circle{stroke:#d55e00;stroke-dasharray:3 2}
html[data-cb="1"] .ex__events{color:#d55e00!important}

/* Meno animazioni */
html[data-motion=reduce] *,html[data-motion=reduce] *::before,html[data-motion=reduce] *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
html[data-motion=reduce] [data-reveal]{opacity:1!important;transform:none!important}

/* Tema scuro: i riquadri che nel tema chiaro hanno il fondo bianco fisso */
html[data-theme=dark] body{background:var(--surface)}
html[data-theme=dark] .rv :is(.chip,.panel,.review,.widget,.badge,.map,.cookie,.wish,.stats__list,.post-card,.ev-arch__year:not([aria-pressed=true]),.dr__tab,.dr__mp-m,.voucher__code,
  .rv-band__row,.rv-ug__all,.fam-loop,.ex__card,.ex__more,.ex__chips button:not(.is-on),.cal__nav,.errors,.xf__errors,.smap__pop,.rv-popup,.rv-sheet,.rv-rsheet,.lang-switch__menu,.rv-nav__panel,.rv-viewsw){
  background:#16221f;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .rv :is(.field,.xf__field,.rq-field__box,.rq-field--small) :is(input,select,textarea){background:#16221f;color:var(--ink);border-color:var(--line)}
html[data-theme=dark] .rv :is(.ex__links a,.rv-exp__tag){background:var(--tint);color:var(--ink)}
html[data-theme=dark] .rv :is(.cal__day.is-busy,.cal__day.is-closed){background:#1d2a2c;color:var(--muted)}
html[data-theme=dark] .rv-footer,html[data-theme=dark] .site-footer{background:#0a1110;color:var(--ink-2)}
html[data-theme=dark] .rv :is(.ex__chips,.rv-tabs){background:color-mix(in srgb,var(--surface) 92%,transparent)}
html[data-theme=dark] .rv .lang-switch__menu a:hover{background:var(--tint)}
html[data-theme=dark] .rv :is(h1,h2,h3,h4,strong,dd,dt,label,p,li,small,figcaption){color:inherit}
html[data-theme=dark] .rv :is(.post-card__meta,.post-card__text,.muted){color:var(--muted)}
html[data-theme=dark] .rv .ex__map{filter:brightness(.92)}
html[data-theme=dark] .rv :is(.ex__chips button.is-on,.rv-viewsw button[aria-pressed=true],.rv-chip.is-active,.ex__chips button.is-on small){color:var(--surface)}
html[data-theme=dark] .rv :is(.ex__n,.post-card__date,.post-card__date strong,.rv-post__tag,.smap__bubble,.smap__controls button,.offer__badge){color:#10201f}
html[data-theme=dark] .rv .ex__card.is-active .ex__n{color:#fff}
.rv-a11y__row{flex-wrap:wrap}
@media(max-width:480px){.rv-a11y__seg button{padding:.4rem .6rem;font-size:.8rem}.rv-a11y__seg .icon{display:none}}

/* Tema scuro, seconda passata: mappe chiare con scritte scure, etichette sopra le foto, stati «fatto», calendario */
html[data-theme=dark] .rv .ex__map{--ex-ink:#10201f}
html[data-theme=dark] .rv :is(.rv-badge,.rv-promo__btn,.rv-promo__badge,.rv-promo__badge *){color:#10201f}
html[data-theme=dark] .rv :is(.dr__hint.is-done,.dr-inline .dr__sum.is-done){background:#12301f;color:#6ee7a0}
html[data-theme=dark] .rv .dr-inline .dr__sum.is-done{background:none}
html[data-theme=dark] .rv .dr__day.is-in span{color:var(--ink)}
html[data-theme=dark] .rv :is(.rq-card,.rq-row):has(input:checked){background:color-mix(in srgb,var(--accent) 16%,#17232a)}
html[data-theme=dark] .rv .ex__media{background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 30%,#17232a),color-mix(in srgb,var(--accent) 12%,#17232a))}
html[data-theme=dark] .rv .smap,html[data-theme=dark] .rv .map img{filter:brightness(.88)}
html[data-theme=dark] .rv :is(.dr__day.is-in,.dr__day.is-start.has-end,.dr__day.is-end)::before{background:color-mix(in srgb,var(--accent) 30%,#17232a)}
html[data-theme=dark] .rv .dr__day.is-in{color:var(--ink)}
/* Pulsanti senza un colore loro (es. le date scelte nei campi): prendono quello del testo, non il nero del browser */
:where(html[data-theme=dark] .rv) :where(button,input,select,textarea){color:inherit}
html[data-theme=dark] .rv .dr-face:not(.is-empty){color:var(--ink)}

/* Contrasto alto: la scritta del «Benvenuti» nero pieno (bianco nel tema scuro) */
html[data-contrast=high] .rv .rv-welcome__word{color:#000}
html[data-contrast=high][data-theme=dark] .rv .rv-welcome__word{color:#fff}
/* Contrasto alto: nei campi che hanno già il riquadro attorno (ricerca, newsletter, contatori della richiesta) il bordo forte va sul riquadro,
   non un secondo quadrato dentro attorno al numero. Il contorno di quando si è sul campo con la tastiera resta */
html[data-contrast=high] .rv :is(.rv-search__field,.rv-band__row,.rq-stepper) :is(input,select){outline:0}
html[data-contrast=high] .rv .rv-search__field{border:2px solid currentColor}
html[data-contrast=high] .rv .rv-band__row{outline:2px solid currentColor;outline-offset:1px}
html[data-contrast=high] .rv .rv-search__field:focus-within{outline:3px solid var(--ink);outline-offset:2px}
html[data-contrast=high] .rv .lang-switch__btn{outline:2px solid currentColor;outline-offset:1px}
