/* Webapp ospite · direzione «Riviera». I colori arrivano da :root, generato per struttura (src/Theme.php):
   --primary --accent --highlight --fresh e le varianti on-*, -soft, -text. Qui solo forme, spazi e caratteri. */
:root {
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 22px;
  --r-sm: 14px;
  --gutter: 18px;
  --nav-h: 66px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --open: #138a63;
  --soon: #b86e00;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ico { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 15px; height: 15px; vertical-align: -2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.screen { padding-bottom: calc(var(--nav-h) + 34px + env(safe-area-inset-bottom, 0px)); }
.screen.nonav { padding-bottom: 32px; }
.pad { padding-inline: var(--gutter); }

/* ---------- Testata (home e accesso) ---------- */
.hero { position: relative; padding: calc(22px + env(safe-area-inset-top, 0px)) var(--gutter) 92px; color: var(--on-hero); overflow: hidden;
  background: linear-gradient(170deg, var(--hero-from) 0%, var(--accent) 48%, var(--hero-to) 100%); }
.hero.photo { background: var(--primary) center / cover no-repeat; }
/* Più scura in cima: sotto la notch ora e batteria (bianche) si leggono anche su un cielo chiaro. */
.hero.photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.42) 0, rgba(0,0,0,.18) calc(env(safe-area-inset-top, 0px) + 70px), rgba(0,0,0,.55) 100%); }
.hero.photo { color: #fff; }
.hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -2px; height: 70px; background: var(--bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.hero .sun { position: absolute; right: -34px; top: 26px; width: 140px; height: 140px; border-radius: 50%; background: var(--highlight); opacity: .92; }
.hero.photo .sun { display: none; }
.hero-top { position: relative; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; min-width: 0; }
.brand img { height: 36px; width: auto; max-width: 140px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,.9); padding: 3px 6px; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-text { position: relative; z-index: 1; display: grid; gap: 6px; margin-top: 22px; }
.hero-text small { font-weight: 700; font-size: 13px; opacity: .92; }
.hero-text h1 { margin: 0; font: 800 clamp(30px, 8.6vw, 40px)/1.02 var(--display); letter-spacing: -.01em; text-wrap: balance; max-width: 13ch; }
.wx { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }

/* Selettore della lingua come quello del kiosk: pillola con globo e codice, menu con i nomi nativi. */
.langs { position: relative; flex: none; }
.langbtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px 0 10px; border-radius: 999px; font-size: 14px; font-weight: 800; letter-spacing: .04em;
  background: rgba(255,255,255,.22); border: 1.5px solid rgba(255,255,255,.55); color: inherit; }
.hero:not(.photo) .langbtn { background: rgba(255,255,255,.28); }
.langbtn .ico { width: 18px; height: 18px; }
.langbtn .ic-s { width: 15px; height: 15px; opacity: .8; transition: transform .15s; }
.langs.open .langbtn .ic-s { transform: rotate(180deg); }
.langbtn:focus-visible { outline: 2.5px solid var(--surface); outline-offset: 2px; }
.langmenu { position: fixed; z-index: 60; min-width: 220px; padding: 6px; display: grid; gap: 2px;
  background: var(--surface); color: var(--ink); border-radius: 16px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.45); border: 1px solid var(--line); }
.langmenu button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border-radius: 11px; font-size: 16px; font-weight: 600; }
.langmenu button .ico { width: 18px; height: 18px; color: var(--muted); }
.langmenu button .code { margin-left: auto; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--muted); }
.langmenu button.on { background: var(--accent); color: var(--on-accent); }
.langmenu button.on .ico, .langmenu button.on .code { color: inherit; opacity: .85; }
.langmenu button:focus-visible { outline: 2.5px solid var(--accent); outline-offset: -2px; }

