/* 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; }
.hero.photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.55)); }
.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); }

/* ---------- Barra in alto delle pagine interne (fissa, altezza costante) ---------- */
.appbar { position: sticky; top: 0; z-index: 8; background: var(--bg); padding-top: env(safe-area-inset-top, 0px); 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: 10px 12px; background: var(--highlight-soft); border-color: transparent; }
.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 .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)) 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)) 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; }
