:root {
  --ink: #14213D;
  --ink-2: #33415C;
  --muted: #6B7590;
  --line: #E6E8EF;
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --surface-2: #F1F2F6;
  --accent: #FF6B4A;
  --accent-ink: #D9472A;
  --accent-soft: #FFE9E3;
  --mint: #2BA88A;
  --mint-soft: #DDF4EC;
  --amber: #F2A93B;
  --amber-soft: #FDF0DA;
  --blue: #3A6FD9;
  --blue-soft: #E3EBFB;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-1: 0 1px 2px rgba(20, 33, 61, .06), 0 2px 8px rgba(20, 33, 61, .06);
  --shadow-2: 0 10px 30px rgba(20, 33, 61, .14), 0 2px 6px rgba(20, 33, 61, .08);
  --nav-w: 92px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--nav-w) 1fr; height: 100dvh; overflow: hidden; }
.main { position: relative; min-width: 0; height: 100dvh; overflow: hidden; }
.view { position: absolute; inset: 0; }
.view-page { overflow-y: auto; padding: 32px 40px 80px; }

/* ---------- Navigation ---------- */
.nav { background: var(--ink); color: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; z-index: 30; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; margin-bottom: 18px; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: #FFD3C8; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(255, 107, 74, .45); }
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark svg path { fill: #fff; opacity: .95; }
.brand-mark svg circle { fill: var(--accent); }
.brand-name { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; opacity: .85; }
.brand-name b { color: var(--accent); font-weight: 800; }
.nav-item { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 14px; text-decoration: none; color: rgba(255, 255, 255, .62); font-size: 11.5px; font-weight: 600; background: none; border: 0; transition: background .15s, color .15s; }
.nav-item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav-item.active { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-item.active svg { stroke: var(--accent); }
.nav-cta { color: #fff; }
.nav-cta svg { background: var(--accent); stroke: #fff; border-radius: 12px; width: 40px; height: 40px; padding: 8px; box-shadow: 0 6px 16px rgba(255, 107, 74, .4); }
.nav-cta:hover { background: none; }
.nav-cta:hover svg { transform: translateY(-1px); }

/* ---------- Map view ---------- */
.map { position: absolute; inset: 0; background: #E9E6DF; z-index: 1; }
.map-top { position: absolute; top: 16px; left: 16px; right: 392px; z-index: 10; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; padding: 0 18px; height: 50px; box-shadow: var(--shadow-2); max-width: 520px; }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 15px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-1); white-space: nowrap; transition: transform .1s, background .15s; }
.chip:hover { transform: translateY(-1px); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .em { font-size: 15px; }

.list-panel { position: absolute; top: 16px; right: 16px; bottom: 16px; width: 360px; z-index: 10; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-2); display: flex; flex-direction: column; overflow: hidden; }
.lp-head { padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.lp-head h2 { font-size: 19px; }
.lp-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.lp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.lp-stat { background: var(--surface-2); border-radius: 12px; padding: 9px 10px; }
.lp-stat b { display: block; font-size: 19px; letter-spacing: -.02em; }
.lp-stat span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.lp-sort { display: flex; gap: 6px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.lp-list { overflow-y: auto; flex: 1; padding: 8px; }
.lp-empty { padding: 40px 20px; text-align: center; color: var(--muted); }

.lcard { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 10px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; background: none; width: 100%; text-align: left; }
.lcard:hover { background: var(--surface-2); }
.lcard.sel { border-color: var(--accent); background: var(--accent-soft); }
.lcard img { width: 76px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.lcard h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.lcard .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.lcard .tops { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.mini-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); padding: 3px 7px; border-radius: 6px; }
.lcard.sel .mini-tag { background: #fff; }

.fab { position: absolute; z-index: 12; left: 50%; transform: translateX(calc(-50% - 188px)); bottom: 26px; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 24px 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15.5px; box-shadow: 0 12px 28px rgba(255, 107, 74, .45); transition: transform .15s, box-shadow .15s; }
.fab svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }
.fab:hover { transform: translateX(calc(-50% - 188px)) translateY(-2px); box-shadow: 0 16px 34px rgba(255, 107, 74, .5); }

/* Map markers */
.pin { position: relative; display: grid; place-items: center; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--surface); border: 3px solid var(--c, var(--accent)); box-shadow: 0 6px 14px rgba(20, 33, 61, .28); transition: transform .15s; }
.pin span { transform: rotate(45deg); line-height: 1; }
.pin.sel { background: var(--c, var(--accent)); transform: rotate(-45deg) scale(1.18); z-index: 999; }
.pin-badge { position: absolute; top: -8px; right: -10px; transform: rotate(45deg); background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; font-family: var(--font); }
.pin.dim { opacity: .28; }
.leaflet-div-icon.pin-wrap { background: none; border: 0; }
.leaflet-container { font-family: var(--font); }
.leaflet-tile-pane { filter: saturate(.45) contrast(.92) brightness(1.04) sepia(.08); }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow-2) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 38px !important; height: 38px !important; line-height: 38px !important; color: var(--ink) !important; }
.leaflet-bottom.leaflet-left { margin-left: 6px; }

/* ---------- Drawer (dettaglio locale) ---------- */
.drawer { position: fixed; top: 16px; right: 16px; bottom: 16px; width: 420px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-2); z-index: 40; transform: translateX(calc(100% + 24px)); transition: transform .28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; overflow: hidden; }
.drawer.open { transform: none; }
.d-hero { position: relative; height: 220px; flex: none; background: var(--surface-2); }
.d-hero img { width: 100%; height: 100%; object-fit: cover; }
.d-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 33, 61, .35), transparent 35%, transparent 60%, rgba(20, 33, 61, .55)); pointer-events: none; }
.d-close, .d-watch { position: absolute; top: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.d-close { right: 12px; }
.d-watch { right: 58px; }
.d-close svg, .d-watch svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.d-watch.on svg { fill: var(--accent); stroke: var(--accent); }
.d-status { position: absolute; left: 14px; top: 14px; z-index: 2; }
.d-hero-foot { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 2; color: #fff; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.d-hero-foot small { font-size: 12px; opacity: .9; font-weight: 500; }
.d-body { overflow-y: auto; padding: 18px 20px 24px; flex: 1; }
.d-title { font-size: 22px; font-weight: 800; }
.d-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; display: inline-block; }
.d-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.fact { border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.fact b { display: block; font-size: 16px; }
.fact span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.section-title h3 { font-size: 15.5px; }
.section-title small { color: var(--muted); font-size: 12px; font-weight: 600; }

.rank { display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; }
.rank-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: color-mix(in srgb, var(--c) 14%, white); }
.rank-bar { position: relative; height: 34px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.rank-bar i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c) 22%, white); border-radius: 10px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.rank-bar span { position: relative; z-index: 1; display: flex; align-items: center; height: 100%; padding: 0 12px; font-weight: 600; font-size: 13.5px; gap: 6px; }
.rank-bar .mine { font-size: 10.5px; font-weight: 800; color: var(--accent-ink); background: #fff; padding: 2px 6px; border-radius: 5px; }
.rank-n { font-weight: 800; font-size: 14px; min-width: 26px; text-align: right; }

.quote { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-top: 8px; }
.quote small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; font-weight: 600; }