/* ---------- Card e righe ---------- */
.card { background: var(--surface); border-radius: var(--r); border: 1px solid var(--line); }
.sec { display: grid; gap: 10px; margin-top: 24px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sec-h h2 { margin: 0; font: 800 20px/1.1 var(--display); }
.sec-h a, .linkbtn { all: unset; cursor: pointer; color: var(--accent-text); font-size: 14px; font-weight: 700; white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; padding: 13px 14px; text-decoration: none; }
.row + .row { border-top: 1px solid var(--line); }
.row .tx { flex: 1; min-width: 0; }
.row .tx b { display: block; font-weight: 600; }
.row .tx span { display: block; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.tile-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st.on { color: var(--open); }
.st.off { color: var(--muted); }
.st.soon { color: var(--soon); }

/* ---------- Soggiorno ---------- */
.stay { margin: -62px var(--gutter) 0; position: relative; z-index: 2; padding: 16px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; border: 0; box-shadow: 0 16px 32px -20px rgba(0,0,0,.45); }
.stay .room { width: 82px; height: 82px; border-radius: 20px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; align-content: center; text-align: center; padding: 4px; }
.stay .room small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.stay .room b { font: 800 30px/1 var(--display); overflow-wrap: anywhere; }
.stay .info { display: grid; gap: 5px; min-width: 0; }
.stay .info b { font: 800 18px/1.15 var(--display); }
.stay .info span { font-size: 14px; color: var(--muted); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--fresh-soft); color: var(--fresh-text); }
.pill.hl { background: var(--highlight-soft); color: var(--ink); }
.welcome { margin: 18px var(--gutter) 0; color: var(--muted); font-size: 15px; }

/* ---------- Prossima attività ---------- */
.next { padding: 16px; background: var(--primary); color: var(--on-primary); border: 0; display: grid; gap: 4px; position: relative; overflow: hidden; text-decoration: none; cursor: pointer; }
.next small { color: var(--highlight); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.next b { font: 800 22px/1.1 var(--display); padding-right: 90px; }
.next span { opacity: .82; font-size: 14px; }
.next .age { position: absolute; right: 14px; top: 14px; font-size: 12px; font-weight: 800; background: var(--highlight); color: var(--on-highlight); padding: 4px 10px; border-radius: 999px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next.later { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.next.later small { color: var(--accent-text); }

/* ---------- Accessi rapidi ---------- */
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick a, .quick button { all: unset; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 15px 13px; border-radius: 20px; font-weight: 700; font-size: 15px; line-height: 1.15; overflow-wrap: anywhere; min-height: 24px; }
.quick > :nth-child(4n+1) { background: var(--highlight); color: var(--on-highlight); }
.quick > :nth-child(4n+2) { background: var(--fresh); color: var(--on-fresh); }
.quick > :nth-child(4n+3) { background: var(--accent-soft); color: var(--ink); }
.quick > :nth-child(4n+4) { background: var(--primary-soft); color: var(--ink); }
.quick a:focus-visible, .quick button:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; }

/* ---------- Eventi ---------- */
.hscroll { display: flex; gap: 12px; overflow-x: auto; padding: 0 var(--gutter) 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { flex: none; width: min(72vw, 260px); scroll-snap-align: start; }
.ev { overflow: hidden; display: grid; text-decoration: none; }
.ev-img { height: 120px; position: relative; background: var(--cat, var(--accent)) center / cover no-repeat; }
.ev-img .when { position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; }
.ev-img .flag { position: absolute; right: 10px; top: 10px; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--highlight); color: var(--on-highlight); text-transform: uppercase; letter-spacing: .04em; }
.ev-body { padding: 11px 14px 14px; display: grid; gap: 3px; }
.ev-body small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.ev-body b { font: 700 17px/1.2 var(--display); }
.ev-body span { font-size: 13.5px; color: var(--muted); }
.ev.cancelled .ev-body b { text-decoration: line-through; }
.day-h { margin: 8px 2px 0; font: 800 15px/1.2 var(--display); text-transform: capitalize; color: var(--muted); }
.ev-list { display: grid; gap: 12px; }
.hint-ph { margin: 2px 2px 0; font-size: 13.5px; color: var(--muted); }
/* Credito di OpenStreetMap (licenza ODbL) quando gli orari delle farmacie vengono da lì. */
.hint-ph.osm { font-size: 12px; }
.hint-ph.osm a { color: inherit; }

/* ---------- Barra in alto delle pagine interne (fissa, altezza costante) ---------- */
/* Sotto la notch 20 px in più: su iOS 26 la sfocatura sotto la barra di stato copre l'inizio della pagina
   (min(): solo sui telefoni che hanno la notch, altrove nessun margine). */
.appbar { position: sticky; top: 0; z-index: 8; background: var(--bg); padding-top: calc(env(safe-area-inset-top, 0px) + min(env(safe-area-inset-top, 0px), 20px)); border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; }
.appbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 20px -18px rgba(0,0,0,.5); }
.appbar-row { display: flex; align-items: center; gap: 10px; padding: 12px var(--gutter) 8px; min-height: 52px; }
.appbar-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.appbar-t small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-t h1 { margin: 0; font: 800 24px/1.1 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-act { display: flex; gap: 8px; align-items: center; flex: none; }
.appbar-tools { display: grid; gap: 8px; padding-bottom: 10px; }
.appbar .days button { width: 46px; padding: 6px 0; border-radius: 14px; }
.appbar .days button b { font-size: 17px; }
.chiprow { display: flex; gap: 6px; overflow-x: auto; padding: 0 var(--gutter); scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.chiprow button { all: unset; cursor: pointer; flex: none; font-size: 14px; font-weight: 700; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
.chiprow button em { font-style: normal; font-weight: 600; opacity: .6; margin-left: 2px; }
.chiprow button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.chiprow button:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 1px; }
.chiprow .sep { flex: none; width: 1px; background: var(--line); margin: 4px 2px; }
.seg { display: flex; padding: 3px; border-radius: 999px; background: var(--primary-soft); justify-self: start; margin-top: 4px; }
.seg button { all: unset; cursor: pointer; font: 800 16px/1 var(--display); padding: 9px 16px; border-radius: 999px; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.barbtn { all: unset; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); }
.barbtn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.barbtn:focus-visible, .seg button:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.search { position: relative; display: flex; align-items: center; gap: 8px; }
.search .ico { position: absolute; margin-left: 12px; color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px 0 36px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font: 500 16px var(--body); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--accent); }
.results { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; font-size: 14px; color: var(--muted); font-weight: 600; }
.install { display: flex; gap: 12px; align-items: center; padding: 12px 10px 12px 14px; margin-top: 18px; }
.install > .ico { color: var(--accent-text); width: 28px; height: 28px; }
.install .tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.install .tx span { font-size: 13.5px; color: var(--muted); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.xbtn { all: unset; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); flex: none; }
.xbtn:focus-visible { outline: 2.5px solid var(--accent); }

/* ---------- I miei piani e «Adesso» ---------- */
.fav { all: unset; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--muted); flex: none; }
.fav .ico { width: 18px; height: 18px; }
.fav.on { background: var(--accent-soft); color: var(--accent-text); }
.fav.on .ico { fill: currentColor; }
.fav:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.fav.on-img { position: absolute; right: 10px; bottom: 10px; background: rgba(255,255,255,.92); color: var(--ink); }
.fav.on-img.on { color: var(--accent-text); }
.fav.round { width: 42px; height: 42px; background: rgba(255,255,255,.92); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.evd-bar.solid .fav.round { box-shadow: none; background: var(--primary-soft); }
.evd-bar.solid .fav.round.on { background: var(--accent-soft); }
.tl-i .box { position: relative; }
.tl-i .box .fav { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; }
.tl-i .box b { padding-right: 34px; }
.pad-tl { padding: 0 0 10px; }
.now-plans { display: grid; gap: 2px; padding: 12px 14px; background: var(--highlight-soft); border: 0; border-radius: var(--r); }
.now-plans > small { display: flex; gap: 6px; align-items: center; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.now-plans .ico.sm { fill: currentColor; }
.plan { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; text-decoration: none; }
.plan + .plan { border-top: 1px solid rgba(0,0,0,.06); }
.plan time { font: 800 15px var(--display); }
.plan b { display: block; font-weight: 700; }
.plan small { display: block; font-size: 13px; color: var(--muted); }
.plan em { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--accent-text); white-space: nowrap; }
.sec-h .links { display: flex; gap: 14px; }
.empty.small { padding: 12px 14px; text-align: left; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
#app > main .sec > .card + .card, .sec > .next + .card, .sec > .now-plans + .card, .sec > .empty + .card { margin-top: 0; }

/* ---------- Pagine interne ---------- */
.page-h { padding: calc(24px + env(safe-area-inset-top, 0px)) var(--gutter) 4px; display: grid; gap: 4px; }
.page-h small { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.page-h h1 { margin: 0; font: 800 30px/1.04 var(--display); text-wrap: balance; }
.days { display: flex; gap: 6px; overflow-x: auto; padding: 0 var(--gutter) 2px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.days button { all: unset; cursor: pointer; flex: none; width: 50px; padding: 8px 0; border-radius: 16px; text-align: center; display: grid; gap: 1px; border: 1px solid var(--line); background: var(--surface); }
.days button small { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.days button b { font: 800 19px/1.1 var(--display); }
.days button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.days button[aria-pressed="true"] small { color: inherit; opacity: .85; }
.filters { display: flex; gap: 6px; padding: 0 var(--gutter); flex-wrap: wrap; }
.filters button { all: unset; cursor: pointer; font-size: 13.5px; font-weight: 700; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.filters button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

.tl { display: grid; padding: 0 var(--gutter); }
.tl-i { display: grid; grid-template-columns: 50px 14px minmax(0, 1fr); gap: 0 10px; }
.tl-i time { font: 800 16px/1 var(--display); padding-top: 18px; font-variant-numeric: tabular-nums; }
.tl-i .rail { position: relative; }
.tl-i .rail::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-i .rail::after { content: ""; position: absolute; left: 2px; top: 21px; width: 10px; height: 10px; border-radius: 50%; background: var(--cat); box-shadow: 0 0 0 3px var(--bg); }
.tl-i .box { background: var(--surface); border-radius: 16px; padding: 10px 12px; margin: 5px 0; border: 1px solid var(--line); border-left: 5px solid var(--cat); display: grid; gap: 2px; }
.tl-i .box b { font-weight: 700; }
.tl-i .box span { font-size: 14px; color: var(--muted); }
.tl-i .box p { margin: 4px 0 0; font-size: 14px; }
.tl-i .tag { display: flex; gap: 8px; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cat-text, var(--cat)); }
.tl-i .tag em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--muted); }
.tl-i.st-past { opacity: .5; }
.tl-i.st-now .box { box-shadow: 0 0 0 2px var(--cat); }
.tl-now { display: grid; grid-template-columns: 50px 14px 1fr; gap: 0 10px; align-items: center; margin: 2px 0; }
.tl-now span { font-size: 11px; font-weight: 800; color: var(--accent-text); letter-spacing: .06em; }
.tl-now i { grid-column: 2 / 4; height: 2px; background: var(--accent); position: relative; }
.tl-now i::before { content: ""; position: absolute; left: 2px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.cat-animazione { --cat: var(--accent); --cat-text: var(--accent-text); }
.cat-miniclub { --cat: var(--highlight); --cat-text: var(--highlight-text); }
.cat-sport { --cat: var(--fresh); --cat-text: var(--fresh-text); }
.cat-sera { --cat: var(--primary); --cat-text: var(--ink); }

.it + .it { border-top: 1px solid var(--line); }
.row .tx .st { display: inline-flex; margin: 2px 0 1px; }
.info-body { padding: 0 14px 14px 68px; margin-top: -6px; font-size: 14px; color: var(--muted); white-space: pre-line; }
.hours-today { font-size: 13.5px; color: var(--muted); }
.wifi { display: grid; gap: 6px; padding: 14px; }
.wifi .kv { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.wifi code { font: 600 16px ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; }
.copy { all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; color: var(--accent-text); padding: 6px 4px; }

.pharm { display: flex; gap: 12px; align-items: center; padding: 13px 14px; }
.pharm + .pharm { border-top: 1px solid var(--line); }
.pharm .cross { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: #2e9e5b; color: #fff; flex: none; }
.pharm.duty .cross { background: #2f7de1; }
.pharm.closed .cross { background: #9aa8b3; }
.pharm .km { font: 800 20px/1 var(--display); text-align: right; }
.pharm .km small { display: block; font: 600 11px var(--body); color: var(--muted); margin-top: 2px; }
.forecast { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; }
.forecast > div { padding: 12px 4px; display: grid; gap: 4px; justify-items: center; font-size: 13px; }
.forecast > div + div { border-left: 1px solid var(--line); }
.forecast b { font-weight: 700; }
.forecast .ico { color: var(--accent-text); }

.empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 15px; }
.note { margin: 18px var(--gutter) 0; font-size: 12.5px; color: var(--muted); }
.stale { margin: 10px var(--gutter) 0; padding: 10px 12px; border-radius: 12px; background: var(--highlight-soft); font-size: 13.5px; }

/* ---------- Dettaglio evento ---------- */
.evd { position: relative; }
.evd-hero { position: relative; height: 260px; overflow: hidden; background: var(--primary); }
.evd-hero.noimg { height: 150px; background: linear-gradient(170deg, var(--hero-from), var(--accent) 48%, var(--hero-to)); }
.evd-blur { position: absolute; inset: -30px; background: center / cover no-repeat; filter: blur(26px) brightness(.6); }
.evd-hero img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.evd-credit { position: absolute; right: 10px; bottom: 10px; max-width: 70%; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Barra del dettaglio: fuori da <main> (niente animazione d'ingresso), larga come l'app. */
.evd-bar { position: fixed; top: 0; left: 0; right: 0; max-width: 560px; margin: 0 auto; z-index: 9; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px) + min(env(safe-area-inset-top, 0px), 20px)) 12px 10px; border-bottom: 1px solid transparent; transition: background-color .2s, box-shadow .2s, border-color .2s; }
.evd-bar.solid { background: var(--surface); border-bottom-color: var(--line); box-shadow: 0 8px 20px -14px rgba(0,0,0,.45); }
.evd-bar.solid .roundbtn { background: var(--primary-soft); box-shadow: none; }
.evd-bar-title { all: unset; cursor: pointer; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .2s; }
.evd-bar.solid .evd-bar-title { opacity: 1; transform: none; pointer-events: auto; }
.evd-bar-title img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.evd-bar-title span { font: 800 16px/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evd-bar-title:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .evd-bar, .evd-bar-title { transition: none; } }
.roundbtn { all: unset; cursor: pointer; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--ink); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.roundbtn:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.evd-head { display: grid; gap: 6px; margin-top: 16px; }
.evd-kind { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.evd-kind small { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.evd-kind .flag { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--highlight); color: var(--on-highlight); text-transform: uppercase; letter-spacing: .04em; }
.evd-head h1 { margin: 0; font: 800 clamp(26px, 7.4vw, 32px)/1.08 var(--display); text-wrap: balance; }
.evd-sub { display: block; font-size: 14px; color: var(--muted); margin-top: 3px; font-weight: 400; }
.evd-sub.inline { display: inline; }
.evd-sub.warn { color: #9b2c1f; font-weight: 600; }
.evd-facts { margin: 0; padding: 4px 14px; }
.evd-facts > div { padding: 11px 0; display: grid; gap: 3px; }
.evd-facts > div + div { border-top: 1px solid var(--line); }
.evd-facts dt { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.evd-facts dd { margin: 0; font-size: 15.5px; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips > span:not(.chips-more), .chips-more > span { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); }
.chips-more { display: contents; }
.more-dates { display: inline-block; margin-top: 8px; font-size: 14px; }
.evd-badges { margin-top: 12px; }
.evd-note { padding: 14px 16px; border-radius: var(--r-sm); background: var(--accent-soft); border-left: 4px solid var(--accent); }
.evd-note b { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.evd-note p { margin: 6px 0 0; }
.evd-summary { margin: 0; font-size: 16px; line-height: 1.55; }
.evd-list { margin: 0; padding: 6px 16px 6px 32px; display: grid; gap: 0; }
.evd-list li { padding: 8px 0; font-size: 15px; line-height: 1.45; }
.evd-list li + li { border-top: 1px solid var(--line); }
.evd-links { display: grid; gap: 10px; }
.evd-links .btn { width: 100%; box-sizing: border-box; }
.linkrow { all: unset; cursor: pointer; box-sizing: border-box; display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); font-weight: 700; }
.linkrow span { flex: 1; }
.linkrow .ico:first-child { color: var(--accent-text); }
.linkrow:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* ---------- Accesso ---------- */
.login-hero { padding-bottom: 76px; }
.login-hero h1 { max-width: 14ch; }
.login { display: grid; gap: 16px; padding: 4px var(--gutter) 0; }
.login p { margin: 0; color: var(--muted); }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field input { font: 500 18px var(--body); height: 54px; padding: 0 15px; border-radius: 15px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); width: 100%; }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.btn { all: unset; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 56px; padding: 0 20px; border-radius: 16px; font-weight: 800; font-size: 18.5px; background: var(--accent); color: var(--on-accent); text-align: center; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.err { margin: 0; padding: 11px 13px; border-radius: 12px; background: #fdeceb; color: #9b2c1f; font-size: 14.5px; font-weight: 600; }
.help { font-size: 14px; color: var(--muted); }
.help a { color: var(--accent-text); font-weight: 700; }

/* ---------- Navigazione ---------- */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: min(540px, calc(100% - 20px)); height: var(--nav-h); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: 24px; background: var(--primary); color: var(--on-primary); z-index: 10; box-shadow: 0 12px 30px -14px rgba(0,0,0,.5); }
.nav button { all: unset; cursor: pointer; display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11.5px; font-weight: 700; opacity: .66; }
.nav button[aria-current="page"] { opacity: 1; color: var(--highlight); }
.nav button:focus-visible { outline: 2px solid var(--highlight); outline-offset: -5px; border-radius: 18px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top, 0px) + min(env(safe-area-inset-top, 0px), 20px)) var(--gutter) 0; }
.iconbtn { all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--muted); padding: 8px 2px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 20; }

@media (prefers-reduced-motion: no-preference) {
  .screen > * { animation: rise .42s var(--ease) both; }
  .screen > *:nth-child(2) { animation-delay: .03s; } .screen > *:nth-child(3) { animation-delay: .06s; } .screen > *:nth-child(4) { animation-delay: .09s; } .screen > *:nth-child(5) { animation-delay: .12s; }
  @keyframes rise { from { transform: translateY(10px); opacity: .001; } to { transform: none; opacity: 1; } }
}
@media (min-width: 600px) {
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--bg); }
  body { background: var(--primary-soft); }
}

/* ---------- Servizi: schede luogo (ristoranti, bar, spa, piscina) ---------- */
.v-list { display: grid; gap: 16px; margin-top: 16px; }
.venue { overflow: hidden; }
.v-img { position: relative; display: flex; align-items: flex-end; min-height: 168px; padding: 14px 16px; text-decoration: none; color: #fff;
  background: radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--highlight) 55%, transparent), transparent 55%), linear-gradient(160deg, var(--tint, var(--accent)), color-mix(in srgb, var(--tint, var(--accent)) 55%, #000)); }
.v-img.photo { background: var(--primary) center / cover no-repeat; }
.v-img.photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.62)); }
.v-title { position: relative; display: grid; gap: 2px; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.v-title b { font: 800 23px/1.1 var(--display); text-wrap: balance; }
.v-title span { font-size: 14px; font-weight: 600; opacity: .92; }
.v-badge { position: absolute; top: 12px; left: 12px; font-size: 12.5px; font-weight: 800; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--muted); }
.v-badge::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.v-badge.on { color: var(--open); }
.v-badge.soon { color: var(--soon); }
.v-badge.inline { position: static; justify-self: start; background: var(--primary-soft); }
.v-slots { padding: 6px 16px; }
.v-hours { padding: 4px 16px; }
.v-slot { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 15px; }
.v-slot + .v-slot { border-top: 1px solid var(--line); }
.v-slot > .ico { color: var(--accent-text); width: 20px; height: 20px; }
.v-slot > span { flex: 1; min-width: 0; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); }
.v-slot > span b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.okpill { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--open) 14%, transparent); color: var(--open); flex: none; }
.v-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 16px 14px; }
.v-foot .linkbtn { margin-left: auto; }
.btn-o { all: unset; cursor: pointer; display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--primary); font-weight: 800; font-size: 14.5px; text-decoration: none; }
.btn-o:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

