:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --ink: #15171c;
  --ink-2: #5d6370;
  --ink-3: #9197a3;
  --line: #e6e8ec;
  --soft: #f6f7f9;
  --accent: #e8412c;
  --accent-soft: #fdece9;
  --blue: #1f6feb;
  --ok: #188038;
  --danger: #c5221f;
  --r: 16px;
  --sh-1: 0 1px 2px rgba(21,23,28,.06), 0 1px 1px rgba(21,23,28,.04);
  --sh-2: 0 10px 30px -12px rgba(21,23,28,.25), 0 2px 6px rgba(21,23,28,.06);
  --t0: #6b7280; --t1: #d93025; --t2: #ea6a0c; --t3: #c28a00; --t4: #7a4b2e; --t5: #1f6feb; --t6: #8b3fd9; --t7: #d0247a; --t8: #1e8a4c; --t9: #8e1b3a; --t10: #0e9f9a; --t11: #7c9a16;
  --hdr: 72px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1, h2, h3, .logo, .lcount { font-family: var(--font-d); letter-spacing: -0.01em; }

/* ---------- bottoni ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: .92rem; border: 1px solid transparent; background: none; white-space: nowrap; text-decoration: none; line-height: 1.2; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn.solid { background: var(--ink); color: #fff; }
.btn.solid:hover { background: #2a2d35; }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: #cfd3da; }
.btn.light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); }
.btn.danger { background: none; color: var(--danger); border-color: #f1c4c2; }
.btn.sm { padding: 6px 12px; font-size: .84rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link { border: 0; background: none; color: var(--blue); font-weight: 600; padding: 4px; font-size: .88rem; }
.x { border: 0; background: var(--soft); width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; line-height: 1; color: var(--ink-2); flex: none; }
.x:hover { background: var(--line); }
.grow { flex: 1; }
.mob { display: none; }

/* ---------- header ---------- */
.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; height: var(--hdr); display: flex; align-items: center; gap: 20px; padding: 0 20px; background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.28rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); display: grid; place-items: center; box-shadow: 0 4px 12px -2px rgba(232,65,44,.5); }
.logo-pin::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.omni { flex: 1; max-width: 760px; margin: 0 auto; display: flex; align-items: center; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 6px; transition: box-shadow .2s, background .2s; }
.omni:focus-within { background: var(--surface); box-shadow: 0 0 0 4px rgba(31,111,235,.12); border-color: #bcd2f7; }
.omni-modes { display: flex; gap: 2px; flex: none; }
.mode { border: 0; background: none; border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: .88rem; color: var(--ink-2); white-space: nowrap; }
.mode.on { background: var(--ink); color: #fff; }
#mode-ai.on { background: linear-gradient(120deg, #6d3fe0, #e8412c); }
.omni-box { flex: 1; display: flex; align-items: center; min-width: 0; }
.omni-box input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 8px 10px; font-size: 16px; }
.citybox { flex: 1; min-width: 0; }
.citybox gmp-place-autocomplete, .citybox gmp-placeautocomplete, .searchbox gmp-place-autocomplete, .searchbox gmp-placeautocomplete { width: 100%; color-scheme: light; }
.go { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 1rem; }
.hdr-r { display: flex; align-items: center; gap: 8px; flex: none; }
.who img { width: 32px; height: 32px; border-radius: 50%; display: block; border: 2px solid var(--surface); box-shadow: var(--sh-1); }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 290px minmax(0, 1fr) 390px; height: calc(100vh - var(--hdr) - env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--hdr) - env(safe-area-inset-top, 0px)); }
.side, .listcol { overflow-y: auto; background: var(--surface); }
.side { border-right: 1px solid var(--line); padding: 18px 18px 28px; }
.listcol { border-left: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.mapcol { display: flex; flex-direction: column; gap: 10px; padding: 14px; min-width: 0; }

/* ---------- filtri ---------- */
.side-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.side-head h2 { margin: 0; font-size: 1.25rem; flex: 1; }
.fsec { padding: 14px 0; border-top: 1px solid var(--line); }
.fsec:first-of-type { border-top: 0; padding-top: 4px; }
.flabel { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 8px 6px; font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.seg.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: none; padding: 0; }
.seg.cats .catbtn { color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px; text-align: left; transition: border-color .15s, background .15s; }
.seg.cats .catbtn:hover { border-color: #c9ced6; }
.seg.cats .catbtn .cb-ic { font-size: 1.35rem; line-height: 1; margin-bottom: 6px; }
.seg.cats .catbtn .cb-t { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.seg.cats .catbtn .cb-n { font-size: .78rem; color: var(--ink-3); }
.seg.cats .catbtn.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.seg.cats .catbtn.on .cb-n { color: rgba(255,255,255,.7); }
.tipolist { display: flex; flex-direction: column; gap: 2px; }
.tipo { display: flex; align-items: center; gap: 10px; border: 0; background: none; border-radius: 10px; padding: 7px 8px; text-align: left; width: 100%; font-size: .93rem; }
.tipo:hover { background: var(--soft); }
.tipo .ti { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 1rem; background: color-mix(in srgb, var(--c) 13%, #fff); flex: none; }
.tipo .tn { flex: 1; }
.tipo .tc { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tipo .tk { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid #cdd1d8; flex: none; display: grid; place-items: center; font-size: 12px; color: #fff; }
.tipo.on { background: color-mix(in srgb, var(--c) 9%, #fff); }
.tipo.on .tn { font-weight: 600; }
.tipo.on .tk { background: var(--c); border-color: var(--c); }
.tipo.on .tk::after { content: "✓"; }
.nearbtn { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px dashed #c9ced6; background: var(--soft); border-radius: 12px; padding: 11px 12px; font-weight: 600; text-align: left; }
.nearbtn:hover { border-color: var(--blue); color: var(--blue); }
.nb-ic { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: .9rem; }
.origin { margin-top: 8px; display: flex; align-items: center; gap: 6px; background: #eaf1fe; color: #174ea6; border-radius: 10px; padding: 6px 6px 6px 12px; font-size: .88rem; font-weight: 600; }
.origin span { flex: 1; }
.origin button { border: 0; background: none; width: 26px; height: 26px; border-radius: 50%; color: inherit; font-size: 1.1rem; }
.rangebox { display: block; margin-top: 12px; font-size: .88rem; color: var(--ink-2); }
.rangebox input { width: 100%; accent-color: var(--ink); margin-top: 6px; }
.more summary { cursor: pointer; list-style: none; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "▾"; font-size: .9rem; }
.more:not([open]) summary::after { content: "▸"; }
.more[open] summary { margin-bottom: 10px; }
.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.fld > span { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.fld input, .fld select, .fld textarea { width: 100%; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: 16px; }
.fld textarea { min-height: 72px; resize: vertical; }
.fld select, .mini-sel { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235d6370'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.fld.private textarea { background: #fff8e6; border-color: #f6dea0; }
.tog { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); cursor: pointer; }
.tog input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.hint { font-size: .82rem; color: var(--ink-2); line-height: 1.4; }
.hint:empty { display: none; }
#near-msg { margin-top: 8px; }

/* ---------- mappa ---------- */
.maptools { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.aichip { display: flex; align-items: center; gap: 6px; background: linear-gradient(120deg, #efe8ff, #fdece9); color: #4a2aa8; border-radius: 999px; padding: 5px 6px 5px 12px; font-size: .86rem; font-weight: 600; }
.aichip button { border: 0; background: rgba(255,255,255,.7); width: 24px; height: 24px; border-radius: 50%; color: inherit; }
.map { position: relative; flex: 1; min-height: 320px; border-radius: 22px; overflow: hidden; background: #e8eaed; box-shadow: var(--sh-2); }
#gmap { position: absolute; inset: 0; }
.gpin { position: relative; width: 34px; height: 42px; cursor: pointer; transition: transform .15s; transform-origin: 50% 100%; }
.gpin .ph { position: absolute; left: 4px; top: 1px; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.28); display: grid; place-items: center; }
.gpin .pi { transform: rotate(45deg); font-size: 13px; line-height: 1; }
.gpin:hover, .gpin.hot { transform: scale(1.18); }
.gpin.sel { transform: scale(1.35); }
.gpin.dim { opacity: .35; }
.clu { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 700 13px var(--font); box-shadow: 0 0 0 5px rgba(21,23,28,.15), 0 4px 10px rgba(0,0,0,.25); }
.medot { width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(31,111,235,.2), 0 1px 4px rgba(0,0,0,.35); }
.origdot { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--blue); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.tmpdot { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent); background: rgba(232,65,44,.2); }
.pickbar { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 5; display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 6px 6px 16px; box-shadow: var(--sh-2); font-size: .9rem; font-weight: 600; max-width: calc(100% - 20px); }
.card { position: absolute; left: 14px; bottom: 14px; z-index: 5; width: min(380px, calc(100% - 28px)); background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: var(--sh-2); }
.card .x { position: absolute; top: 10px; right: 10px; }
.card-top { display: flex; gap: 12px; align-items: flex-start; padding-right: 34px; }
.card-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem; background: color-mix(in srgb, var(--c) 14%, #fff); flex: none; }
.card h3 { margin: 0; font-size: 1.15rem; line-height: 1.2; }
.card .meta { font-size: .85rem; color: var(--ink-2); margin-top: 3px; }
.card p { margin: 12px 0 0; font-size: .92rem; }
.card p:empty { display: none; }
.priv, .privnote { background: #fff8e6; border-radius: 10px; padding: 8px 10px; font-size: .86rem; margin-top: 10px; color: #6b4e00; }
.card .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- elenco ---------- */
.lhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); flex: none; }
.lcount { font-size: 1.2rem; font-weight: 700; }
.lsub { font-size: .8rem; color: var(--ink-3); }
.lsub:empty { display: none; }
.aichip + .grow + #vme, .aichip:not([hidden]) ~ #vall { }
.mini-sel { border: 1px solid var(--line); background-color: var(--soft); border-radius: 999px; padding: 7px 30px 7px 12px; font-size: .84rem; font-weight: 600; }
.list { overflow-y: auto; padding: 6px 10px 24px; flex: 1; }
.gtitle { position: sticky; top: 0; z-index: 1; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 12px 8px 6px; }
.item { display: flex; gap: 12px; padding: 12px 10px; border-radius: 14px; cursor: pointer; transition: background .12s; position: relative; }
.item:hover, .item.hot { background: var(--soft); }
.item.sel { background: color-mix(in srgb, var(--c) 8%, #fff); box-shadow: inset 3px 0 0 var(--c); }
.i-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.3rem; background: color-mix(in srgb, var(--c) 13%, #fff); flex: none; }
.i-body { flex: 1; min-width: 0; }
.i-top { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.i-name { font-weight: 700; font-size: .98rem; line-height: 1.25; overflow-wrap: anywhere; }
.i-dist { flex: none; font-size: .8rem; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.i-meta { font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.i-meta b { font-weight: 600; color: var(--c); }
.i-note { font-size: .86rem; margin-top: 5px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item.sel .i-note { -webkit-line-clamp: unset; }
.i-acts { display: none; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.item.sel .i-acts { display: flex; }
.item .privnote { display: none; }
.item.sel .privnote { display: block; }
.empty { text-align: center; padding: 50px 20px; color: var(--ink-2); }
.empty b { display: block; font-size: 1.05rem; color: var(--ink); margin-bottom: 4px; }

/* ---------- AI ---------- */
.ai { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #f6f1ff, #fff 70%); display: flex; flex-direction: column; max-height: 62%; flex: none; }
.ai-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; }
.ai-head strong { flex: 1; font-family: var(--font-d); font-size: 1.05rem; }
.msgs { overflow-y: auto; padding: 6px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-radius: 16px 16px 4px 16px; padding: 8px 12px; max-width: 88%; font-size: .9rem; }
.msg.ai { font-size: .93rem; line-height: 1.5; }
.msg.ai p { margin: 0 0 8px; }
.msg.ai p:last-child { margin: 0; }
.msg.ai.thinking { color: var(--ink-2); font-style: italic; }
.msg .note { font-size: .8rem; color: var(--ink-2); margin-top: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 4px; margin: 0 2px; padding: 1px 9px 1px 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 45%, #fff); background: color-mix(in srgb, var(--c) 10%, #fff); color: var(--ink); font-size: .8rem; font-weight: 600; vertical-align: 1px; }
.ai-follow { display: flex; gap: 6px; padding: 8px 12px 12px; }
.ai-follow input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font-size: 16px; background: #fff; }
.ai-follow .go { width: 40px; height: 40px; }
.ai-follow .btn.light { color: var(--ink); border-color: var(--line); background: #fff; }

/* ---------- pannelli ---------- */
.sheet { position: fixed; inset: 0; z-index: 100; background: rgba(21,23,28,.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.panel { background: var(--surface); width: 100%; max-width: 560px; max-height: 100%; overflow: auto; border-radius: 22px; padding: 22px 22px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--sh-2); }
.panel.wide { max-width: 720px; }
.p-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.p-head h2 { margin: 0; flex: 1; font-size: 1.4rem; }
.p-foot { display: flex; gap: 8px; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.step { display: flex; gap: 14px; margin-bottom: 18px; }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.step-b { flex: 1; min-width: 0; }
.step-t { font-weight: 700; margin: 3px 0 10px; }
.searchbox { border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: .78rem; margin: 12px 0 8px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#f-link { width: 100%; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: 15px; resize: vertical; }
.linkst { font-size: .84rem; color: var(--ink-2); margin-top: 8px; }
.linkst:empty { display: none; }
.linkst.ok { color: var(--ok); font-weight: 600; }
.fld .auto { background: #eaf1fe; border-color: #b8cff7; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.posrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--ink-2); }
.err { color: var(--danger); font-size: .88rem; margin-top: 8px; }
.err:empty { display: none; }
.mtabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 0 -22px 16px; padding: 0 22px; scrollbar-width: none; }
.mtab { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.mtab.on { color: var(--ink); border-bottom-color: var(--ink); }
.mbody { min-height: 280px; }
.mlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.mrow { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; background: var(--soft); }
.mrow.noic { grid-template-columns: 1fr auto auto auto; }
.mrow.city { grid-template-columns: 1fr auto; }
.mrow input, .mrow select { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 9px; font-size: 15px; min-width: 0; }
.m-ic { width: 48px; text-align: center; }
.m-colwrap { display: flex; align-items: center; gap: 6px; }
.m-col { width: 118px; }
.m-sw { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.m-n { font-size: .78rem; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-bs { display: flex; gap: 4px; }
.m-b { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 32px; height: 32px; }
.m-b:disabled { opacity: .3; }
.mrow.del { opacity: .7; }
.mrow.del .m-nm { text-decoration: line-through; }
.m-move { grid-column: 1 / -1; font-size: .82rem; color: var(--ink-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.checks { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(21,23,28,.35); }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; z-index: 200; font-size: .9rem; font-weight: 600; box-shadow: var(--sh-2); max-width: calc(100% - 32px); }
.foot { display: none; }

/* il footer compare solo in fondo alla colonna filtri */
.side::after { content: ""; display: block; height: 10px; }
.footside { margin-top: 18px; font-size: .8rem; color: var(--ink-3); }

@media (max-width: 1280px) {
  .app { grid-template-columns: 260px minmax(0, 1fr) 350px; }
  .mode { padding: 8px 10px; }
}
@media (max-width: 980px) {
  :root { --hdr: auto; }
  .hdr { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }
  .logo { font-size: 1.1rem; }
  .hdr-r .lbl { display: none; }
  .hdr-r .btn { padding: 8px 12px; }
  .omni { order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; border-radius: 18px; }
  .omni-modes .mode { flex: 1; }
  .hdr-r { margin-left: auto; }
  .app { display: block; height: auto; }
  .mapcol { padding: 10px 12px 0; }
  .map { flex: none; height: 52vh; min-height: 300px; border-radius: 18px; }
  .listcol { border: 0; margin: 12px 12px 20px; border-radius: 18px; box-shadow: var(--sh-1); overflow: visible; }
  .list { overflow: visible; }
  .ai { max-height: none; border-radius: 18px 18px 0 0; }
  .msgs { max-height: 50vh; }
  .mob { display: inline-flex; }
  .side { position: fixed; z-index: 80; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); transform: translateX(-102%); transition: transform .25s ease; padding-top: calc(18px + env(safe-area-inset-top, 0px)); box-shadow: var(--sh-2); }
  .side.open { transform: none; }
  #fcount { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; }
  .card { left: 10px; right: 10px; bottom: 10px; width: auto; }
  .gtitle { top: 0; }
  .grid2 { grid-template-columns: 1fr; }
  .panel { border-radius: 20px; }
  .sheet { padding: 8px; align-items: flex-end; }
  .mrow { grid-template-columns: auto 1fr auto; }
  .mrow .m-colwrap, .mrow .m-n { grid-column: span 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.link.pulse { background: var(--accent); color: #fff; border-radius: 999px; padding: 8px 14px; }

.logo-txt { display: flex; flex-direction: column; line-height: 1.05; }
.byline { font-family: var(--font); font-size: .72rem; font-weight: 500; letter-spacing: .01em; color: var(--ink-3); margin-top: 3px; }

/* barra filtri di posizione sopra la mappa */
.geobar { display: flex; align-items: stretch; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-1); padding: 6px; gap: 0; }
.gf { flex: 0 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 4px 12px; border-left: 1px solid var(--line); min-width: 0; }
.gf:first-child { border-left: 0; }
.gf > span { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.gf select { border: 0; background: none; font-weight: 600; font-size: .92rem; padding: 2px 22px 2px 0; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235d6370'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; max-width: 150px; cursor: pointer; outline: none; }
.gf select:disabled { color: var(--ink-3); cursor: default; }
.gnear { padding-left: 4px; }
.gnear .nearbtn { width: auto; border: 0; background: #eaf1fe; color: #174ea6; border-radius: 12px; padding: 7px 12px 7px 7px; font-size: .9rem; white-space: nowrap; }
.gnear .nearbtn:hover { background: #dbe7fd; color: #174ea6; }
.gnear .nb-ic { width: 24px; height: 24px; }
.gnear .origin { margin: 0; white-space: nowrap; }
.gtog { flex-direction: row; align-items: center; gap: 8px; font-size: .8rem; color: var(--ink-2); line-height: 1.15; cursor: pointer; margin-left: auto; }
.gtog input { width: 18px; height: 18px; accent-color: var(--ink); }
#near-msg { margin: -2px 6px 0; }
@media (max-width: 980px) {
  .geobar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-radius: 16px; }
  .geobar::-webkit-scrollbar { display: none; }
  .gf { flex: none; }
  .gtog { margin-left: 0; }
}

.mapfab { position: absolute; top: 12px; right: 12px; z-index: 4; border: 0; background: var(--surface); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: .85rem; box-shadow: var(--sh-2); }
.mapfab:hover { background: var(--soft); }
@media (min-width: 981px) { .maptools:not(:has(#aichip:not([hidden]))) { display: none; } }
.gnear { flex: none; }
.gtog span { white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; color: var(--ink-2); }

.msg .note.tech { overflow-wrap: anywhere; font-size: .74rem; }

/* ---------- sfondo pastello (cambia con la categoria) ---------- */
body { background: #fdf6f0; }
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; transition: opacity .6s ease; }
body::before { background: radial-gradient(1200px 700px at 10% 0%, #ffe3d3 0%, transparent 60%), radial-gradient(900px 600px at 100% 100%, #ffe0ea 0%, transparent 60%), linear-gradient(135deg, #fff4ea, #fff8ef 50%, #fdeef3); opacity: 1; }
body::after { background: radial-gradient(1200px 700px at 10% 0%, #d9f3e6 0%, transparent 60%), radial-gradient(900px 600px at 100% 100%, #dde9ff 0%, transparent 60%), linear-gradient(135deg, #eaf8f1, #eef6ff 55%, #f1edff); opacity: 0; }
body[data-cat="visitare"]::after, body[data-section="viaggi"]::after { opacity: 1; }
body[data-cat="visitare"]::before, body[data-section="viaggi"]::before { opacity: 0; }
.hdr { background: rgba(255,255,255,.55); border-bottom-color: rgba(21,23,28,.06); }
.side, .listcol { background: rgba(255,255,255,.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.side { border-right-color: rgba(21,23,28,.06); }
.listcol { border-left-color: rgba(21,23,28,.06); }
.gtitle { background: rgba(255,255,255,.75); }
.lhead { border-bottom-color: rgba(21,23,28,.06); }
.geobar { background: rgba(255,255,255,.85); border-color: rgba(21,23,28,.06); }
.omni { background: rgba(255,255,255,.7); }
.item:hover, .item.hot { background: rgba(255,255,255,.8); }
.tipo:hover { background: rgba(255,255,255,.8); }
body[data-cat="mangiare"] .catbtn.on, body[data-cat="mangiare"] .seg.cats .catbtn.on { background: #e8573f; border-color: #e8573f; }
body[data-cat="visitare"] .seg.cats .catbtn.on { background: #1f8a65; border-color: #1f8a65; }

/* ---------- schede sezione (centrate sopra la mappa) ---------- */
.sections { display: flex; justify-content: center; gap: 6px; padding: 0; flex: none; }
.sec { border: 1px solid rgba(21,23,28,.08); background: rgba(255,255,255,.6); border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: .92rem; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; box-shadow: var(--sh-1); }
.sec.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sec:not(.on):hover { background: rgba(255,255,255,.95); }
body[data-section="viaggi"] .omni { visibility: hidden; }
body[data-section="viaggi"] #add, body[data-section="viaggi"] #manage { display: none; }
@media (max-width: 980px) {
  .sections { padding: 2px 0 0; }
  .sec { flex: 1; justify-content: center; padding: 9px 8px; white-space: nowrap; font-size: .88rem; }
  body[data-section="viaggi"] .omni { display: none; }
}

/* ---------- Mappa Viaggi ---------- */
.vapp { display: grid; grid-template-columns: 290px minmax(0, 1fr) 420px; height: calc(100vh - var(--hdr) - env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--hdr) - env(safe-area-inset-top, 0px)); }
.vside { overflow-y: auto; padding: 18px 14px 28px; background: rgba(255,255,255,.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-right: 1px solid rgba(21,23,28,.06); }
.vside .side-head { margin-bottom: 2px; padding: 0 4px; }
.vs-sub { font-size: .82rem; color: var(--ink-3); margin: 0 4px 12px; }
.vs-all, .vs-city { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; border-radius: 12px; padding: 8px; text-align: left; }
.vs-all:hover, .vs-city:hover { background: rgba(255,255,255,.85); }
.vs-all.on, .vs-city.on { background: var(--ink); color: #fff; }
.vs-all.on small, .vs-city.on small { color: rgba(255,255,255,.7); }
.vs-all { font-weight: 700; }
.vs-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; background: rgba(255,255,255,.9); box-shadow: var(--sh-1); flex: none; }
.vs-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.vs-t b { font-weight: 700; }
.vs-t small { font-size: .78rem; color: var(--ink-3); }
.vs-country { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 16px 8px 4px; }
.vs-foot { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 0 4px; }
.btn.wide { width: 100%; justify-content: center; }
.vwarn { font-size: .82rem; background: #fff3d6; color: #6b4e00; border-radius: 10px; padding: 8px 10px; }
.vbadge { display: inline-flex; align-items: center; font-size: .7rem; font-weight: 700; letter-spacing: .02em; border-radius: 999px; padding: 2px 8px; background: rgba(21,23,28,.07); color: var(--ink-2); white-space: nowrap; }
.vbadge.demo { background: #fff0c2; color: #7a5a00; }
.vbadge.next { background: #dff3ea; color: #146b4c; }
.vbadge.now { background: #1f8a65; color: #fff; }
.vbadge.past { background: #e9e6f7; color: #4b3c96; }
.vbadge.idea { background: #eef1f5; color: #5d6370; }
.vbadge.k { background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 80%, #000); }
.vbadge.ok { background: #dff3ea; color: #146b4c; }
.vbadge.warn { background: #fde8e6; color: #a32a1d; }
.vbadge.prenotata { background: #efe6ff; color: #5b2bb5; }
.vbadge.dafare { background: #fff0c2; color: #7a5a00; }
.vbadge.fatta { background: #dff3ea; color: #146b4c; }

.vmain { overflow-y: auto; padding: 14px 22px 40px; min-width: 0; }
.vnav-slot { display: flex; justify-content: center; margin-bottom: 14px; }
.vmapcol { padding: 14px 14px 14px 0; display: flex; }
.vmap { position: relative; flex: 1; border-radius: 22px; overflow: hidden; background: #e8eaed; box-shadow: var(--sh-2); }
#vgmap { position: absolute; inset: 0; }
.vhero { background: rgba(255,255,255,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 24px; padding: 22px; box-shadow: var(--sh-1); margin-bottom: 16px; }
.vhero.ov { display: flex; align-items: flex-end; gap: 16px; justify-content: space-between; }
.vhero h1 { margin: 0; font-size: 2rem; line-height: 1.1; }
.vhero p { margin: 6px 0 0; color: var(--ink-2); max-width: 640px; }
.vhero.city { background: linear-gradient(135deg, hsl(var(--h) 80% 93% / .9), rgba(255,255,255,.8) 60%); }
.vback { border: 0; background: none; color: var(--ink-2); font-weight: 600; padding: 0; margin-bottom: 10px; font-size: .88rem; }
.vback:hover { color: var(--ink); }
.vh-row { display: flex; gap: 16px; align-items: center; }
.vh-cover { width: 68px; height: 68px; border-radius: 20px; background: #fff; display: grid; place-items: center; font-size: 2.2rem; box-shadow: var(--sh-2); flex: none; }
.vh-flag { font-size: 1.5rem; vertical-align: 2px; }
.vh-meta { color: var(--ink-2); font-weight: 600; margin-top: 3px; }
.vh-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.vnote { background: #fff8e0; border: 1px solid #f5e2a8; border-radius: 16px; padding: 12px 14px; font-size: .9rem; color: #5c4a14; margin-bottom: 14px; }
.vgroup { font-family: var(--font-d); font-weight: 700; font-size: 1.15rem; margin: 20px 4px 10px; }
.vgroup.sm { font-size: 1rem; margin: 18px 2px 8px; }
.vcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.vccard { border: 0; padding: 0; text-align: left; border-radius: 20px; overflow: hidden; background: rgba(255,255,255,.85); box-shadow: var(--sh-1); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.vccard:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.vcc-top { height: 96px; background: linear-gradient(135deg, hsl(var(--h) 85% 88%), hsl(calc(var(--h) + 40) 85% 92%)); position: relative; display: flex; align-items: center; justify-content: center; }
.vcc-cover { font-size: 2.6rem; }
.vcc-flag { position: absolute; left: 12px; top: 10px; font-size: 1.3rem; }
.vcc-top .vbadge { position: absolute; right: 10px; top: 10px; }
.vcc-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.vcc-b b { font-family: var(--font-d); font-size: 1.2rem; }
.vcc-b small { color: var(--ink-2); font-size: .82rem; }
.vcc-cnt { font-size: .78rem; color: var(--ink-3); margin-top: 4px; }

.vtabs { position: sticky; top: -14px; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px 2px; margin: 0 -2px 8px; background: linear-gradient(180deg, rgba(240,248,245,.96) 70%, rgba(240,248,245,0)); }
.vtabs::-webkit-scrollbar { display: none; }
.vtab { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(21,23,28,.08); background: rgba(255,255,255,.8); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.vtab.on { background: var(--c); border-color: var(--c); color: #fff; }
.vt-n { font-size: .74rem; background: rgba(21,23,28,.08); border-radius: 999px; padding: 0 7px; }
.vtab.on .vt-n { background: rgba(255,255,255,.25); }
.vpane { padding-top: 4px; }
.vaddbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 2px 12px; }
.vaddbar .hint { flex: 1; }
.vempty { text-align: center; padding: 28px 16px; color: var(--ink-2); background: rgba(255,255,255,.5); border: 1px dashed rgba(21,23,28,.15); border-radius: 18px; margin-bottom: 12px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.vgrid.one { grid-template-columns: 1fr; }
.vitem { display: flex; gap: 12px; background: rgba(255,255,255,.88); border-radius: 18px; padding: 14px; box-shadow: var(--sh-1); border-left: 4px solid var(--c); transition: box-shadow .2s, transform .2s; }
.vitem.clickable { cursor: pointer; }
.vitem.clickable:hover { box-shadow: var(--sh-2); }
.vitem.done { opacity: .72; }
.vitem.flash, .vcheck.flash { box-shadow: 0 0 0 3px var(--c, #1f8a65), var(--sh-2); transform: scale(1.01); }
.vi-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 1.3rem; background: color-mix(in srgb, var(--c) 12%, #fff); flex: none; }
.vi-b { flex: 1; min-width: 0; }
.vi-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.vi-name { font-weight: 700; font-size: 1rem; line-height: 1.25; margin-right: 2px; }
.vi-meta { font-size: .82rem; color: var(--ink-2); margin-top: 4px; }
.vi-note { font-size: .9rem; margin-top: 5px; }
.vi-code { font-size: .82rem; margin-top: 6px; background: #f3effd; color: #4a2aa8; border-radius: 8px; padding: 4px 8px; display: inline-block; }
.vi-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.vi-acts .btn.sm { padding: 5px 10px; font-size: .8rem; }
.vi-where { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: .84rem; }
.vw-l { font-weight: 700; color: var(--ink-2); }
.vw-t { color: var(--ink-2); }
.vchip { border: 1px solid rgba(21,23,28,.1); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: .82rem; font-weight: 600; }
.vchip:hover { border-color: rgba(21,23,28,.3); }
.vchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.vchips { display: flex; flex-wrap: wrap; gap: 6px; }
.vfilter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 12px; }
.vpasti { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.vpasto { border: 1px dashed rgba(21,23,28,.18); background: none; border-radius: 999px; padding: 2px 9px; font-size: .76rem; font-weight: 600; color: var(--ink-3); }
.vpasto.on { border: 1px solid #f3c1b6; background: #fdece8; color: #a1331f; }
.vrecipe { margin-top: 10px; background: #fff9f1; border: 1px solid #f4e0c6; border-radius: 12px; padding: 8px 12px; }
.vrecipe summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.vr-t { white-space: pre-wrap; font-size: .88rem; margin: 8px 0; line-height: 1.5; }
.vsec h3 { margin: 6px 2px 8px; font-size: 1.1rem; }
.vsec + .vsec { margin-top: 24px; }
.vchecklist { display: flex; flex-direction: column; gap: 6px; }
.vcheck { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.88); border-radius: 14px; padding: 10px 12px; box-shadow: var(--sh-1); --c: #d0247a; }
.vcheck input { width: 20px; height: 20px; accent-color: #d0247a; flex: none; }
.vc-t { flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; min-width: 0; }
.vc-t small { color: var(--ink-2); font-size: .82rem; }
.vcheck.done b { text-decoration: line-through; color: var(--ink-3); }
.vsugg { margin-top: 20px; background: rgba(255,255,255,.55); border-radius: 16px; padding: 12px 14px; }
.vs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: .9rem; }
.vday { background: rgba(255,255,255,.88); border-radius: 20px; box-shadow: var(--sh-1); padding: 14px; margin-bottom: 12px; }
.vd-h { display: flex; align-items: center; gap: 12px; }
.vd-n { width: 52px; height: 52px; border-radius: 16px; background: #1f8a65; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex: none; }
.vd-n small { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.vd-n b { font-size: 1.35rem; font-family: var(--font-d); }
.vd-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vd-t b { font-size: 1.02rem; }
.vd-t b::first-letter { text-transform: uppercase; }
.vd-t span { color: var(--ink-2); font-size: .9rem; }
.vtl { margin: 12px 0 0 25px; border-left: 2px solid #d5e9e1; padding-left: 14px; display: flex; flex-direction: column; gap: 4px; }
.vtl-r { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; position: relative; }
.vtl-r::before { content: ""; position: absolute; left: -21px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--c); border: 2px solid #fff; }
.vtl-r.clickable { cursor: pointer; }
.vtl-r.clickable:hover { background: #f4faf7; }
.vtl-o { width: 44px; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--ink-2); flex: none; }
.vtl-ic { font-size: 1.1rem; flex: none; }
.vtl-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.vtl-t small { color: var(--ink-3); font-size: .78rem; }
.vtl-empty { color: var(--ink-3); font-size: .88rem; padding: 6px 0; }
.vd-add { margin: 8px 0 0 39px; }
.vrefs { display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow: auto; background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.vref { display: flex; gap: 8px; align-items: center; font-size: .92rem; }
.vref input { width: 18px; height: 18px; accent-color: var(--ink); }
.vf-check { margin: 4px 0 12px; }
.vcpin { display: flex; align-items: center; gap: 5px; background: #fff; border-radius: 999px; padding: 4px 10px 4px 6px; box-shadow: 0 3px 10px rgba(0,0,0,.25); font: 700 13px var(--font); cursor: pointer; white-space: nowrap; }
.vcpin span { font-size: 16px; }
.vipin { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 3px solid var(--c); display: grid; place-items: center; font-size: 15px; box-shadow: 0 3px 8px rgba(0,0,0,.25); cursor: pointer; transition: opacity .2s, transform .15s; }
.vipin:hover { transform: scale(1.15); }
.vipin.dim { opacity: .45; transform: scale(.85); }
@media (max-width: 1280px) { .vapp { grid-template-columns: 250px minmax(0, 1fr) 340px; } }
@media (max-width: 980px) {
  .vapp { display: flex; flex-direction: column; height: auto; }
  .vside { display: none; }
  .vmain { order: 1; overflow: visible; padding: 10px 12px 30px; }
  .vmapcol { order: 2; padding: 0 12px 20px; }
  .vmap { height: 48vh; min-height: 280px; flex: none; width: 100%; border-radius: 18px; }
  body[data-vcity="1"] .vmapcol { order: 1; padding: 0 12px 10px; }
  body[data-vcity="1"] .vmap { height: 30vh; min-height: 200px; }
  body[data-vcity="1"] .vmain { order: 2; padding-top: 0; }
  body[data-vcity="1"] .vnav-slot { display: none; }
  .vnav-slot { margin-bottom: 10px; }
  .vhero { padding: 16px; border-radius: 20px; }
  .vhero.ov { flex-direction: column; align-items: stretch; }
  .vhero h1 { font-size: 1.6rem; }
  .vh-cover { width: 54px; height: 54px; font-size: 1.8rem; border-radius: 16px; }
  .vcards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .vcc-top { height: 76px; }
  .vgrid { grid-template-columns: 1fr; }
  .vaddbar { flex-direction: column; align-items: stretch; }
  .vtabs { position: static; flex-wrap: nowrap; }
}
.vi-acts .btn.icon { padding: 5px 9px; }
.vdemo-t { margin-top: 18px; }

/* =====================================================================
   LIQUID GLASS — pannelli di vetro traslucido su sfondo vivo
   ===================================================================== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", sans-serif;
  --font-d: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --glass: rgba(255,255,255,.38);
  --glass-strong: rgba(255,255,255,.62);
  --glass-edge: rgba(255,255,255,.7);
  --glass-blur: blur(26px) saturate(185%);
  --glass-hl: linear-gradient(160deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.14) 38%, rgba(255,255,255,.04) 62%, rgba(255,255,255,.22) 100%);
  --glass-sh: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 1px rgba(255,255,255,.25), inset 0 0 0 1px rgba(255,255,255,.18), 0 12px 40px -12px rgba(40,30,60,.22), 0 2px 8px rgba(40,30,60,.06);
  --r-xl: 30px;
  --ink: #111318;
}
h1, h2, h3, .logo, .lcount { letter-spacing: -0.022em; font-weight: 700; }
body { font-family: var(--font); background: #f3e9e4; }

/* sfondo: macchie di colore che si muovono piano, cambiano con la sezione */
body::before, body::after { inset: -10%; filter: blur(40px) saturate(1.15); animation: lg-drift 26s ease-in-out infinite alternate; }
body::before { background:
  radial-gradient(42% 38% at 12% 12%, #ffb59a 0%, transparent 70%),
  radial-gradient(38% 42% at 88% 18%, #ff9ec4 0%, transparent 70%),
  radial-gradient(46% 40% at 78% 88%, #ffd08a 0%, transparent 70%),
  radial-gradient(40% 44% at 18% 86%, #c9b6ff 0%, transparent 70%),
  linear-gradient(135deg, #fff1ea, #fde9f1); }
body::after { background:
  radial-gradient(42% 38% at 12% 12%, #8fe3c3 0%, transparent 70%),
  radial-gradient(38% 42% at 88% 18%, #9cc8ff 0%, transparent 70%),
  radial-gradient(46% 40% at 78% 88%, #b9a8ff 0%, transparent 70%),
  radial-gradient(40% 44% at 18% 86%, #a6ecf2 0%, transparent 70%),
  linear-gradient(135deg, #e9f8f2, #eaf1ff); }
@keyframes lg-drift { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(2%, -2%, 0) scale(1.05); } 100% { transform: translate3d(-2%, 2%, 0) scale(1.02); } }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } }

/* superfici di vetro */
.hdr, .side, .listcol, .geobar, .sections, .card, .mapfab, .panel, .toast, .pickbar, .aichip,
.vside, .vhero, .vitem, .vday, .vccard, .vcheck, .vsugg, .vempty, .vnote {
  background: var(--glass-hl), var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-sh);
}

/* header a capsula flottante */
.hdr { margin: 10px 12px 0; border-radius: 26px; top: calc(10px + env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--glass-edge); padding: 0 14px 0 18px; }
.omni { background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.75); box-shadow: inset 0 1px 2px rgba(40,30,60,.08); }
.omni:focus-within { background: rgba(255,255,255,.8); box-shadow: 0 0 0 4px rgba(31,111,235,.14), inset 0 1px 2px rgba(40,30,60,.06); }
.mode { transition: background .25s, color .25s, box-shadow .25s; }
.mode.on { background: rgba(17,19,24,.88); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px -4px rgba(0,0,0,.35); }
#mode-ai.on { background: linear-gradient(120deg, #7b4df0, #ff5a7a); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px -6px rgba(123,77,240,.6); }

/* colonne flottanti con spazi tra i pannelli */
.app { padding: 12px; gap: 12px; grid-template-columns: 290px minmax(0, 1fr) 390px; height: calc(100vh - var(--hdr) - 10px - env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--hdr) - 10px - env(safe-area-inset-top, 0px)); margin-top: 0; }
.side, .listcol { border-radius: var(--r-xl); }
.side { border-right: 1px solid var(--glass-edge); }
.listcol { border-left: 1px solid var(--glass-edge); }
.mapcol { padding: 0; gap: 12px; }
.map { border-radius: var(--r-xl); box-shadow: 0 0 0 1px rgba(255,255,255,.75), 0 0 0 6px rgba(255,255,255,.28), 0 20px 50px -20px rgba(40,30,60,.35); }
.geobar { border-radius: 24px; background: var(--glass-hl), rgba(255,255,255,.5); }
.gf { border-left-color: rgba(21,23,28,.08); }
.gnear .nearbtn { background: rgba(31,111,235,.12); border: 1px solid rgba(255,255,255,.7); }
.gtitle { background: rgba(255,255,255,.45); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: 12px; }
.lhead { border-bottom-color: rgba(255,255,255,.55); }

/* tab di sezione: segmented control di vetro */
.sections { align-self: center; display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; }
.vnav-slot .sections { align-self: auto; }
.sec { border: 0; background: none; box-shadow: none; padding: 8px 18px; color: var(--ink-2); transition: background .3s, color .3s, box-shadow .3s; }
.sec:not(.on):hover { background: rgba(255,255,255,.45); }
.sec.on { background: rgba(255,255,255,.92); color: var(--ink); box-shadow: 0 4px 14px -4px rgba(40,30,60,.28), inset 0 1px 0 #fff; }

/* bottoni */
.btn { transition: background .2s, box-shadow .2s, transform .15s; }
.btn.solid { background: linear-gradient(180deg, rgba(40,42,50,.92), rgba(12,13,16,.92)); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 16px -6px rgba(0,0,0,.45); }
.btn.solid:hover { background: linear-gradient(180deg, rgba(55,58,68,.92), rgba(20,21,26,.92)); }
.btn.ghost { background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.8); box-shadow: inset 0 1px 0 #fff, 0 2px 8px -2px rgba(40,30,60,.12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn.ghost:hover { background: rgba(255,255,255,.78); border-color: #fff; }
.btn:active { transform: scale(.96); }
.x { background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); box-shadow: inset 0 1px 0 #fff; }
.go { background: linear-gradient(180deg, #2c2f38, #0f1014); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }

/* categorie: tessere di vetro, quella attiva colorata e luminosa */
.seg.cats .catbtn { background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.8); border-radius: 20px; box-shadow: inset 0 1px 0 #fff, 0 4px 14px -6px rgba(40,30,60,.15); transition: transform .2s, background .25s, box-shadow .25s; }
.seg.cats .catbtn:hover { transform: translateY(-1px); background: rgba(255,255,255,.7); }
body[data-cat="mangiare"] .seg.cats .catbtn.on { background: linear-gradient(150deg, rgba(255,140,105,.95), rgba(236,72,90,.92)); border-color: rgba(255,255,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 12px 28px -10px rgba(236,72,90,.65); }
body[data-cat="visitare"] .seg.cats .catbtn.on { background: linear-gradient(150deg, rgba(56,201,150,.95), rgba(35,130,200,.92)); border-color: rgba(255,255,255,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 12px 28px -10px rgba(35,130,200,.6); }
.tipo { border-radius: 14px; transition: background .2s; }
.tipo:hover { background: rgba(255,255,255,.55); }
.tipo.on { background: rgba(255,255,255,.7); box-shadow: inset 0 1px 0 #fff, 0 2px 8px -3px rgba(40,30,60,.15); }
.tipo .ti, .i-ic, .card-ic, .vi-ic { box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 6px -2px rgba(40,30,60,.18); background: color-mix(in srgb, var(--c) 16%, rgba(255,255,255,.7)); }

/* elenco */
.item { border-radius: 18px; transition: background .2s, box-shadow .2s; }
.item:hover, .item.hot { background: rgba(255,255,255,.55); }
.item.sel { background: rgba(255,255,255,.78); box-shadow: inset 3px 0 0 var(--c), 0 6px 18px -8px rgba(40,30,60,.25); }
.mini-sel { background-color: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); }
.ai { background: linear-gradient(180deg, rgba(236,226,255,.65), rgba(255,255,255,.2)); border-bottom-color: rgba(255,255,255,.55); border-radius: var(--r-xl) var(--r-xl) 0 0; }
.msg.me { background: linear-gradient(180deg, #2c2f38, #111318); }

/* scheda sulla mappa, pannelli, toast */
.card { border-radius: 24px; background: var(--glass-hl), rgba(255,255,255,.72); }
.mapfab { background: var(--glass-hl), rgba(255,255,255,.62); }
.sheet { background: rgba(30,24,40,.28); -webkit-backdrop-filter: blur(8px) saturate(140%); backdrop-filter: blur(8px) saturate(140%); }
.panel { background: var(--glass-hl), rgba(255,255,255,.8); border-radius: 30px; }
.fld input, .fld select, .fld textarea, #f-link { background: rgba(255,255,255,.6); border: 1px solid rgba(21,23,28,.08); border-radius: 14px; box-shadow: inset 0 1px 2px rgba(40,30,60,.06); }
.fld input:focus, .fld select:focus, .fld textarea:focus, #f-link:focus { outline: none; background: #fff; border-color: #9cc0fb; box-shadow: 0 0 0 4px rgba(31,111,235,.12); }
.searchbox { border: 1.5px solid rgba(17,19,24,.8); border-radius: 16px; background: rgba(255,255,255,.7); }
.toast { color: var(--ink); background: var(--glass-hl), rgba(255,255,255,.78); }
.pickbar { color: var(--ink); background: var(--glass-hl), rgba(255,255,255,.8); }
.pickbar .btn.light { color: var(--ink); border-color: rgba(21,23,28,.15); background: rgba(255,255,255,.6); }
.aichip { color: #4a2aa8; background: var(--glass-hl), rgba(236,226,255,.7); }
.clu { background: rgba(17,19,24,.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 0 0 5px rgba(255,255,255,.45), 0 6px 16px rgba(0,0,0,.28); }
.gpin .ph { box-shadow: 0 4px 12px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.5); }

/* Mappa Viaggi */
.vapp { padding: 12px; gap: 12px; grid-template-columns: 290px minmax(0, 1fr) 420px; height: calc(100vh - var(--hdr) - 10px - env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--hdr) - 10px - env(safe-area-inset-top, 0px)); }
.vside { border-radius: var(--r-xl); }
.vmain { padding: 0 6px 40px; }
.vmapcol { padding: 0; }
.vmap { border-radius: var(--r-xl); box-shadow: 0 0 0 1px rgba(255,255,255,.75), 0 0 0 6px rgba(255,255,255,.28), 0 20px 50px -20px rgba(40,30,60,.35); }
.vhero { border-radius: 28px; }
.vhero.city { background: var(--glass-hl), linear-gradient(135deg, hsl(var(--h) 90% 88% / .55), rgba(255,255,255,.35) 60%); }
.vccard { border-radius: 24px; }
.vcc-top { background: linear-gradient(135deg, hsl(var(--h) 90% 82% / .75), hsl(calc(var(--h) + 50) 90% 88% / .55)); border-bottom: 1px solid rgba(255,255,255,.6); }
.vitem { border-radius: 22px; border-left: 1px solid var(--glass-edge); box-shadow: inset 3px 0 0 var(--c), var(--glass-sh); }
.vday { border-radius: 26px; }
.vtabs { background: none; }
.vtab { background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.8); box-shadow: inset 0 1px 0 #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background .25s, color .25s, box-shadow .25s; }
.vtab.on { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 82%, #fff), var(--c)); border-color: rgba(255,255,255,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 20px -8px var(--c); }
.vs-all.on, .vs-city.on { background: rgba(255,255,255,.85); color: var(--ink); box-shadow: inset 0 1px 0 #fff, 0 6px 16px -8px rgba(40,30,60,.3); }
.vs-all.on small, .vs-city.on small { color: var(--ink-3); }
.vs-all:hover, .vs-city:hover { background: rgba(255,255,255,.55); }
.vs-ic { background: rgba(255,255,255,.75); box-shadow: inset 0 1px 0 #fff, 0 2px 6px -2px rgba(40,30,60,.2); }
.vchip, .vpasto { background: rgba(255,255,255,.6); }
.vrecipe { background: rgba(255,248,238,.7); border-color: rgba(255,255,255,.8); }
.vtabs { top: 0; }
.vcpin, .vipin { box-shadow: 0 4px 14px rgba(0,0,0,.22), inset 0 1px 0 #fff; }

@media (max-width: 1280px) { .app { grid-template-columns: 260px minmax(0, 1fr) 340px; } .vapp { grid-template-columns: 250px minmax(0, 1fr) 340px; } }
@media (max-width: 980px) {
  .hdr { margin: 8px 8px 0; border-radius: 22px; top: calc(8px + env(safe-area-inset-top, 0px)); padding: 10px 12px; gap: 8px; }
  .logo { font-size: 1rem; gap: 8px; }
  .logo-pin { width: 24px; height: 24px; }
  .hdr-r .btn { padding: 7px 11px; }
  .app { padding: 10px 0 0; gap: 0; height: auto; }
  .mapcol { padding: 0 10px; gap: 10px; }
  .map { border-radius: 24px; }
  .listcol { margin: 12px 10px 20px; border-radius: 26px; }
  .side { border-radius: 0 28px 28px 0; background: var(--glass-hl), rgba(255,255,255,.72); }
  .sections { align-self: stretch; display: flex; }
  .vapp { padding: 10px 0 0; height: auto; gap: 0; }
  .vmain { padding: 0 10px 30px; }
  .vmapcol { padding: 0 10px 16px; }
}
.toast { border-radius: 20px; text-align: center; width: max-content; max-width: calc(100% - 32px); }

/* aggiunti di recente */
.recentbtn { justify-content: center; }
.recentbtn.desk { width: 100%; margin: 0 0 14px; }
.btn.recentbtn.on, .btn.recentbtn.on:hover { background: linear-gradient(150deg, rgba(123,77,240,.92), rgba(80,110,245,.92)); color: #fff; border-color: rgba(255,255,255,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 10px 24px -10px rgba(100,80,240,.7); }
.i-date { flex: none; font-size: .76rem; font-weight: 700; color: #5b3fd0; background: rgba(123,77,240,.1); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
@media (max-width: 980px) { .recentbtn.desk { display: none; } .maptools { gap: 8px; } #listcol, #map { scroll-margin-top: 170px; } }

/* destinazione nel modulo: Mappa Luoghi / viaggio */
.destwrap { margin: -4px 0 16px; }
.dest { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(21,23,28,.06); box-shadow: inset 0 1px 2px rgba(40,30,60,.08); }
.dest button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 9px 10px; font-weight: 700; font-size: .9rem; color: var(--ink-2); transition: background .25s, color .25s, box-shadow .25s; }
.dest button.on { background: #fff; color: var(--ink); box-shadow: 0 4px 12px -4px rgba(40,30,60,.3), inset 0 1px 0 #fff; }
.dest button[data-d="viaggio"].on { background: linear-gradient(150deg, #38c996, #2382c8); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 20px -8px rgba(35,130,200,.6); }
.desthint { margin-top: 8px; font-size: .84rem; font-weight: 600; color: #1d6f8f; background: rgba(35,130,200,.1); border-radius: 12px; padding: 7px 12px; }
.tripbox { background: linear-gradient(150deg, rgba(56,201,150,.12), rgba(35,130,200,.1)); border: 1px solid rgba(35,130,200,.18); border-radius: 18px; padding: 12px 12px 4px; margin-bottom: 12px; }
.tripbox .hint { margin: -4px 2px 10px; }

/* ---------- prestazioni: vetro più leggero ----------
   Sfondo fermo (niente animazione/filtri), sfocatura solo sui pannelli grandi. */
body::before, body::after { animation: none !important; filter: none !important; inset: 0; will-change: auto; }
:root { --glass-blur: blur(18px) saturate(160%); }
.vitem, .vday, .vccard, .vcheck, .vsugg, .vempty, .vnote, .card, .mapfab, .toast, .pickbar, .aichip, .geobar,
.btn.ghost, .vtab, .gtitle, .clu, .sections {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.vitem, .vday, .vccard, .vcheck { background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.74)); }
.vsugg, .vempty, .vnote { background: rgba(255,255,255,.66); }
.card, .toast, .pickbar { background: rgba(255,255,255,.94); }
.mapfab, .geobar, .sections { background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.72)); }
.btn.ghost, .vtab { background: rgba(255,255,255,.72); }
.gtitle { background: rgba(255,255,255,.82); }
.clu { background: rgba(17,19,24,.88); }
.aichip { background: rgba(240,232,255,.95); }
@media (max-width: 980px) {
  /* sul telefono niente sfocatura: pannelli quasi opachi, stesso look */
  .hdr, .side, .listcol, .vside, .vhero, .panel {
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
  .hdr { background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(255,255,255,.82)); }
  .side, .panel { background: rgba(255,255,255,.97); }
  .listcol, .vhero { background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.76)); }
  .sheet { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(30,24,40,.4); }
}