.owner-box { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.owner-av { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--blue-soft); flex: none; }
.owner-box b { display: block; font-size: 14px; }
.owner-box small { color: var(--muted); font-size: 12px; }
.lead-banner { display: flex; align-items: center; gap: 10px; background: var(--mint-soft); color: #13664F; border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-top: 10px; }

.d-actions { flex: none; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 8px; background: var(--surface); }
.d-actions .btn { flex: 1; }

/* ---------- Buttons, forms, badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14.5px; text-decoration: none; transition: transform .1s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(255, 107, 74, .32); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-ghost { border-color: transparent; background: none; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.badge-soft { box-shadow: none; background: var(--surface-2); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, .select, .textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 14px; height: 46px; outline: none; transition: border-color .15s, box-shadow .15s; }
.textarea { padding: 12px 14px; height: auto; min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(20, 33, 61, .08); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.switch b { display: block; font-size: 14px; }
.switch small { color: var(--muted); font-size: 12.5px; }
.toggle { position: relative; width: 46px; height: 28px; flex: none; }
.toggle input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle i { position: absolute; inset: 0; border-radius: 99px; background: #D3D7E1; transition: background .2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .2s; }
.toggle input:checked + i { background: var(--mint); }
.toggle input:checked + i::after { transform: translateX(18px); }

/* Category picker */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.cat-opt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); text-align: left; font-weight: 600; font-size: 13px; transition: border-color .15s, background .15s, transform .1s; }
.cat-opt .em { font-size: 22px; line-height: 1; }
.cat-opt:hover { border-color: color-mix(in srgb, var(--c) 50%, white); }
.cat-opt.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, white); }
.cat-opt .n { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-size: 12px; font-weight: 800; display: none; place-items: center; }
.cat-opt.on .n { display: grid; }
.cat-opt.full:not(.on) { opacity: .45; }
.pick-count { display: inline-flex; gap: 4px; }
.pick-count i { width: 26px; height: 6px; border-radius: 3px; background: var(--line); }
.pick-count i.on { background: var(--accent); }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(20, 33, 61, .42); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { width: min(640px, 100%); max-height: calc(100dvh - 40px); background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; overflow: hidden; animation: pop .25s cubic-bezier(.2, .8, .2, 1); }
.modal-wide { width: min(860px, 100%); }
.modal-head { padding: 22px 24px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-head h2 { font-size: 22px; }
.modal-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.modal-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.modal-x svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.modal-body { padding: 4px 24px 20px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; align-items: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.steps { display: flex; gap: 6px; margin: 0 24px 6px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background .25s; }
.steps i.on { background: var(--accent); }

.photo-drop { position: relative; display: grid; place-items: center; text-align: center; gap: 10px; border: 2px dashed #CDD2DE; border-radius: 18px; min-height: 260px; background: var(--surface-2); overflow: hidden; cursor: pointer; transition: border-color .15s; }
.photo-drop:hover { border-color: var(--accent); }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-drop .ph-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--accent); display: grid; place-items: center; margin: 0 auto; box-shadow: 0 8px 20px rgba(255, 107, 74, .35); }
.photo-drop .ph-ic svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.photo-drop b { font-size: 16px; }
.photo-drop small { color: var(--muted); }
.photo-change { position: absolute; bottom: 12px; right: 12px; z-index: 2; pointer-events: none; }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.tip { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 12px; padding: 10px; display: flex; gap: 8px; align-items: flex-start; }

.mini-map { height: 240px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.mini-map-hint { position: absolute; z-index: 500; right: 10px; top: 10px; background: rgba(255, 255, 255, .94); border-radius: 10px; padding: 6px 10px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-1); }
.geo-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 10px 0 14px; }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.summary { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: start; }
.summary img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 14px; }