.v-hero { height: 280px; }
.v-hero.noimg { height: 190px; background: radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--highlight) 55%, transparent), transparent 55%), linear-gradient(160deg, var(--tint, var(--accent)), color-mix(in srgb, var(--tint, var(--accent)) 55%, #000)); }
.v-car { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.v-car::-webkit-scrollbar { display: none; }
.v-car img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.v-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.v-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); }
.v-dots i.on { background: #fff; width: 18px; border-radius: 4px; }
.venue-d .evd-head .v-badge { margin-top: 4px; }
.venue-d.has-cta { padding-bottom: calc(var(--nav-h) + 110px + env(safe-area-inset-bottom, 0px)); }
.cta-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom, 0px)); width: min(540px, calc(100% - 20px)); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 8px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 28px -14px rgba(0,0,0,.45); z-index: 9; }
.cta-bar .btn { min-height: 48px; font-size: 16px; border-radius: 14px; padding: 0 12px; }
.btn.alt { background: var(--primary-soft); color: var(--ink); }
.btn.full { display: flex; width: 100%; box-sizing: border-box; margin-top: 14px; }

/* Pannello dal basso (menu, prenotazione) */
#sheet { position: fixed; inset: 0; z-index: 50; }
.sheet-dim { position: absolute; inset: 0; background: rgba(10,20,30,.45); animation: fade .2s ease; }
.sheet { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: 84vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 24px 24px 0 0; padding: 8px 0 calc(16px + env(safe-area-inset-bottom, 0px)); animation: up .26s var(--ease); }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 4px; }
.sheet-h { display: flex; align-items: center; gap: 10px; padding: 6px 12px 8px var(--gutter); border-bottom: 1px solid var(--line); }
.sheet-h b { flex: 1; min-width: 0; font: 800 19px/1.2 var(--display); }
.sheet-b { overflow-y: auto; padding: 6px var(--gutter) 4px; overscroll-behavior: contain; }
.menu-i { display: grid; gap: 2px; padding: 11px 0; }
.menu-i + .menu-i { border-top: 1px solid var(--line); }
.menu-i b { font-weight: 700; }
.menu-i span { font-size: 14px; color: var(--muted); }
.sheet-p { margin: 12px 0 0; line-height: 1.5; }
body.sheet-open { overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translate(-50%, 40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-dim { animation: none; } }
.v-mark { position: absolute; right: -14px; bottom: -22px; color: #fff; opacity: .16; pointer-events: none; }
.v-mark .ico { width: 150px; height: 150px; stroke-width: 1.2; }
.v-hero .v-mark { right: 8px; bottom: -10px; }

/* ---------- Il tuo soggiorno ---------- */
.stay.arriving { grid-template-columns: auto 1fr auto; text-decoration: none; color: inherit; }
.stay.arriving .room { background: var(--accent-soft); color: var(--accent-text); }
.stay.arriving .room .ico { width: 34px; height: 34px; }
.stay.arriving.ready .room { background: color-mix(in srgb, var(--open) 14%, var(--surface)); color: var(--open); }
.stay.arriving > .ico { color: var(--muted); }
.stay-page .appbar + .pad, .stay-page > .pad:first-child { margin-top: 6px; }
.roomcard { position: relative; overflow: hidden; border-radius: var(--r); padding: 18px; background: var(--primary); color: var(--on-primary); }
.roomcard::after { content: ""; position: absolute; right: -44px; top: -44px; width: 160px; height: 160px; border-radius: 50%; background: var(--highlight); opacity: .92; }
.roomcard > * { position: relative; z-index: 1; }
.rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rc-top small, .rc-dates small { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.rc-num { display: block; font: 800 52px/1 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.rc-type { display: block; font-weight: 600; opacity: .92; margin-top: 2px; }
.rc-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; padding: 5px 11px; border-radius: 999px; background: var(--surface); color: var(--open); white-space: nowrap; }
.rc-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.rc-dates { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 18px; }
.rc-dates > div:last-child { text-align: right; }
.rc-dates b { font: 800 18px/1.15 var(--display); }
.rc-dates .ico { opacity: .6; }
.rc-prog { margin-top: 14px; }
.rc-prog .track { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--on-primary) 22%, transparent); overflow: hidden; }
.rc-prog .track i { display: block; height: 100%; background: var(--highlight); border-radius: 3px; }
.rc-prog p { margin: 7px 0 0; display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 600; }
.arr { border-radius: var(--r); padding: 20px 18px; color: var(--on-primary); background: linear-gradient(160deg, var(--primary), color-mix(in srgb, var(--primary) 70%, var(--fresh))); }
.arr.ready { background: linear-gradient(160deg, var(--open), color-mix(in srgb, var(--open) 70%, var(--fresh))); }
.arr small { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .82; }
.arr h2 { margin: 6px 0 6px; font: 800 25px/1.12 var(--display); text-wrap: balance; }
.arr p { margin: 0; font-size: 15px; opacity: .94; }
.arr .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.arr .steps i { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--on-primary) 25%, transparent); }
.arr .steps i.on { background: var(--highlight); }
.arr.ready .steps i.on { background: var(--on-primary); }
.arr .stl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; font-size: 11.5px; font-weight: 700; opacity: .88; }
.pulse { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--highlight); margin-right: 8px; vertical-align: 3px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 116px; }
.act b { font-weight: 800; font-size: 15.5px; line-height: 1.2; }
.act > span:last-child, .act .tx span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.act.wide { grid-template-columns: auto 1fr auto; align-items: center; min-height: 0; background: var(--highlight-soft); border-color: transparent; }
.act.wide .tx { display: grid; gap: 2px; }
.act.wide > .ico { color: var(--muted); }
.act:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.tile-ico.hl { background: var(--highlight-soft); color: var(--highlight-text); }
.act.wide .tile-ico.hl { background: var(--highlight); color: var(--on-highlight); }
.tile-ico.pr { background: var(--primary-soft); color: var(--primary); }
.tile-ico.fr { background: var(--fresh-soft); color: var(--fresh-text); }
.row .tx span.code { display: inline; font-variant-numeric: tabular-nums; letter-spacing: .02em; font-weight: 700; color: var(--ink); }
.acts > .act:only-child { grid-column: 1 / -1; min-height: 0; }

