/* Safety (web/safety.js): SOS shield and screen, #sicurezza, «Siamo insieme», volunteers. Prefix sfy-. */
:root { --sfy-red: #c0322a; --sfy-red-deep: #9c231c; --sfy-red-soft: #fbe3df; --sfy-live: #2f7d5a; }
@media (prefers-color-scheme: dark) { :root { --sfy-red: #d9463b; --sfy-red-deep: #b8352b; --sfy-red-soft: #3d201c; --sfy-live: #62c496; } }

.sfy-i { width: 20px; height: 20px; flex: none; }

/* ---------- SOS shield ---------- */
.sfy-shield { position: relative; display: inline-flex; align-items: center; gap: 12px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; color: var(--ink); text-align: left; }
.sfy-shield-btn { position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--sfy-red); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--sfy-red) 40%, transparent), inset 0 -3px 0 rgba(0,0,0,.18); transition: transform .15s var(--ease); }
.sfy-shield:focus-visible { outline: none; }
.sfy-shield:focus-visible .sfy-shield-btn { outline: 3px solid color-mix(in srgb, var(--sfy-red) 60%, transparent); outline-offset: 3px; }
.sfy-shield.is-holding .sfy-shield-btn { transform: scale(1.08); }
.sfy-shield-ring { position: absolute; inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); transform: rotate(-90deg); pointer-events: none; }
.sfy-ring-bg { fill: none; stroke: transparent; stroke-width: 4; }
.sfy-ring-fg { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--hold, 0) * 100); opacity: 0; transition: opacity .15s; }
.sfy-shield.is-holding .sfy-ring-bg { stroke: color-mix(in srgb, var(--sfy-red) 30%, transparent); }
.sfy-shield.is-holding .sfy-ring-fg { opacity: 1; stroke: var(--sfy-red-deep); }
.sfy-shield-mark { position: relative; width: 30px; height: 34px; display: grid; place-items: center; }
.sfy-shield-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255,255,255,.22); }
.sfy-shield-mark b { position: relative; font: 850 11.5px/1 var(--font); letter-spacing: .04em; color: #fff; }
.sfy-shield-label { display: grid; line-height: 1.2; }
.sfy-shield-label strong { font-size: 16px; font-weight: 850; color: var(--sfy-red); letter-spacing: .02em; }
.sfy-shield-label small { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.sfy-shield.is-lg .sfy-shield-btn { width: 72px; height: 72px; }
.sfy-shield.is-lg .sfy-shield-mark { width: 38px; height: 42px; }
.sfy-shield.is-lg .sfy-shield-mark b { font-size: 13.5px; }
.sfy-shield.is-xl { flex-direction: column; gap: 14px; text-align: center; }
.sfy-shield.is-xl .sfy-shield-btn { width: 128px; height: 128px; }
.sfy-shield.is-xl .sfy-shield-mark { width: 64px; height: 72px; }
.sfy-shield.is-xl .sfy-shield-mark b { font-size: 21px; }
.sfy-shield.is-xl .sfy-shield-label { justify-items: center; }
/* Map: its own spot on the right, above the map buttons and visible in both views */
.tg-map-page > .sfy-shield.is-map { position: absolute; right: 10px; bottom: 236px; z-index: 610; }
@media (min-width: 900px) { .tg-map-page > .sfy-shield.is-map { bottom: 140px; } }
/* Guided tour player: a round button in the top bar */
.mt-top-row .sfy-shield.is-tour .sfy-shield-btn { width: 44px; height: 44px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.mt-top-row .sfy-shield.is-tour .sfy-shield-mark { width: 24px; height: 27px; }
.mt-top-row .sfy-shield.is-tour .sfy-shield-mark b { font-size: 9.5px; }
.mt-top-row .sfy-shield.is-tour .sfy-shield-ring { inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); }
.sfy-t-mapwrap { position: relative; }
.sfy-t-mapwrap > .sfy-shield.is-together { position: absolute; right: 10px; bottom: 12px; z-index: 600; }

/* ---------- Layer: countdown and SOS screen ---------- */
html.sfy-layer-open, html.sfy-layer-open body { overflow: hidden; }
.sfy-layer { position: fixed; inset: 0; z-index: 2000; overflow-y: auto; overscroll-behavior: contain; padding: calc(var(--safe-top) + 14px) 16px calc(var(--safe-bottom) + 20px); animation: sfy-in .2s var(--ease); }
@keyframes sfy-in { from { opacity: 0; } to { opacity: 1; } }
.sfy-layer.is-countdown { background: var(--sfy-red); color: #fff; display: grid; place-items: center; }
.sfy-layer.is-sos { background: var(--bg); color: var(--ink); }
.sfy-cd { width: 100%; max-width: 420px; display: grid; justify-items: center; text-align: center; gap: 12px; }
.sfy-cd-kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 12px; border-radius: var(--r-pill); background: rgba(255,255,255,.16); font-weight: 850; letter-spacing: .08em; font-size: 13px; }
.sfy-cd h2 { font: 650 30px/1.1 var(--display); margin: 0; font-stretch: var(--display-stretch);}
.sfy-cd-num { position: relative; width: 156px; height: 156px; display: grid; place-items: center; }
.sfy-cd-num svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.sfy-cd-bg { fill: rgba(0,0,0,.12); stroke: rgba(255,255,255,.25); stroke-width: 7; }
.sfy-cd-fg { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--left) * 20); transition: stroke-dashoffset .9s linear; }
.sfy-cd-num b { font: 800 72px/1 var(--font); font-variant-numeric: tabular-nums; }
.sfy-cd-text { margin: 0; font-weight: 650; line-height: 1.4; max-width: 34ch; opacity: .95; }
.sfy-cd-ask { margin: 6px 0 0; font-weight: 800; }
.sfy-cd-ask small, .sfy-sos-kind small { font-weight: 600; opacity: .8; }
.sfy-kinds { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sfy-kind { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); font-weight: 750; font-size: 14px; background: rgba(255,255,255,.14); color: inherit; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.sfy-kind.is-on { background: #fff; color: var(--sfy-red-deep); box-shadow: none; }
.sfy-cd-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.sfy-cd-cancel { min-height: 60px; border-radius: var(--r-lg); background: #fff; color: var(--sfy-red-deep); font-weight: 850; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.sfy-cd-cancel .sfy-i { width: 22px; height: 22px; }
.sfy-cd-now { min-height: 60px; border-radius: var(--r-lg); background: rgba(0,0,0,.18); color: #fff; font-weight: 800; font-size: 16px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45); }
.sfy-cd-112 { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; padding: 10px; }

.sfy-sos { max-width: 520px; margin: 0 auto; display: grid; gap: 12px; }
.sfy-sos-head { display: flex; align-items: center; gap: 10px; }
.sfy-sos-head h2 { flex: 1; min-width: 0; font: 650 26px/1.1 var(--display); font-stretch: var(--display-stretch);}
.sfy-sos-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--r-pill); background: var(--sfy-red); color: #fff; font-weight: 850; font-size: 12.5px; letter-spacing: .06em; flex: none; }
.sfy-sos-badge .sfy-i { width: 16px; height: 16px; }
.sfy-min { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.sfy-min .sfy-i { transform: rotate(90deg); }
.sfy-112 { display: flex; align-items: center; gap: 14px; min-height: 92px; padding: 16px 18px; border-radius: var(--r-xl); background: var(--sfy-red); color: #fff; text-decoration: none; box-shadow: 0 10px 26px color-mix(in srgb, var(--sfy-red) 38%, transparent); }
.sfy-112:active { transform: scale(.99); }
.sfy-112-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.2); flex: none; }
.sfy-112-icon .sfy-i { width: 28px; height: 28px; }
.sfy-112 strong { display: block; font-size: 28px; font-weight: 850; line-height: 1.05; letter-spacing: -.01em; }
.sfy-112 small { display: block; font-size: 14px; font-weight: 650; opacity: .92; margin-top: 3px; }
.sfy-112.is-compact { min-height: 72px; }
.sfy-112.is-compact strong { font-size: 22px; }
.sfy-112.is-compact .sfy-112-icon { width: 46px; height: 46px; }
.sfy-wau { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; }
.sfy-wau-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #2458a6; color: #fff; font-weight: 850; font-size: 14px; flex: none; }
.sfy-wau strong { display: block; font-size: 16px; font-weight: 800; }
.sfy-wau small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; line-height: 1.3; }
.sfy-wau > span:nth-child(2) { flex: 1; min-width: 0; }
.sfy-wau > .sfy-i { color: var(--muted); }
.sfy-sos-state { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); font-weight: 750; }
.sfy-sos-state.is-error { background: var(--danger-soft); color: var(--danger); }
.sfy-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--sfy-red); animation: spin .8s linear infinite; flex: none; }
.sfy-sos-status { padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.sfy-sos-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sfy-sos-checks li { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.sfy-sos-checks li.is-ok .sfy-i { color: var(--ok); }
.sfy-sos-checks li.is-muted { color: var(--muted); }
.sfy-coming { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sfy-coming > strong { display: block; font-size: 17px; font-weight: 850; color: var(--ok); margin-bottom: 6px; }
.sfy-coming ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sfy-coming li { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.sfy-geo { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--ink); }
.sfy-geo > .sfy-i { color: var(--warn); margin-top: 2px; }
.sfy-geo p { margin: 2px 0 8px; font-size: 14px; }
.sfy-geo.is-denied { background: var(--danger-soft); }
.sfy-geo-ok { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ok); }
.sfy-geo-ok .sfy-i { width: 18px; height: 18px; }
.sfy-sos-kind p { margin: 4px 0 8px; font-weight: 800; }
.sfy-sos .sfy-kinds { justify-content: flex-start; }
.sfy-sos .sfy-kind { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.sfy-sos .sfy-kind.is-on { background: var(--ink); color: var(--bg); box-shadow: none; }
.sfy-sos-share { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--sea-soft); color: var(--ink); text-align: left; }
.sfy-sos-share > .sfy-i { width: 24px; height: 24px; color: var(--sea); }
.sfy-sos-share strong { display: block; font-weight: 800; }
.sfy-sos-share small { display: block; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.sfy-ok { width: 100%; min-height: 56px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface); color: var(--ok); font-weight: 850; font-size: 16px; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ok) 55%, transparent); }
.sfy-confirm { padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 2px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.sfy-confirm h3 { font-size: 18px; margin-bottom: 6px; }
.sfy-confirm-actions { display: grid; gap: 8px; }
.sfy-confirm-actions .button:first-child { background: var(--ok); box-shadow: none; }
.sfy-sos-done { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 12vh 8px 0; }
.sfy-done-icon { width: 56px; height: 56px; color: var(--ok); }
.sfy-sos-done h2 { font: 650 28px/1.1 var(--display); font-stretch: var(--display-stretch);}

/* ---------- Live bar and urgent alert ---------- */
.sfy-live { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-bottom) + 10px); z-index: 60; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 8px 14px; border-radius: var(--r-pill); background: var(--navy); color: #fff; font-size: 13px; font-weight: 750; text-decoration: none; box-shadow: var(--shadow-2); white-space: nowrap; }
.sfy-live > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.sfy-live.is-sos { background: var(--sfy-red); }
.sfy-live.is-warn { background: var(--warn); }
body[data-page="map"] .sfy-live { bottom: auto; top: calc(var(--header-h) + var(--safe-top) + 108px); }
.sfy-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sfy-live); box-shadow: 0 0 0 0 color-mix(in srgb, var(--sfy-live) 60%, transparent); animation: sfy-pulse 1.8s infinite; flex: none; }
.sfy-live .sfy-live-dot { background: #7be0a8; }
.sfy-live.is-sos .sfy-live-dot { background: #fff; }
@keyframes sfy-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sfy-live) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .sfy-live-dot { animation: none; } .sfy-cd-fg { transition: none; } .sfy-layer { animation: none; } }
.sfy-urgent { position: fixed; left: 12px; right: 12px; top: calc(var(--safe-top) + 10px); z-index: 1500; display: flex; align-items: stretch; max-width: 520px; margin: 0 auto; border-radius: var(--r-lg); background: var(--sfy-red); color: #fff; box-shadow: var(--shadow-3); animation: sfy-in .2s var(--ease); }
.sfy-urgent a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px 6px 12px 14px; color: inherit; text-decoration: none; }
.sfy-urgent a > span:nth-child(2) { flex: 1; min-width: 0; }
.sfy-urgent strong { display: block; font-weight: 850; }
.sfy-urgent small { display: block; opacity: .92; font-weight: 650; }
.sfy-urgent b { padding: 8px 12px; border-radius: var(--r-pill); background: #fff; color: var(--sfy-red-deep); font-weight: 850; flex: none; }
.sfy-urgent button { width: 44px; display: grid; place-items: center; color: #fff; flex: none; }
.sfy-urgent .sfy-alert-mark { background: rgba(255,255,255,.2); }

/* ---------- #sicurezza hub ---------- */
.sfy-page { display: grid; gap: 16px; min-width: 0; }
.sfy-hero { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding-top: 6px; }
.sfy-hero-copy { min-width: 0; }
.sfy-hero-copy p { margin: 0; color: var(--ink-2); font-weight: 600; }
.sfy-hero .app-page-title { margin: 4px 0 6px; }
.sfy-hero-sos .sfy-shield { flex-direction: column; gap: 6px; text-align: center; }
.sfy-hero-sos .sfy-shield-label { justify-items: center; }
.sfy-hero-sos .sfy-shield-label strong { display: none; }
.sfy-hero-sos .sfy-shield-label small { font-size: 11px; max-width: 84px; line-height: 1.2; }
.sfy-112-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--sfy-red-soft); color: var(--ink); text-decoration: none; }
.sfy-112-row > .sfy-i:first-child { width: 26px; height: 26px; color: var(--sfy-red); }
.sfy-112-row > span { flex: 1; min-width: 0; }
.sfy-112-row strong { display: block; font-weight: 850; font-size: 17px; }
.sfy-112-row small { display: block; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.sfy-block { background: var(--surface); border: var(--card-border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--card-shadow); min-width: 0; }
.sfy-block-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.sfy-block-head.is-row { align-items: center; justify-content: space-between; }
.sfy-head-icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-deep); flex: none; }
@media (prefers-color-scheme: dark) { .sfy-head-icon { color: var(--accent); } }
.sfy-h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.sfy-h3 { font-size: 15px; font-weight: 800; margin: 16px 0 8px; }
.sfy-lead { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.4; }
.sfy-fine { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.45; }
.sfy-fine .sfy-i { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; }
.sfy-empty { color: var(--muted); font-weight: 600; font-size: 14px; margin: 0 0 12px; }
.sfy-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.4; }
.sfy-note > .sfy-i { width: 18px; height: 18px; margin-top: 1px; }
.sfy-note.is-ok { background: var(--ok-soft); color: var(--ink); }
.sfy-note.is-ok > .sfy-i { color: var(--ok); }
.sfy-note.is-warn { background: var(--warn-soft); color: var(--ink); }
.sfy-note.is-warn > .sfy-i { color: var(--warn); }
.sfy-account { margin: 0; }
.sfy-form { display: grid; gap: 12px; }
.sfy-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.sfy-form legend { font-size: 13px; font-weight: 750; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.sfy-form .field { margin: 0; }
.sfy-form input[type="text"], .sfy-form select, .sfy-sheet input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--bg-elev); font-weight: 650; font-size: 15px; }
.sfy-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sfy-chip { position: relative; }
.sfy-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sfy-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-weight: 750; font-size: 14px; white-space: nowrap; }
.sfy-chip input:checked + span { background: var(--ink); color: var(--bg); }
.sfy-chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.sfy-recip-link { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.sfy-recip-link .sfy-i { color: var(--sea); }
.sfy-recips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sfy-recip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px 0 8px; border-radius: var(--r-pill); background: var(--surface-2); font-weight: 700; font-size: 14px; max-width: 100%; }
.sfy-recip input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.sfy-recip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfy-switch { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 0; }
.sfy-switch > span { min-width: 0; }
.sfy-switch strong { display: block; font-weight: 750; font-size: 14.5px; }
.sfy-switch small { display: block; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.sfy-switch input[role="switch"] { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 14px; margin: 0; position: relative; background: var(--surface-3); box-shadow: inset 0 0 0 1.5px var(--line-strong); cursor: pointer; transition: background .18s var(--ease); }
.sfy-switch input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s var(--ease); }
.sfy-switch input[role="switch"]:checked { background: var(--ok); box-shadow: none; }
.sfy-switch input[role="switch"]:checked::after { transform: translateX(20px); }
.sfy-avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--pc, var(--sea)); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.sfy-avatar.is-xs { width: 26px; height: 26px; font-size: 10.5px; }
.sfy-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; font-weight: 750; white-space: nowrap; }
.sfy-tag .sfy-i { width: 14px; height: 14px; }
.sfy-tag.is-danger { background: var(--sfy-red); color: #fff; }
.sfy-tag.is-warn { background: var(--warn-soft); color: var(--warn); }
.sfy-tag.is-home { background: var(--ok-soft); color: var(--ok); }
.sfy-tag.is-going_home { background: var(--sea-soft); color: var(--sea); }
.sfy-count { padding: 2px 10px; border-radius: var(--r-pill); background: var(--surface-2); font-weight: 800; font-size: 13px; }

.sfy-active { display: grid; gap: 10px; }
.sfy-active .sfy-h2 { margin-bottom: 2px; }
.sfy-shares { display: grid; gap: 10px; }
.sfy-share { padding: 14px; border-radius: var(--r-md); background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.sfy-share-top { display: flex; gap: 10px; align-items: flex-start; }
.sfy-share-top .sfy-live-dot { margin-top: 6px; }
.sfy-share-copy { min-width: 0; display: grid; gap: 2px; }
.sfy-share-copy strong { font-weight: 800; font-size: 15.5px; overflow-wrap: anywhere; }
.sfy-share-copy small { color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.sfy-remaining { font-weight: 800; color: var(--ink); }
.sfy-share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sfy-share-actions .button { min-height: 40px; }
.sfy-share-actions .button.ghost { background: var(--surface); }
.sfy-share-actions .sfy-stop { background: var(--sfy-red); box-shadow: none; margin-left: auto; }
.sfy-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); text-decoration: none; text-align: left; }
.sfy-banner > span:nth-child(2) { flex: 1; min-width: 0; }
.sfy-banner strong { display: block; font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.sfy-banner small { display: block; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.sfy-banner > .sfy-i:first-child { width: 24px; height: 24px; }
.sfy-banner > .sfy-i:last-child { color: var(--muted); }
.sfy-banner.is-sos { background: var(--sfy-red); color: #fff; }
.sfy-banner.is-sos small, .sfy-banner.is-sos > .sfy-i:last-child { color: rgba(255,255,255,.9); }
.sfy-banner.is-session { background: var(--sea-soft); }
.sfy-banner.is-session > .sfy-i:first-child { color: var(--sea); }
.sfy-banner.is-live { background: var(--ok-soft); }
.sfy-banner.is-incoming { background: var(--accent-soft); }
.sfy-banner.is-incoming > .sfy-i:first-child { color: var(--accent-deep); }
.sfy-banner.is-alert { background: var(--sfy-red-soft); }
.sfy-banner.is-alert > .sfy-i:first-child { color: var(--sfy-red); }
.sfy-home { margin-bottom: 10px; }

.sfy-contacts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
.sfy-contact { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.sfy-contact-copy { flex: 1; min-width: 0; }
.sfy-contact-copy strong { display: block; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfy-contact-copy small { display: block; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.sfy-contact.is-pending .sfy-avatar { background: var(--surface-3); color: var(--muted); }
.sfy-contact .icon-button { flex: none; width: 44px; height: 44px; }
.sfy-join summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-weight: 750; cursor: pointer; list-style: none; }
.sfy-join summary::-webkit-details-marker { display: none; }
.sfy-join[open] summary { display: none; }
.sfy-join h3 { font-size: 15px; font-weight: 800; }
.sfy-conduct { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.sfy-conduct-box { margin-top: 14px; }
.sfy-conduct-box summary { cursor: pointer; font-weight: 750; font-size: 14px; color: var(--ink-2); padding: 6px 0; }
.sfy-vol .personal-danger { margin-top: 10px; }
.sfy-avail { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.sfy-avail > div { flex: 1 1 160px; min-width: 0; }
.sfy-avail strong { display: block; font-weight: 800; }
.sfy-avail small { display: block; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.sfy-avail .sfy-chips { flex: 1 1 100%; }
.sfy-avail.is-on { background: var(--ok-soft); }
.sfy-alerts { display: grid; gap: 8px; }
.sfy-alert { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--sfy-red-soft); color: var(--ink); text-decoration: none; }
.sfy-alert.is-accepted { background: var(--sea-soft); }
.sfy-alert.is-closed { background: var(--surface-2); opacity: .75; }
.sfy-alert-mark { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 20px; flex: none; }
.sfy-alert-mark.is-lg { width: 56px; height: 56px; font-size: 28px; background: var(--sfy-red-soft); }
.sfy-alert-copy { flex: 1; min-width: 0; }
.sfy-alert-copy strong { display: block; font-weight: 800; }
.sfy-alert-copy small { display: block; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.sfy-alert-state { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface); flex: none; }
.sfy-alert-page { gap: 14px; }
.sfy-alert-head { display: flex; gap: 12px; align-items: flex-start; }
.sfy-alert-title { font: 650 24px/1.12 var(--display); margin: 4px 0 6px; font-stretch: var(--display-stretch);}
.sfy-alert-head p { margin: 0; color: var(--ink-2); font-weight: 650; }
.sfy-alert-actions { display: grid; gap: 10px; }
.sfy-alert-map { height: 280px; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.sfy-rules { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); font-weight: 600; line-height: 1.4; }
.sfy-rules strong { color: var(--ink); }
.sfy-privacy { background: var(--sea-soft); border-color: transparent; box-shadow: none; }
.sfy-privacy .sfy-head-icon { background: var(--surface); color: var(--sea); }
.sfy-invite-card { display: grid; gap: 10px; padding: 22px 18px; border-radius: var(--r-xl); background: var(--surface); border: var(--card-border); box-shadow: var(--card-shadow); }
.sfy-invite-icon { width: 54px; height: 54px; padding: 12px; border-radius: 16px; background: var(--sea-soft); color: var(--sea); }
.sfy-invite-card .app-page-title { font-size: clamp(24px, 7vw, 32px); }
.sfy-sheet { display: grid; gap: 12px; }
.sfy-sheet .field { margin: 0; }
.sfy-sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sfy-sheet-btn { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); font-weight: 750; font-size: 13px; text-decoration: none; }
.sfy-sheet-btn .sfy-i { width: 24px; height: 24px; }
.sfy-sheet-btn.is-wa .sfy-i { color: #1f9d55; }
.sfy-home-tip { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: var(--card-border); color: var(--ink); text-decoration: none; box-shadow: var(--card-shadow); }
.sfy-home-tip > span { flex: 1; min-width: 0; }
.sfy-home-tip strong { display: block; font-weight: 800; }
.sfy-home-tip small { display: block; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.sfy-tip-icon { width: 42px; height: 42px; padding: 9px; border-radius: 50%; background: var(--sfy-red-soft); color: var(--sfy-red); }
.sfy-home-tip > .sfy-i:last-child { color: var(--muted); }
.sfy-sos-pagewrap { gap: 12px; }
.sfy-sos-center { display: grid; place-items: center; padding: 20px 0 8px; }

/* ---------- «Siamo insieme» ---------- */
.sfy-together { gap: 14px; }
.sfy-t-head { display: flex; gap: 12px; align-items: flex-start; }
.sfy-t-emoji { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, var(--gc) 18%, var(--surface)); flex: none; }
.sfy-t-head > div { min-width: 0; }
.sfy-t-head .app-kicker { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfy-t-title { font: 650 26px/1.1 var(--display); margin: 4px 0 4px; overflow-wrap: anywhere; font-stretch: var(--display-stretch);}
.sfy-t-head p { margin: 0; color: var(--ink-2); font-weight: 650; font-size: 14px; }
.sfy-t-map { height: min(56vh, 420px); min-height: 280px; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.sfy-t-map-empty { height: 100%; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--muted); font-weight: 650; }
.sfy-t-status { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sfy-status-btn { min-height: 52px; border-radius: var(--r-md); background: var(--surface); border: 1.5px solid var(--line-strong); font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.sfy-status-btn.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sfy-t-join { padding: 14px; border-radius: var(--r-lg); background: var(--accent-soft); }
.sfy-t-join p { font-size: 14px; }
.sfy-t-alerts { display: grid; gap: 6px; }
.sfy-t-alerts .sfy-note { margin: 0; }
.sfy-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sfy-member-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: var(--r-sm); text-align: left; }
.sfy-member-btn:disabled { opacity: 1; cursor: default; }
.sfy-member-btn:not(:disabled):hover { background: var(--surface-2); }
.sfy-member-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sfy-member-copy strong { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfy-member-copy strong small { color: var(--muted); font-weight: 600; }
.sfy-member-copy > small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.sfy-member.is-off .sfy-avatar { background: var(--surface-3); color: var(--muted); }
.sfy-member.is-stale .sfy-avatar { box-shadow: 0 0 0 2px var(--warn); }
.sfy-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.sfy-t-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.sfy-pin-wrap { background: none; border: 0; }
.sfy-pin { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--pc, var(--sea)); color: #fff; font: 800 13px/1 var(--font); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.sfy-pin.is-me { outline: 3px solid color-mix(in srgb, var(--pc) 45%, transparent); }
.sfy-pin.is-stale { filter: grayscale(.7); opacity: .75; }
.sfy-pin.is-home { border-color: #7be0a8; }
.sfy-pin.is-sos { background: var(--sfy-red); width: 44px; height: 44px; font-size: 12px; letter-spacing: .04em; animation: sfy-pulse 1.8s infinite; }
.sfy-group-card { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 12px 0; border-radius: var(--r-lg); background: var(--sea-soft); color: var(--ink); text-decoration: none; }
.sfy-group-card > span:nth-child(2) { flex: 1; min-width: 0; }
.sfy-group-card strong { display: block; font-weight: 800; }
.sfy-group-card small { display: block; color: var(--ink-2); font-weight: 600; font-size: 12.5px; }
.sfy-group-icon { width: 38px; height: 38px; padding: 8px; border-radius: 50%; background: var(--surface); color: var(--sea); }
.sfy-group-card.is-live { background: var(--ok-soft); }
.sfy-group-card.is-live .sfy-live-dot { margin: 0 8px; }
.sfy-group-card > .sfy-i:last-child { color: var(--muted); }
.grp-pin.sfy-pin-row { text-decoration: none; color: inherit; }

@media (min-width: 700px) {
  .sfy-t-map { height: 440px; }
}

/* ---------- additions: received shares, recipients, responders ---------- */
.sfy-avatar.is-lg { width: 56px; height: 56px; font-size: 19px; }
.sfy-recip.is-wide { display: flex; width: 100%; border-radius: var(--r-md); padding: 8px 12px; min-height: 48px; }
.sfy-recip.is-wide > span:last-child { white-space: normal; line-height: 1.3; }
.sfy-recip small { color: var(--muted); font-weight: 600; }
.sfy-faces { display: inline-flex; flex: none; }
.sfy-faces .sfy-avatar { border: 2px solid var(--surface-2); margin-left: -8px; }
.sfy-faces .sfy-avatar:first-child { margin-left: 0; }
.sfy-coming li { flex-wrap: wrap; }
.sfy-coming-name { flex: 1; min-width: 0; }
.sfy-report { font-size: 12.5px; color: var(--muted); padding: 6px 4px; min-height: 32px; }
.sfy-t-join.is-home { background: var(--ok-soft); }
.sfy-pin.is-going { box-shadow: 0 0 0 3px var(--sea), 0 3px 10px rgba(0,0,0,.3); }
.sfy-share.is-sos { background: var(--sfy-red-soft); border-color: color-mix(in srgb, var(--sfy-red) 25%, transparent); }
.sfy-share.is-sos .sfy-live-dot { background: var(--sfy-red); }
.sfy-rules.sfy-block { margin: 0; padding: 14px 16px 14px 34px; background: var(--sea-soft); border-color: transparent; box-shadow: none; }
.sfy-ok.is-close { color: var(--ink-2); box-shadow: inset 0 0 0 2px var(--line-strong); }
@media (prefers-color-scheme: dark) { .sfy-wau-icon { background: #2a4b57; } }