/* Onboarding */
.onb { display: grid; grid-template-columns: 1fr 1fr; min-height: 520px; }
.onb-art { background: var(--ink); color: #fff; padding: 36px 32px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.onb-art h1 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.onb-art h1 em { font-style: normal; color: var(--accent); }
.onb-art p { opacity: .78; margin-top: 12px; font-size: 15px; }
.onb-points { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; position: relative; z-index: 1; }
.onb-points div { display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 600; }
.onb-points span { width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; font-size: 17px; flex: none; }
.onb-arches { position: absolute; right: -40px; bottom: -30px; opacity: .14; width: 300px; }
.onb-form { padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.onb-form h2 { font-size: 21px; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-opt { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .15s, background .15s; }
.role-opt .em { font-size: 22px; }
.role-opt b { font-size: 13.5px; }
.role-opt small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.role-opt.on { border-color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--ink); }

/* ---------- Pages (stats, profile) ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 30px; font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 640px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--accent-ink); margin-bottom: 6px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--surface); padding: 10px; border-radius: 16px; box-shadow: var(--shadow-1); margin-bottom: 20px; position: sticky; top: -32px; z-index: 5; }
.filters .select { width: auto; min-width: 180px; height: 40px; border-radius: 10px; }
.filters .spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, 1fr); }
.g-2 { grid-template-columns: 1.3fr 1fr; }
.g-2e { grid-template-columns: 1fr 1fr; }
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-1); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.card-head h3 { font-size: 16.5px; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.kpi { position: relative; overflow: hidden; }
.kpi .k-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--bgc); margin-bottom: 14px; }
.kpi b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; display: block; }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi .delta { position: absolute; top: 20px; right: 20px; font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 8px; background: var(--mint-soft); color: #13664F; }
.kpi .delta.neg { background: var(--accent-soft); color: var(--accent-ink); }

.hbar { display: flex; flex-direction: column; gap: 10px; }
.hb-row { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 600; }
.hb-row .lbl { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: 6px; background: var(--c); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.hb-row .v { text-align: right; font-weight: 800; }
.hb-row.hl .lbl { color: var(--accent-ink); }

.trend-list { display: flex; flex-direction: column; gap: 4px; }
.trend { display: grid; grid-template-columns: 38px 1fr 110px 64px; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; }
.trend:hover { background: var(--surface-2); }
.trend .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: color-mix(in srgb, var(--c) 14%, white); }
.trend b { font-size: 14px; display: block; }
.trend small { color: var(--muted); font-size: 12px; }
.trend svg { width: 110px; height: 34px; overflow: visible; }
.growth { font-weight: 800; font-size: 13px; text-align: right; color: #13664F; }
.growth.neg { color: var(--accent-ink); }
.growth.new { color: var(--blue); }

.heat { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 12.5px; }
.heat-wrap { overflow-x: auto; }
.heat th { font-weight: 700; color: var(--ink-2); text-align: left; padding: 4px 6px; white-space: nowrap; }
.heat thead th { text-align: center; font-size: 17px; padding-bottom: 6px; cursor: default; }
.heat td { text-align: center; height: 34px; min-width: 38px; border-radius: 8px; font-weight: 700; color: var(--ink); }
.heat td.hot { color: #fff; }
.heat tr.hl th { color: var(--accent-ink); }
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.heat-legend i { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #F1F2F6, #FF6B4A, #8E2A14); }

.status-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 3px; margin: 8px 0 14px; }
.status-bar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

.week-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.week-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week-chart .col i { width: 100%; max-width: 30px; background: var(--ink); border-radius: 6px 6px 3px 3px; min-height: 3px; transition: height .5s; }
.week-chart .col.last i { background: var(--accent); }
.week-chart .col small { font-size: 10.5px; color: var(--muted); font-weight: 600; }

.note { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; gap: 8px; }

/* Opportunità */
.opp-hero { background: var(--ink); color: #fff; border-radius: 24px; padding: 28px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-bottom: 20px; position: relative; overflow: hidden; }
.opp-hero h1 { font-size: 30px; font-weight: 800; }
.opp-hero h1 em { font-style: normal; color: var(--accent); }
.opp-hero p { opacity: .75; margin-top: 8px; max-width: 560px; }
.opp-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.opp-pick .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
.opp-pick .chip.on { background: #fff; color: var(--ink); }
.score-ring { width: 150px; height: 150px; position: relative; flex: none; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring div { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.score-ring b { font-size: 38px; font-weight: 800; display: block; line-height: 1; }
.score-ring small { font-size: 11.5px; opacity: .7; font-weight: 600; }
.zone-rank { display: flex; flex-direction: column; gap: 10px; }
.zr { display: grid; grid-template-columns: 30px 1fr 140px 90px; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.zr .pos { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.zr:first-child .pos { background: var(--accent); color: #fff; }
.zr b { display: block; font-size: 14.5px; }
.zr small { color: var(--muted); font-size: 12px; }
.conf { font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 7px; text-align: center; }
.conf.alta { background: var(--mint-soft); color: #13664F; }
.conf.media { background: var(--amber-soft); color: #8A5A0E; }
.conf.bassa { background: var(--surface-2); color: var(--muted); }
.score-bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.score-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--accent)); border-radius: 5px; }
.opp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.opp-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); text-align: left; padding: 0; transition: transform .15s, box-shadow .15s; }
.opp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.opp-card img { width: 100%; height: 120px; object-fit: cover; display: block; }
.opp-card div { padding: 12px; }
.opp-card b { font-size: 14px; display: block; }
.opp-card small { color: var(--muted); font-size: 12px; }
.opp-card .pct { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--accent-ink); }

/* Profilo */
.profile-hero { display: flex; align-items: center; gap: 18px; background: var(--surface); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-1); margin-bottom: 16px; flex-wrap: wrap; }
.avatar { width: 72px; height: 72px; border-radius: 22px; background: linear-gradient(135deg, var(--accent), #FFB35C); color: #fff; display: grid; place-items: center; font-size: 28px; font-weight: 800; flex: none; }
.profile-hero h1 { font-size: 24px; }
.profile-hero .role-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 700; background: var(--surface-2); padding: 5px 10px; border-radius: 999px; }
.p-stats { display: flex; gap: 24px; margin-left: auto; }
.p-stats div { text-align: center; }
.p-stats b { display: block; font-size: 24px; font-weight: 800; }
.p-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 14px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--accent); }
.tabs .cnt { font-size: 11px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; margin-left: 4px; }
.list-rows { display: flex; flex-direction: column; gap: 8px; }
.lrow { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; width: 100%; }
.lrow img { width: 56px; height: 48px; border-radius: 10px; object-fit: cover; }
.lrow b { font-size: 14px; display: block; }
.lrow small { color: var(--muted); font-size: 12px; }
.lrow:hover { border-color: #CBD0DC; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: 16px; }
.empty .em { font-size: 34px; display: block; margin-bottom: 8px; }
.role-switch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s; z-index: 200; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .g-2, .g-2e { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  :root { --nav-h: 68px; }
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr var(--nav-h); }
  .main { height: calc(100dvh - var(--nav-h)); grid-row: 1; }
  .nav { grid-row: 2; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); gap: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .app { grid-template-rows: 1fr calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .brand { display: none; }
  .nav-item { width: auto; flex: 1; padding: 6px 2px; font-size: 10.5px; gap: 3px; }
  .nav-cta svg { width: 46px; height: 46px; margin-top: -22px; border: 4px solid var(--ink); padding: 9px; border-radius: 16px; }
  .view-page { padding: 20px 16px 40px; }
  .map-top { right: 16px; top: 12px; left: 12px; right: 12px; }
  .search { height: 46px; max-width: none; }
  .list-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 132px; border-radius: 22px 22px 0 0; transition: height .3s cubic-bezier(.2, .8, .2, 1); }
  .list-panel.expanded { height: 72%; }
  .lp-head { padding: 10px 16px; cursor: pointer; position: relative; }
  .lp-head::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
  .lp-head p { display: none; }
  .lp-stats { margin-top: 8px; }
  .fab { display: none; }
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 88%; border-radius: 24px 24px 0 0; transform: translateY(105%); }
  .drawer.open { transform: none; }
  .modal-back { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 94dvh; border-radius: 24px 24px 0 0; }
  .onb { grid-template-columns: 1fr; min-height: 0; }
  .onb-art { padding: 24px 22px; }
  .onb-art h1 { font-size: 26px; }
  .onb-points { display: none; }
  .onb-form { padding: 22px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi b { font-size: 24px; }
  .filters { position: static; }
  .filters .select { flex: 1; min-width: 140px; }
  .hb-row { grid-template-columns: 112px 1fr 36px; font-size: 12.5px; }
  .trend { grid-template-columns: 36px 1fr 60px; }
  .trend svg { display: none; }
  .opp-hero { grid-template-columns: 1fr; padding: 22px; }
  .opp-hero h1 { font-size: 24px; }
  .score-ring { width: 120px; height: 120px; }
  .zr { grid-template-columns: 28px 1fr 80px; }
  .zr .score-bar { display: none; }
  .p-stats { margin-left: 0; width: 100%; justify-content: space-around; }
  .role-switch, .role-grid { grid-template-columns: 1fr 1fr; }
  .tips { grid-template-columns: 1fr; }
  .summary { grid-template-columns: 1fr; }
  .row, .row-3 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 24px; }
}

/* Selettore città e badge modalità */
.map-top-row { display: flex; gap: 10px; align-items: center; }
.map-top-row .search { flex: 1; }
.city-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 14px 0 14px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; box-shadow: var(--shadow-2); font-weight: 700; max-width: 260px; }
.city-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.city-btn .chev { stroke: rgba(255, 255, 255, .7); width: 16px; height: 16px; }
.city-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
.city-btn small { opacity: .65; font-weight: 600; }
.city-btn:hover { background: var(--ink-2); }
.mode-badge { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--ink); background: var(--amber); border-radius: 6px; padding: 3px 6px; margin: -10px 0 10px; }
.scope-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 600; }
.crumbs b { color: var(--ink); }
@media (max-width: 860px) {
  .city-btn { height: 46px; max-width: 46%; padding: 0 12px; }
  .city-btn .chev { display: none; }
  .mode-badge { display: none; }
}