/* Messaggi: chat ioChat a tutto schermo */
button.act { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; box-sizing: border-box; }
#chatview { position: fixed; left: 0; right: 0; top: 0; height: 100%; z-index: 60; display: flex; flex-direction: column; background: var(--bg); max-width: 560px; margin: 0 auto; }
.chat-h { display: flex; align-items: center; gap: 12px; padding: calc(10px + env(safe-area-inset-top, 0px) + min(env(safe-area-inset-top, 0px), 20px)) var(--gutter) 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat-h .roundbtn { background: var(--primary-soft); box-shadow: none; }
.chat-h b { display: grid; font: 800 18px/1.2 var(--display); }
.chat-h small { font: 600 12.5px/1.3 var(--body); color: var(--muted); }
#chatview iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }
body.chat-open { overflow: hidden; }

/* Barra di stato (notch) nell'app installata su iPhone: colore della testata in home, quello dello sfondo nelle altre
   pagine (come la barra in alto). Su iOS 26 il testo della barra (ora, batteria) si adatta al colore che ha sotto. */
#notch { position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 80; pointer-events: none; }
body[data-bar="home"] #notch { background: var(--hero-from); }
body[data-bar="photo"] #notch { background: transparent; }

/* Wi-Fi: codice QR e credenziali nel pannello dal basso. Il QR resta nero su bianco: è quello che i lettori leggono meglio. */
.wifi-qr { display: grid; place-items: center; padding: 10px 0 4px; }
.wifi-qr .qr { width: min(240px, 70vw); height: auto; border-radius: 12px; border: 1px solid var(--line); }
.wifi-hint { text-align: center; color: var(--muted); font-size: 14px; }
.wifi-box { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.wifi-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; }
.wifi-row + .wifi-row { border-top: 1px solid var(--line); }
.wifi-row > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.wifi-row small { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wifi-row b { font: 600 17px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.wifi-how { font-size: 13.5px; color: var(--muted); }

/* ---------- Dintorni: fila dei giorni con il meteo (come il kiosk), agenda di un giorno, filtri nel pannello ---------- */
.barbtn { position: relative; }
.barbtn .badge { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.nb-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px var(--gutter) 10px; scrollbar-width: none; scroll-padding-inline: var(--gutter); }
.nb-days::-webkit-scrollbar { display: none; }
.nb-day { all: unset; cursor: pointer; flex: none; width: 78px; box-sizing: border-box; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 8px 10px 9px;
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "wd wd" "dn wx" "n n"; column-gap: 6px; row-gap: 1px; align-items: center; }
.nb-day .wd { grid-area: wd; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-day .dn { grid-area: dn; font: 800 26px/1 var(--display); }
.nb-day .wx { grid-area: wx; display: grid; justify-items: start; font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.05; }
.nb-day .wx .ico { width: 19px; height: 19px; }
.nb-day .n { grid-area: n; font-size: 11.5px; font-weight: 800; color: var(--accent-text); margin-top: 3px; white-space: nowrap; }
.nb-day[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.nb-day[aria-pressed="true"] .wd, .nb-day[aria-pressed="true"] .wx { color: var(--on-primary); opacity: .85; }
.nb-day[aria-pressed="true"] .n { color: var(--highlight); }
.nb-day.none:not([aria-pressed="true"]) { opacity: .55; }
.nb-day:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.wx-line { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; }
.wx-line > .ico { color: var(--accent-text); }
.wx-line b { font-weight: 800; }
.wx-line.wet { background: var(--highlight-soft); border-color: transparent; }
.nb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--muted); font-weight: 700; }
.nb-head > span::first-letter { text-transform: uppercase; }
.nb-head .linkbtn { display: inline-flex; align-items: center; gap: 2px; }
/* Filtri attivi su una sola riga che scorre in orizzontale (con più categorie scelte non occupano mezza pagina). */
.nb-active { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.nb-active::-webkit-scrollbar { display: none; }
.nb-active button { all: unset; flex: none; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; padding: 5px 8px 5px 11px; border-radius: 999px; background: var(--primary); color: var(--on-primary); }
.band { font: 800 12.5px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.agenda { display: grid; gap: 8px; }
.ev-row { position: relative; }
.ev-row > a { display: grid; grid-template-columns: 72px 1fr minmax(34px, auto); gap: 12px; align-items: start; padding: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.ev-row time { font: 800 16px/1.1 var(--display); text-align: right; padding: 2px 2px 0 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-row .tx { min-width: 0; display: grid; gap: 2px; align-self: center; }
.ev-row .tx small { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-row .tx b { font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-row .tx > span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-row .tags { display: flex; gap: 4px; margin-top: 3px; }
.ev-row .tags i { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--fresh-soft); color: var(--fresh-text); }
.ev-row .tags i.k { background: var(--highlight-soft); color: var(--highlight-text); }
/* Stato (Esaurito, Annullato, Rinviato): badge prima degli altri, così la categoria resta sempre al suo posto. */
.ev-row .tags i.st { background: var(--accent-soft); color: var(--accent-text); }
.ev-row .thumb { width: 72px; height: 72px; border-radius: 12px; background: var(--primary-soft) center / cover no-repeat; }
.ev-row.cancelled .tx b { text-decoration: line-through; }
.fav.on-row { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; }
.fav.on-row.on { color: var(--accent-text); background: var(--accent-soft); }
.nb-filters h4 { margin: 16px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nb-filters .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.nb-filters .chips button { all: unset; cursor: pointer; font-size: 14px; font-weight: 700; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); }
.nb-filters .chips button em { font-style: normal; opacity: .6; margin-left: 3px; }
.nb-filters .chips button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.nb-filters .chips button:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.sheet-foot { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 0 4px; margin-top: 14px; background: var(--surface); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; min-height: 50px; font-size: 16.5px; }
.sheet-foot .btn.alt { flex: 0 0 auto; }

/* Wi-Fi in Info utili: una riga sola che apre il pannello con rete, password e codice QR. */
.row.wifi-btn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 12px; align-items: center; width: 100%; padding: 13px 14px; }
.row.wifi-btn > .ico { color: var(--muted); }
.row.wifi-btn:focus-visible { outline: 2.5px solid var(--accent); outline-offset: -2px; border-radius: var(--r); }

/* Card della camera in home: si tocca e apre «Il tuo soggiorno». */
.stay.linked { grid-template-columns: auto 1fr auto; text-decoration: none; color: inherit; }
.stay.linked > .ico { color: var(--muted); }
.stay.linked:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* WhatsApp come nei pulsanti «Chatta su WhatsApp»: verde del marchio, testo e logo bianchi. */
:root { --whatsapp: #25d366; --on-whatsapp: #ffffff; }
.quick a.wa, .copy.wa { background: var(--whatsapp); color: var(--on-whatsapp); font-weight: 800; }
.quick a.wa .ico, .copy.wa .ico { stroke: none; fill: currentColor; }
.copy.wa { padding: 6px 11px; border-radius: 999px; }

/* Home: «Cosa ti serve?» in versione icone compatte (scelta nel backoffice), quattro per riga con l'etichetta sotto. */
.quick.icons { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick.icons > :nth-child(n) { flex-direction: column; justify-content: flex-start; gap: 7px; padding: 4px 2px; background: transparent; color: var(--ink); font-size: 12.5px; font-weight: 700; text-align: center; border-radius: 16px; }
.quick.icons > :nth-child(n) > .ico { box-sizing: content-box; width: 24px; height: 24px; padding: 15px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--accent-text); }
.quick.icons > a.wa > .ico { background: var(--whatsapp, #25d366); border-color: transparent; color: #fff; }
/* Home: «Nei dintorni» come riga sola verso la pagina. */
.nb-line { display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-decoration: none; color: inherit; }
.nb-line .tx { flex: 1; min-width: 0; display: grid; gap: 1px; }
.nb-line .tx b { font-weight: 700; }
.nb-line .tx span { font-size: 14px; color: var(--muted); }
.nb-line > .ico { color: var(--muted); }

/* ---------- Programma «Adesso e poi» ---------- */
.wk-btn { width: auto; padding: 0 12px 0 10px; border-radius: 999px; gap: 6px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 800; height: 40px; }
.wk-btn .ico { width: 18px; height: 18px; }
.pg-hero { display: grid; gap: 10px; margin-top: 14px; }
.pg-list { display: grid; gap: 8px; }
.pg-it { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 12px 12px 12px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--cat, var(--accent)); }
.pg-it time { font: 800 16px/1.1 var(--display); text-align: center; }
.pg-it time small { display: block; font: 600 11px var(--body); color: var(--muted); margin-top: 2px; }
.pg-it .tx { min-width: 0; display: grid; gap: 2px; }
.pg-it .tx small { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cat-text, var(--accent-text)); }
.pg-it .tx b { font-weight: 700; line-height: 1.25; }
.pg-it .tx > span { font-size: 13px; color: var(--muted); }
.pg-it .age { justify-self: start; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--highlight-soft); color: var(--highlight-text) !important; margin-top: 2px; }
.pg-it.past { opacity: .55; grid-template-columns: 52px 1fr; }
.pg-past { all: unset; box-sizing: border-box; cursor: pointer; display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--line); font-size: 14px; font-weight: 700; color: var(--muted); }
.pg-past:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
/* Vista settimana: numero di attività grande e la serata in evidenza */
.wk-list { display: grid; gap: 10px; margin-top: 14px; }
.wk-day { all: unset; box-sizing: border-box; cursor: pointer; display: block; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.wk-day.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.wk-day:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.wk-h { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.wk-h .d { display: grid; justify-items: center; width: 44px; flex: none; }
.wk-h .d small { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wk-h .d b { font: 800 24px/1 var(--display); }
.wk-h .mid { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.wk-n { font: 800 30px/1 var(--display); color: var(--accent-text); }
.wk-h .mid > span { font-size: 14px; font-weight: 700; color: var(--muted); }
.wk-h .wx { display: grid; justify-items: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.wk-h > .ico { color: var(--muted); }
/* Serata in evidenza: fascia chiara color Evidenza, così non si confonde con la barra di navigazione (Principale). */
.wk-night { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--highlight-soft); color: var(--ink); border-top: 1px solid var(--line); }
.wk-night > .ico { color: var(--highlight-text); }
.wk-night small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--highlight-text); }
.wk-night b { display: block; font: 800 17px/1.2 var(--display); }
.wk-night > span { flex: 1; min-width: 0; }
.wk-night time { font: 800 15px var(--display); }

/* Adesso e poi: in corso e prossima con la card di «Adesso» della home; il cuore in basso a destra. */
.pg-now { cursor: default; padding-bottom: 18px; }
.pg-now .fav { position: absolute; right: 12px; bottom: 12px; background: color-mix(in srgb, var(--on-primary) 16%, transparent); color: var(--on-primary); }
.pg-now .fav.on { background: var(--on-primary); color: var(--accent-text); }

/* Foto alla misura giusta (vedi pic() in guest.js): compaiono intere, con una breve dissolvenza, quando sono arrivate.
   Finché non arrivano (o se non arrivano) resta il fondo colorato del contenitore: niente foto disegnata a metà. */
img.pic { opacity: 0; transition: opacity .35s ease; }
img.pic.ok { opacity: 1; }
img.pic.seen { transition: none; }
img.pic.ko { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { img.pic { transition: none; } }
.ev-img > .pic, .v-img > .pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-row .thumb { overflow: hidden; }
.ev-row .thumb > .pic { display: block; width: 100%; height: 100%; object-fit: cover; }
.v-img.photo::before { z-index: 1; }
.v-img .v-badge, .v-img .v-title { z-index: 2; }