/* ======================================================================
   Organizzazioni, messaggi, scheda civico, dashboard, supervisione
   ====================================================================== */
.nav { overflow-y: auto; scrollbar-width: none; }
.nav-item { position: relative; }
.nav-site { margin-top: auto; opacity: .8; }
.nav-badge { position: absolute; top: 4px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.p-link .nav-badge { position: static; display: inline-grid; margin-left: 6px; }

/* Scheda: link e zoom */
.d-full { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--accent-ink); text-decoration: none; margin: 2px 0 2px; }
.d-full svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.d-zoom { position: absolute; top: 12px; right: 104px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.d-zoom svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.d-hero img { cursor: zoom-in; }

/* Visualizzatore zoomabile */
.zm-frame { position: relative; overflow: hidden; background: #0d1527; border-radius: var(--radius); touch-action: none; user-select: none; cursor: zoom-in; }
.zm-frame.zoomed { cursor: grab; }
.zm-frame.zoomed:active { cursor: grabbing; }
.zm-frame img { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: center; will-change: transform; pointer-events: none; }
.zm-ctrl { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.zm-ctrl button { width: 38px; height: 38px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .94); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.zm-ctrl svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.zm-hint { position: absolute; left: 12px; bottom: 12px; z-index: 2; background: rgba(13, 21, 39, .7); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 10px; max-width: calc(100% - 80px); }
.zm-frame .d-status { position: absolute; left: 12px; top: 12px; z-index: 2; }
.modal-lightbox { width: min(1200px, 96vw); max-height: 94dvh; padding: 0; background: #0d1527; }
.lightbox { height: min(86dvh, 900px); border-radius: 0; }
.lb-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .94); display: grid; place-items: center; }
.lb-x svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2.4; }

/* Ciambella */
.donut { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.dn-chart { position: relative; flex: none; margin: 0 auto; }
.dn-chart svg { width: 100%; height: 100%; overflow: visible; }
.dn-seg { cursor: pointer; transition: stroke-width .2s, opacity .2s; outline: none; }
.dn-seg:hover, .dn-seg:focus-visible { stroke-width: 18; }
.donut.has-sel .dn-seg:not(.on) { opacity: .28; }
.dn-seg.on { stroke-width: 19; }
.dn-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; padding: 22%; }
.dn-center b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.dn-center span { font-size: 12px; color: var(--muted); font-weight: 700; line-height: 1.2; }
.dn-legend { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.dn-item { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; border: 0; background: none; padding: 6px 8px; border-radius: 10px; font-size: 13px; font-weight: 600; text-align: left; }
.dn-item i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.dn-item b { font-weight: 800; }
.dn-item:hover { background: var(--surface-2); }
.dn-item.on { background: color-mix(in srgb, var(--c) 16%, white); }
.donut.has-sel .dn-item:not(.on) { opacity: .5; }

/* Scheda completa del civico */
.civ-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.civ-top .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.civ { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.civ-photo { aspect-ratio: 16 / 10; }
.civ-head { margin: 18px 0 12px; }
.civ-head h1 { font-size: 30px; font-weight: 800; }
.civ-head .d-sub { margin-top: 6px; }
.civ-facts { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.civ-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; }
.civ-detail { margin-top: 12px; }
.civ-sel { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 14%, white); margin-bottom: 8px; }
.civ-sel > span { font-size: 24px; }
.civ-sel b { display: block; }
.civ-sel small { color: var(--ink-2); font-size: 12.5px; }
.civ-h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 6px; }
.civ-none { color: var(--muted); font-size: 13px; }
.civ-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.civ-actions .btn { justify-content: center; }
.civ-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.civ-row .btn.on svg { fill: var(--accent); stroke: var(--accent); }
.civ-report { color: var(--muted) !important; }
.civ .mini-map { height: 260px; }
.owner-link { text-decoration: none; color: inherit; transition: border-color .15s; }
.owner-link:hover { border-color: var(--ink); }
.owner-go svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; }
.vbadge { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--mint); color: #fff; font-size: 11px; vertical-align: 2px; }

/* Profilo organizzazione */
.org-hero { display: flex; gap: 18px; align-items: center; }
.org-hero h1 { font-size: 28px; font-weight: 800; }
.org-hero p { color: var(--ink-2); margin-top: 6px; max-width: 680px; }
.org-logo { width: 72px; height: 72px; border-radius: 20px; background: var(--accent-soft); display: grid; place-items: center; font-size: 34px; flex: none; }
.org-contacts { display: flex; flex-direction: column; gap: 10px; font-weight: 600; font-size: 14px; }
.org-contacts a { text-decoration: none; }
.org-contacts a:hover { color: var(--accent-ink); }
.type-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.type-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 700; text-align: center; }
.type-opt span { font-size: 22px; }
.type-opt.on { border-color: var(--accent); background: var(--accent-soft); }

/* Messaggi */
.view-page:has(.msg) { padding: 0; overflow: hidden; }
.msg { display: grid; grid-template-columns: 340px 1fr; height: 100%; background: var(--surface); }
.msg-list { border-right: 1px solid var(--line); overflow-y: auto; }
.msg-list-head { padding: 24px 20px 14px; }
.msg-list-head h1 { font-size: 24px; font-weight: 800; }
.msg-list-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.msg-sep { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; color: var(--muted); padding: 16px 20px 6px; }
.cv-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 12px 20px; text-decoration: none; color: inherit; border-left: 3px solid transparent; }
.cv-item img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.cv-item b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-item small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-item > div { min-width: 0; }
.cv-time { font-size: 11.5px; color: var(--muted); text-align: right; }
.cv-item:hover { background: var(--surface-2); }
.cv-item.on { background: var(--accent-soft); border-left-color: var(--accent); }
.cv-item.unread b::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: 2px; }
.msg-thread { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.th-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.th-head b { display: block; }
.th-head small { color: var(--muted); font-size: 12.5px; }
.th-head svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.th-back { display: none; }
.th-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: min(560px, 80%); background: var(--surface); border-radius: 16px 16px 16px 4px; padding: 10px 14px; box-shadow: var(--shadow-1); align-self: flex-start; }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.bubble small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.bubble em { font-style: normal; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); display: block; margin-bottom: 2px; }
.bubble.me { align-self: flex-end; background: var(--ink); color: #fff; border-radius: 16px 16px 4px 16px; }
.bubble.me small { color: rgba(255, 255, 255, .6); }
.bubble.portal:not(.me) { background: var(--blue-soft); }
.bubble.hidden-msg { opacity: .55; outline: 1.5px dashed var(--accent); }
.lnk { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; }
.th-form { display: flex; gap: 10px; padding: 12px 20px 4px; background: var(--surface); border-top: 1px solid var(--line); }
.th-form .textarea { min-height: 48px; resize: none; }
.th-form .btn { align-self: flex-end; height: 48px; width: 52px; justify-content: center; padding: 0; }
.th-form .btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.th-note { font-size: 11.5px; color: var(--muted); padding: 2px 20px 12px; background: var(--surface); }
.modal .th-note { padding: 0; background: none; }
.th-closed { padding: 16px 20px; text-align: center; color: var(--muted); background: var(--surface); border-top: 1px solid var(--line); font-size: 13.5px; }
.th-empty { flex: 1; display: grid; place-content: center; text-align: center; color: var(--muted); }
.th-empty span { font-size: 44px; }

/* Dashboard e liste di gestione */
.dash-row { grid-template-columns: 56px 1fr auto; }
.dash-row a { text-decoration: none; }
.dash-right { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.select-sm { height: 34px; width: auto; min-width: 120px; padding: 0 30px 0 10px; font-size: 13px; border-radius: 10px; }
.pill { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 14px; background: var(--mint-soft); color: #13664F; font-size: 13px; }
.lrow.sel { border-color: var(--accent); background: var(--accent-soft); }
.g-meta { font-size: 12px; color: var(--muted); margin: -6px 0 4px; padding-left: 162px; }
.seg-wrap { flex-wrap: wrap; }
.tabs .cnt.hot { background: var(--accent); color: #fff; }

/* Supervisione */
.adm-q { display: flex; gap: 14px; align-items: flex-start; border: 0; text-align: left; transition: transform .15s; }
.adm-q:hover { transform: translateY(-2px); }
.adm-q > span { font-size: 26px; }
.adm-q b { font-size: 28px; font-weight: 800; display: block; line-height: 1; }
.adm-q small { font-weight: 700; font-size: 13.5px; }
.adm-q p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.adm-q.hot b { color: var(--accent-ink); }
.adm-item { display: flex; flex-direction: column; gap: 10px; }
.adm-h { display: flex; gap: 12px; align-items: center; }
.adm-h b { display: block; }
.adm-h small { color: var(--muted); font-size: 12.5px; }
.adm-img { width: 64px; height: 52px; border-radius: 10px; object-fit: cover; }
.adm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-size: 13.5px; font-weight: 600; }
.adm-grid span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.adm-note { font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.adm-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.docs { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th, .adm-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.adm-table code { font-size: 11.5px; color: var(--ink-2); word-break: break-all; }

/* Rapporto territoriale */
.rpt-page { max-width: 1100px; margin: 0 auto; }
.rpt-tools { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 14px; flex-wrap: wrap; }
.rpt-head { background: linear-gradient(120deg, var(--ink), #2b3c6b); color: #fff; border-radius: var(--radius); padding: 28px; margin-bottom: 16px; }
.rpt-head h1 { font-size: 30px; font-weight: 800; margin: 10px 0 6px; }
.rpt-head p { opacity: .8; }
.rpt-brand { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; opacity: .9; }
.brand-mark-sm { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.rpt-notes { background: var(--surface); border-left: 4px solid var(--accent); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; font-size: 15px; line-height: 1.6; }
.rpt-foot { color: var(--muted); font-size: 12px; margin-top: 18px; }
body.report-mode .nav { display: none; }
body.report-mode .app { grid-template-columns: 1fr; grid-template-rows: 1fr; }
body.report-mode .main { height: 100dvh; }
.print-root { display: none; }

/* Link rapidi nel profilo (utili su mobile) */
.p-links { display: none; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.p-link { display: inline-flex; align-items: center; gap: 4px; padding: 9px 13px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-1); font-weight: 700; font-size: 13.5px; text-decoration: none; }

@media (max-width: 1180px) {
  .civ { grid-template-columns: minmax(0, 1fr); }
  .civ-side { position: static; }
  .adm-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { overflow: visible; }
  .nav-extra, .nav-site { display: none !important; }
  .p-links { display: flex; }
  body.has-unread .nav-item[data-route="profilo"]::after { content: ''; position: absolute; top: 6px; right: 28%; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
  .civ-head h1 { font-size: 24px; }
  .civ-facts { grid-template-columns: repeat(2, 1fr); }
  .civ-photo { aspect-ratio: 4 / 3; }
  .org-hero { flex-direction: column; align-items: flex-start; }
  .type-pick { grid-template-columns: repeat(3, 1fr); }
  .msg { grid-template-columns: 1fr; }
  .msg.has-thread .msg-list { display: none; }
  .msg:not(.has-thread) .msg-thread { display: none; }
  .th-back { display: inline-flex; padding: 6px; }
  .th-head { padding: 10px 12px; }
  .th-body { padding: 14px 12px; }
  .th-form { padding: 10px 12px 4px; }
  .th-note { padding: 2px 12px 10px; }
  .dash-row { grid-template-columns: 48px 1fr; }
  .dash-row .dash-right { grid-column: 1 / -1; justify-content: flex-start; }
  .g-meta { padding-left: 0; }
  .rpt-head { padding: 20px; }
  .rpt-head h1 { font-size: 22px; }
  .d-zoom { right: 104px; }
}

@media print {
  body.printing .app, body.printing #modal-root, body.printing .toast { display: none !important; }
  body.printing .print-root { display: block; padding: 0; }
  body:not(.printing).report-mode .rpt-tools { display: none; }
  body:not(.printing) .nav { display: none; }
  html, body { height: auto; background: #fff; }
  .app, .main, .view-page { display: block; height: auto; overflow: visible; }
  .card { box-shadow: none; border: 1px solid var(--line); break-inside: avoid; }
  .rpt-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .kpis { grid-template-columns: repeat(4, 1fr) !important; }
  .g-2e, .g-2 { grid-template-columns: 1fr 1fr !important; }
  .dn-legend .dn-item { padding: 2px 4px; }
}

/* Uscita dal profilo */
.p-signout { align-self: flex-start; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink, inherit); text-decoration: underline; cursor: pointer; }
@media (max-width: 860px) { .p-signout { position: absolute; top: 14px; right: 14px; } .profile-hero { position: relative; } }


/* Passkey */
.btn-passkey { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; width: 100%; background: var(--ink, #1c1b19); color: var(--surface, #fff); border-radius: 14px; font-weight: 700; }
.btn-passkey svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.btn-passkey:disabled { opacity: .6; }
.onb-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.onb-or::before, .onb-or::after { content: ""; flex: 1; height: 1px; background: var(--line, rgba(0,0,0,.12)); }
.pk-start { display: flex; flex-direction: column; gap: 10px; align-items: center; max-width: 320px; margin: 0 auto; width: 100%; }
.pk-start .btn { width: 100%; }
.pk-offer { padding: 26px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pk-offer h2 { font-size: 20px; }
.pk-offer p { color: var(--muted); font-size: 14px; max-width: 380px; }
.pk-ico { width: 56px; height: 56px; border-radius: 18px; background: var(--surface-2); display: grid; place-items: center; }
.pk-ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pk-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pk-list { display: flex; flex-direction: column; gap: 6px; }
.pk-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: 12px; }
.pk-row > div { flex: 1; min-width: 0; }
.pk-row small { display: block; color: var(--muted); font-size: 12px; }
[data-pk-section] .btn-passkey { width: auto; height: 40px; padding: 0 16px; }


/* Supervisione: segnalazioni e scheda utente */
.kpi-btn { text-align: left; cursor: pointer; border: 0; font: inherit; color: inherit; }
.kpi-btn:hover { box-shadow: var(--shadow-2, var(--shadow-1)); }
.adm-lf { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.adm-lf .input { max-width: 220px; }
.adm-lf .select { max-width: 180px; }
.adm-count { color: var(--muted); font-size: 13px; margin-left: auto; }
.adm-lrow { grid-template-columns: 56px minmax(0, 1fr) auto; cursor: default; }
.adm-lrow small { display: block; }
.adm-lrow.is-hidden { opacity: .72; }
.adm-pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.u-open { cursor: pointer; }
.uc-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.uc-head .avatar { width: 52px; height: 52px; font-size: 18px; flex: none; }
.uc-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.uc-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.uc-k { background: var(--surface-2); border-radius: 12px; padding: 10px; }
.uc-k b { display: block; font-size: 20px; font-weight: 800; }
.uc-k span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.uc-sub { font-size: 13px; color: var(--ink-2); margin: 6px 0; }
.d-author { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.d-author .linkbtn { font-weight: 700; }
@media (max-width: 860px) {
  .uc-kpis { grid-template-columns: repeat(2, 1fr); }
  .adm-lrow { grid-template-columns: 48px minmax(0, 1fr); }
  .adm-lrow .dash-right { grid-column: 1 / -1; justify-content: flex-start; }
  .adm-lf .input, .adm-lf .select { max-width: none; flex: 1 1 140px; }
}
.uc-foot { display: flex; justify-content: flex-end; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

.d-staff { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Etichetta con spiegazione */
.info-btn { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; border-radius: 50%; border: 1.5px solid var(--muted); background: none; color: var(--muted); font: 700 11px/1 var(--font); font-style: italic; cursor: pointer; vertical-align: 1px; padding: 0; }
.info-btn[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.info-text { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); padding: 8px 10px; border-radius: 10px; }

/* Vetrina: illustrazione in prospettiva, confronto e editor degli angoli */
.vis-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; transition: opacity .35s ease; }
.vis-art { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 6px; background: var(--facade, #F6D9B8); box-shadow: 0 0 0 3px rgba(255,255,255,.75), 0 6px 18px rgba(20,33,61,.25); }
.vis-layer .vis-art { inset: auto; }
.vis-sign { flex: none; text-align: center; font: italic 500 clamp(11px, 7cqw, 30px)/1.2 Fraunces, Georgia, serif; color: #14213D; padding: 3px 4px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vis-art { container-type: inline-size; }
.vis-art svg { flex: 1; width: 100%; min-height: 0; display: block; }
.d-hero:not(.vis-on) .vis-layer, .civ-photo:not(.vis-on) .vis-layer { opacity: 0; }
.civ-photo .vis-layer { transform-origin: center; z-index: 1; }
.civ-photo .d-vis { top: 50px; }
.vis-card-sm { margin-top: 14px; max-width: 520px; }
.d-vis { position: absolute; left: 12px; top: 52px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.92); color: var(--ink); font: 700 12.5px var(--font); cursor: pointer; box-shadow: var(--shadow-1); }
.d-hero.vis-on .d-vis { background: var(--accent); color: #fff; }
.shop-tag { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(20,33,61,.82); color: #fff; font: 700 12.5px var(--font); cursor: pointer; box-shadow: var(--shadow-1); backdrop-filter: blur(4px); }
.shop-tag:hover { background: var(--ink); }
.vis-card { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border-radius: 14px; padding: 10px; margin-top: 10px; }
.vis-card > svg { width: 64px; height: 109px; flex: none; border-radius: 8px; }
.vis-card small { display: block; color: var(--muted); font-size: 12.5px; }
.qe { position: relative; flex-shrink: 0; width: fit-content; max-width: 100%; margin-inline: auto; touch-action: none; user-select: none; border-radius: var(--radius); overflow: hidden; background: #0d1527; }
.qe img { max-width: 100%; max-height: 60vh; width: auto; display: block; pointer-events: none; }
.qe-rect { position: absolute; cursor: move; touch-action: none; outline: 2px solid #FF6B4A; outline-offset: 0; }
.qe-rect .vis-art { opacity: .88; pointer-events: none; box-shadow: none; border-radius: 0; }
.qe-rect.dragging .vis-art { opacity: .6; }
.qe-rect:focus-visible { outline: 3px solid var(--ink); }
.qe-empty { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,107,74,.25); color: #fff; font-weight: 800; pointer-events: none; }
.qe-h { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 3px solid #FF6B4A; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); touch-action: none; padding: 0; z-index: 1; }
.qe-n, .qe-s { width: 34px; height: 16px; margin: -8px 0 0 -17px; border-radius: 8px; cursor: ns-resize; }
.qe-e, .qe-w { width: 16px; height: 34px; margin: -17px 0 0 -8px; border-radius: 8px; cursor: ew-resize; }
.qe-nw { left: 0; top: 0; cursor: nwse-resize; } .qe-n { left: 50%; top: 0; } .qe-ne { left: 100%; top: 0; cursor: nesw-resize; }
.qe-e { left: 100%; top: 50%; } .qe-se { left: 100%; top: 100%; cursor: nwse-resize; } .qe-s { left: 50%; top: 100%; }
.qe-sw { left: 0; top: 100%; cursor: nesw-resize; } .qe-w { left: 0; top: 50%; }
.qe-h:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.qe-help { font-size: 13px; color: var(--ink-2); }
.lead-prop { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--c) 10%, white); border: 1px solid color-mix(in srgb, var(--c) 25%, white); }
.lead-prop > svg { width: 70px; height: 119px; flex: none; border-radius: 8px; }
.lead-prop b { display: block; font-size: 16px; margin-top: 3px; }
.lead-prop small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.lead-prop .mine { font-size: 10.5px; font-weight: 800; color: var(--accent-ink); background: #fff; padding: 2px 6px; border-radius: 5px; font-style: normal; }
.lead-ic { width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: #fff; }
.lead-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 70%, black); }
.more-props { margin-top: 8px; }
.more-props summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-weight: 700; font-size: 13.5px; }
.more-props summary::-webkit-details-marker { display: none; }
.more-props summary::after { content: '▾'; transition: transform .2s; }
.more-props[open] summary::after { transform: rotate(180deg); }
.more-props .rank { margin-top: 8px; }
.civ-photo .shop-tag { right: 60px; }
/* Filtro attività a scelta multipla e "Intorno a me" */
.filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.filter-btn, .locate-btn, .filter-clear { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 13.5px var(--font); box-shadow: var(--shadow-1); cursor: pointer; white-space: nowrap; min-width: 0; }
.filter-btn span { overflow: hidden; text-overflow: ellipsis; }
.filter-btn svg, .locate-btn svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.filter-btn .chev { width: 15px; height: 15px; opacity: .6; }
.filter-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter-clear { width: 38px; padding: 0; justify-content: center; font-size: 14px; }
.locate-btn { margin-left: auto; }
.locate-btn.busy svg { animation: spin 1s linear infinite; }
.cat-sheet { display: none; }
.cat-sheet.open { display: block; position: fixed; top: var(--t, 120px); left: var(--l, 16px); z-index: 1200; }
.cs-panel { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-2, 0 12px 40px rgba(20,33,61,.22)); padding: 14px; width: min(460px, 100%); }
.cs-head b { display: block; font-size: 16px; }
.cs-head small { color: var(--muted); font-size: 12.5px; }
.cs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; max-height: 52vh; overflow: auto; }
.cs-opt { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); text-align: left; font: 600 13.5px var(--font); color: var(--ink); cursor: pointer; }
.cs-opt .em { font-size: 18px; }
.cs-opt .cs-l { flex: 1; min-width: 0; line-height: 1.2; }
.cs-opt .cs-n { font-size: 12px; font-weight: 800; color: var(--muted); }
.cs-opt.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); }
.cs-opt.on .cs-n { color: var(--ink); }
.cs-opt:disabled { opacity: .4; cursor: default; }
.cs-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.cs-foot .btn-primary { flex: 1; justify-content: center; }
.me-dot { width: 22px; height: 22px; border-radius: 50%; background: #3A8FD9; border: 4px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 2px 8px rgba(58,143,217,.6); animation: me-pulse 2s ease-out infinite; }
@keyframes me-pulse { 0% { box-shadow: 0 0 0 0 rgba(58,143,217,.5), 0 2px 8px rgba(58,143,217,.6); } 100% { box-shadow: 0 0 0 16px rgba(58,143,217,0), 0 2px 8px rgba(58,143,217,.6); } }
@media (max-width: 860px) {
  .cat-sheet.open { position: fixed; inset: 0; top: 0; left: 0; z-index: 1200; background: rgba(13,21,39,.4); display: flex; align-items: flex-end; }
  .cs-panel { width: 100%; border-radius: 22px 22px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .locate-btn span { display: none; }
  .locate-btn { width: 38px; padding: 0; justify-content: center; }
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Panoramica della via */
.st-card { margin-top: 16px; }
.st-strip { position: relative; display: flex; align-items: flex-end; gap: 0; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 0; margin-top: 10px; scrollbar-width: thin; }
.st-shop, .st-gap { flex: none; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); scroll-snap-align: center; }
.st-shop svg, .st-gap svg { width: 112px; height: 190px; display: block; }
.st-gap svg { width: 70px; height: 190px; opacity: .55; }
.st-gap { padding-bottom: 46px; }
.st-shop { position: relative; transition: transform .15s; }
.st-shop:hover { transform: translateY(-3px); }
.st-shop.here svg { filter: drop-shadow(0 0 0 #FF6B4A) drop-shadow(0 -4px 0 #FF6B4A); }
.st-shop.here::before { content: 'Sei qui'; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 1; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.st-cap { display: flex; flex-direction: column; align-items: center; width: 112px; min-height: 46px; padding: 6px 4px 0; font-size: 11.5px; line-height: 1.25; color: var(--muted); text-align: center; }
.st-cap b { color: var(--ink); font-size: 13px; }
.st-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.d-links { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
