/* ==========================================================================
   cernusco.city — design system
   Nessuna build: modificare direttamente questo file (versionato via filemtime).
   ========================================================================== */

:root {
    --bg: #f4f2ec;
    --bg-2: #ebe8df;
    --surface: #ffffff;
    --surface-2: #faf9f5;
    --surface-3: #f3f1ea;
    --ink: #0d1b26;
    --ink-2: #33434f;
    --muted: #66737e;
    --line: rgba(13, 27, 38, 0.09);
    --line-2: rgba(13, 27, 38, 0.16);

    --night: #0a1a26;
    --night-2: #103042;
    --brand: #0b8f6e;
    --brand-ink: #076b52;
    --brand-soft: #dcf3ea;
    --mint: #2ee6a8;
    --accent: #ff5a36;
    --accent-soft: #ffe7e0;
    --sun: #ffb547;
    --sun-soft: #fff2db;
    --sky: #2563eb;
    --sky-soft: #e4ecff;
    --red: #e03131;
    --red-soft: #ffe3e3;
    --amber: #f08c00;
    --amber-soft: #fff1d6;
    --green: #2f9e44;
    --green-soft: #e3f6e6;

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(13, 27, 38, 0.05), 0 2px 10px -4px rgba(13, 27, 38, 0.08);
    --shadow: 0 1px 2px rgba(13, 27, 38, 0.04), 0 18px 40px -18px rgba(13, 27, 38, 0.22);
    --shadow-lg: 0 30px 60px -24px rgba(13, 27, 38, 0.35);

    --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Bricolage Grotesque', 'Inter', ui-sans-serif, system-ui, sans-serif;

    --header-h: 64px;
    --tabbar-h: 0px;
    --dock-h: 0px;
    --container: 1240px;
    --gutter: 20px;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #091017;
        --bg-2: #0d1620;
        --surface: #111b25;
        --surface-2: #14202b;
        --surface-3: #192734;
        --ink: #e8eef3;
        --ink-2: #b9c5cf;
        --muted: #8796a3;
        --line: rgba(255, 255, 255, 0.08);
        --line-2: rgba(255, 255, 255, 0.15);
        --brand: #2bd49b;
        --brand-ink: #5fe8b9;
        --brand-soft: rgba(43, 212, 155, 0.13);
        --accent: #ff7a59;
        --accent-soft: rgba(255, 122, 89, 0.15);
        --sun-soft: rgba(255, 181, 71, 0.14);
        --sky: #7aa7ff;
        --sky-soft: rgba(122, 167, 255, 0.14);
        --red: #ff6b6b;
        --red-soft: rgba(255, 107, 107, 0.14);
        --amber: #ffb547;
        --amber-soft: rgba(255, 181, 71, 0.14);
        --green: #51cf66;
        --green-soft: rgba(81, 207, 102, 0.14);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
        --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #091017;
    --bg-2: #0d1620;
    --surface: #111b25;
    --surface-2: #14202b;
    --surface-3: #192734;
    --ink: #e8eef3;
    --ink-2: #b9c5cf;
    --muted: #8796a3;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.15);
    --brand: #2bd49b;
    --brand-ink: #5fe8b9;
    --brand-soft: rgba(43, 212, 155, 0.13);
    --accent: #ff7a59;
    --accent-soft: rgba(255, 122, 89, 0.15);
    --sun-soft: rgba(255, 181, 71, 0.14);
    --sky: #7aa7ff;
    --sky-soft: rgba(122, 167, 255, 0.14);
    --red: #ff6b6b;
    --red-soft: rgba(255, 107, 107, 0.14);
    --amber: #ffb547;
    --amber-soft: rgba(255, 181, 71, 0.14);
    --green: #51cf66;
    --green-soft: rgba(81, 207, 102, 0.14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv11', 'ss01';
    padding-bottom: calc(var(--tabbar-h) + var(--dock-h));
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.12; font-weight: 750; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--mint); color: var(--night); }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: fixed; left: 12px; top: -60px; z-index: 200;
    background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 10px;
    box-shadow: var(--shadow); font-weight: 600; transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.xsmall { font-size: 0.75rem; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.link { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--brand); }

/* ---------- Header ---------- */
.topbar {
    position: sticky; top: 0; z-index: 60;
    height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.6) blur(16px);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 6px 16px -6px rgba(10, 26, 38, .55); }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 1.32rem; letter-spacing: -0.035em; line-height: 1; }
.brand-word span { color: var(--brand); }
.nav { display: none; align-items: center; gap: 2px; margin-left: 8px; }
.nav a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 12px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; color: var(--ink-2);
    transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--surface); display: inline-grid; place-items: center; color: var(--ink-2);
    transition: background .15s, transform .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn:active { transform: scale(.96); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.live-pill {
    display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    font-weight: 650; font-size: 0.85rem; color: var(--ink); transition: background .15s;
}
.live-pill:hover { background: var(--surface-3); }
.live-pill .play-dot {
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent); color: #fff;
}
.live-pill .play-dot .icon { width: 13px; height: 13px; }

@media (min-width: 1000px) {
    .nav { display: flex; }
}

/* Barra a schede (mobile) */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.6) blur(18px);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border-top: 1px solid var(--line);
}
.tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 0.68rem; font-weight: 650; color: var(--muted); letter-spacing: 0.01em;
}
.tabbar a .icon { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] .tab-ico { background: var(--brand-soft); color: var(--brand-ink); }
.tab-ico { width: 46px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .2s; }
body { --tabbar-h: calc(64px + env(safe-area-inset-bottom)); }
@media (min-width: 1000px) {
    .tabbar { display: none; }
    body { --tabbar-h: 0px; }
}
@media (max-width: 999px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 1000px) {
    .hide-desktop { display: none !important; }
}

/* ---------- Typography blocks ---------- */
.kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 62ch; }
.prose { color: var(--ink-2); max-width: 70ch; }
.prose p + p { margin-top: 12px; }
.prose strong { color: var(--ink); }

/* ---------- Sections ---------- */
main { flex: 1 0 auto; }
.section { padding: 28px 0; }
.section-lg { padding: 44px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.section-head p { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
.section-link {
    display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 0.9rem; color: var(--ink-2);
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); transition: background .15s;
}
.section-link:hover { background: var(--surface-3); color: var(--ink); }

.page-head { padding: 34px 0 10px; }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin-top: 10px; }
.page-head .lead { margin-top: 12px; }
.breadcrumbs { display: flex; gap: 6px; align-items: center; font-size: 0.82rem; color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }

/* ---------- Cards ---------- */
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    min-width: 0;
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 0; }
.card-head h3 { font-size: 1.05rem; }
.card-body { padding: 14px 20px 18px; }
.card-foot {
    padding: 12px 20px; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--muted);
    display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; background: var(--surface-2);
}
.card-foot a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.card-foot a:hover { color: var(--ink); }
a.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-icon {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem;
    background: var(--surface-3); color: var(--ink-2); flex-shrink: 0;
}
.card-icon .icon { width: 20px; height: 20px; }

.grid { display: grid; gap: 16px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.split { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) {
    .split { grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; }
    .split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sticky-col { position: sticky; top: calc(var(--header-h) + 20px); }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2);
    background: var(--surface); font-weight: 650; font-size: 0.92rem; color: var(--ink);
    transition: background .15s, transform .15s, border-color .15s; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--brand)); }
.btn-brand { background: var(--brand); color: #fff; border-color: var(--brand); }
:root[data-theme="dark"] .btn-brand { color: var(--night); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-brand { color: var(--night); } }
.btn-brand:hover { filter: brightness(1.06); background: var(--brand); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.84rem; }
.btn-block { width: 100%; }

/* ---------- Badges & chips ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700; background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge-live { background: var(--accent); color: #fff; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-dot.pulse { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
    100% { box-shadow: 0 0 0 9px transparent; }
}

/* ---------- Hero (home) ---------- */
.hero {
    position: relative; overflow: hidden; color: #fff; isolation: isolate;
    background: radial-gradient(1200px 500px at 85% -10%, rgba(46, 230, 168, .22), transparent 60%),
                radial-gradient(900px 500px at -10% 110%, rgba(255, 181, 71, .16), transparent 60%),
                linear-gradient(160deg, #0d2433 0%, #0a1a26 55%, #08141d 100%);
}
.hero::after {
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='60' viewBox='0 0 240 60'%3E%3Cpath d='M0 30c20-16 40-16 60 0s40 16 60 0 40-16 60 0 40 16 60 0' fill='none' stroke='%232ee6a8' stroke-opacity='.10' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 240px 60px;
    mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
}
.hero-inner { padding-top: 40px; padding-bottom: 34px; }
.hero-date { color: rgba(255, 255, 255, .62); font-weight: 600; font-size: .92rem; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); margin-top: 8px; font-weight: 800; letter-spacing: -0.04em; }
.hero h1 em { font-style: normal; color: var(--mint); }
.hero-sub { margin-top: 12px; color: rgba(255, 255, 255, .72); font-size: 1.06rem; max-width: 56ch; }
.pulse-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pulse-chip {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
    color: #fff; font-size: .86rem; font-weight: 600; white-space: nowrap; transition: background .15s;
}
a.pulse-chip:hover, button.pulse-chip:hover { background: rgba(255, 255, 255, .15); }
.pulse-chip .emoji { font-size: 1.05rem; }
.pulse-chip .status-dot.green { color: #51cf66; }
.pulse-chip .status-dot.orange { color: var(--sun); }
.pulse-chip .status-dot.red { color: #ff6b6b; }
.hero-search {
    margin-top: 24px; display: flex; align-items: center; gap: 10px; max-width: 560px;
    background: #fff; color: var(--night); border-radius: 18px; padding: 6px 6px 6px 16px;
    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6);
}
.hero-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1rem; min-width: 0; height: 44px; color: #0d1b26; }
.hero-search input::placeholder { color: #7b8794; }
.hero-search .icon { color: #66737e; }
.hero-search .btn { background: var(--night); color: #fff; border-color: var(--night); }

/* ---------- Alert ---------- */
.alert {
    display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius);
    background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
}
.alert-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--amber); color: #fff; flex-shrink: 0; }
.alert h2, .alert h3 { font-size: 1rem; line-height: 1.35; font-family: var(--font); font-weight: 700; letter-spacing: 0; }
.alert p { font-size: .9rem; color: var(--ink-2); margin-top: 4px; }

/* ---------- Bento (home) ---------- */
.bento { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bento > * { grid-column: span 2; }
@media (min-width: 640px) {
    .bento > .b-half { grid-column: span 1; }
}
@media (min-width: 640px) and (max-width: 999px) {
    .bento > .b-third:last-child:nth-child(odd) { grid-column: span 2; }
    .bento > .b-third { grid-column: span 1; }
}
@media (min-width: 1000px) {
    .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
    .bento > * { grid-column: span 4; }
    .bento > .b-wide { grid-column: span 8; }
    .bento > .b-half { grid-column: span 6; }
    .bento > .b-third { grid-column: span 4; }
    .bento > .b-quarter { grid-column: span 3; }
    .bento > .b-tall { grid-row: span 2; }
}

/* Meteo */
.weather-card { color: #fff; background: linear-gradient(150deg, #3b82f6 0%, #2563eb 45%, #1e3a8a 100%); border: 0; }
.weather-card.is-night { background: linear-gradient(150deg, #1e3a8a 0%, #172554 60%, #0b1430 100%); }
.weather-card.is-rain { background: linear-gradient(150deg, #64748b 0%, #475569 45%, #1e293b 100%); }
.weather-card.is-sun { background: linear-gradient(150deg, #f59e0b 0%, #f97316 40%, #2563eb 100%); }
.weather-card .card-foot { background: rgba(0, 0, 0, .12); color: rgba(255, 255, 255, .7); border-top-color: rgba(255, 255, 255, .12); }
.weather-now { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.weather-temp { font-family: var(--font-display); font-size: clamp(3.6rem, 9vw, 5.2rem); font-weight: 700; line-height: .9; letter-spacing: -0.05em; }
.weather-temp sup { font-size: .4em; vertical-align: top; position: relative; top: .25em; margin-left: 2px; opacity: .8; }
.weather-emoji { font-size: 3.6rem; line-height: 1; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .25)); }
.weather-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .88rem; color: rgba(255, 255, 255, .85); }
.forecast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.forecast-day {
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px;
    padding: 10px 8px; text-align: center;
}
.forecast-day .d { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.forecast-day .e { font-size: 1.6rem; margin: 4px 0; }
.forecast-day .t { font-weight: 700; font-size: .9rem; }
.forecast-day .t span { opacity: .65; font-weight: 500; }

/* Statistiche grandi */
.big-number { font-family: var(--font-display); font-weight: 700; font-size: 2rem; letter-spacing: -0.04em; line-height: 1; }
.big-number small { font-size: .45em; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.mini-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-width: 0; }
.mini-stat .label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mini-stat .value { font-weight: 750; font-size: 1.25rem; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.mini-stat .hint { font-size: .78rem; color: var(--muted); margin-top: 2px; line-height: 1.35; }

/* Liste a righe */
.rows > * + * { border-top: 1px solid var(--line); }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; }
.row-title { font-weight: 650; line-height: 1.3; }
.row-sub { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.row-end { margin-left: auto; text-align: right; flex-shrink: 0; }
.row-link:hover .row-title { color: var(--brand-ink); }
.rank { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; font-size: .78rem; font-weight: 750; flex-shrink: 0; color: var(--ink-2); }
.rank.gold { background: var(--sun); color: #3d2600; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* Farmacia */
.pharmacy-hero { display: flex; gap: 14px; align-items: flex-start; }
.pharmacy-cross {
    width: 48px; height: 48px; border-radius: 14px; background: var(--green); color: #fff; display: grid; place-items: center;
    flex-shrink: 0; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--green) 70%, transparent);
}
.pharmacy-cross svg { width: 26px; height: 26px; }

/* Metro */
.metro-line { position: relative; padding-left: 4px; }
.metro-line::before { content: ''; position: absolute; left: 13px; top: 18px; bottom: 18px; width: 4px; border-radius: 4px; background: #00953a; opacity: .35; }
.metro-stop { position: relative; display: flex; align-items: center; gap: 14px; padding: 9px 0; }
.metro-stop .stop-dot { width: 22px; height: 22px; border-radius: 50%; background: #00953a; border: 4px solid var(--surface); box-shadow: 0 0 0 2px #00953a; flex-shrink: 0; z-index: 1; }
.metro-stop.is-main .stop-dot { background: var(--surface); }
.metro-stop .stop-name { font-weight: 600; }
.metro-stop.is-main .stop-name { font-weight: 800; }
.metro-stop .stop-link { margin-left: auto; font-size: .8rem; font-weight: 650; color: #00953a; }
:root[data-theme="dark"] .metro-stop .stop-link { color: #51cf66; }
.m2-badge { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #00953a; color: #fff; font-weight: 900; font-size: .85rem; letter-spacing: -0.02em; }

/* Qualità aria / acqua */
.aq-scale { display: flex; gap: 4px; margin-top: 10px; }
.aq-scale span { height: 8px; flex: 1; border-radius: 4px; background: var(--surface-3); }
.aq-scale.green span:nth-child(1) { background: var(--green); }
.aq-scale.orange span:nth-child(-n+2) { background: var(--amber); }
.aq-scale.red span { background: var(--red); }
.stars { display: flex; gap: 2px; color: var(--sun); }
.stars svg { width: 20px; height: 20px; }
.stars .off { color: var(--line-2); }
.level { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; }
.level-green { color: var(--green); } .level-orange { color: var(--amber); } .level-red { color: var(--red); }

/* ---------- News ---------- */
.news-lead {
    position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; min-height: 340px;
    background: var(--night); color: #fff; box-shadow: var(--shadow);
}
.news-lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.news-lead:hover img { transform: scale(1.04); }
.news-lead::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(5, 12, 18, .88) 100%); }
.news-lead-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 24px; }
.news-lead h3 { font-size: clamp(1.35rem, 2.6vw, 2rem); margin-top: 10px; max-width: 30ch; }
.news-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; font-weight: 600; }
.news-lead .news-meta { color: rgba(255, 255, 255, .78); }
.source-tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 750; letter-spacing: .02em; background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-3); }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .thumb img { transform: scale(1.05); }
.news-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card h3 { font-family: var(--font); font-size: .98rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.35; }
.news-card:hover h3 { color: var(--brand-ink); }
.news-card .news-meta { color: var(--muted); margin-top: auto; }
.news-card .source-tag, .news-item .source-tag { background: var(--surface-3); color: var(--ink-2); backdrop-filter: none; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-item { display: flex; gap: 14px; padding: 14px 0; align-items: flex-start; }
.news-item + .news-item { border-top: 1px solid var(--line); }
.news-item .mini-thumb { width: 84px; height: 64px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--surface-3); }
.news-item .mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-item h3 { font-family: var(--font); font-size: .95rem; font-weight: 650; letter-spacing: -0.005em; line-height: 1.35; }
.news-item:hover h3 { color: var(--brand-ink); }
.news-item .news-meta { color: var(--muted); margin-top: 6px; }
.source-col .card-head { padding-bottom: 4px; }
.source-col .card-body { padding-top: 0; }
.source-logo { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; flex-shrink: 0; }

/* Poster Agorà */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 1000px) { .rail { grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; overflow: visible; } }
.poster { display: flex; flex-direction: column; }
.poster .poster-img { aspect-ratio: 2 / 3; overflow: hidden; background: var(--surface-3); }
.poster .poster-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s ease; }
.poster:hover .poster-img img { transform: scale(1.04); }
.poster .body { padding: 12px 14px 14px; }
.poster h3 { font-family: var(--font); font-size: .92rem; font-weight: 700; letter-spacing: -0.005em; line-height: 1.3; margin-top: 6px; }
.poster .when { font-size: .78rem; color: var(--muted); margin-top: 6px; font-weight: 600; }
.poster .when-list { font-size: .78rem; color: var(--ink-2); margin-top: 8px; display: grid; gap: 3px; }

/* ---------- Map teaser ---------- */
.map-teaser {
    position: relative; display: grid; gap: 24px; padding: 28px; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate;
    color: #fff; background: linear-gradient(140deg, #0d2b3c, #0a1a26 60%);
}
.map-teaser::before {
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: .55;
    background-image:
        linear-gradient(rgba(46, 230, 168, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 230, 168, .08) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at 75% 40%, #000, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 75% 40%, #000, transparent 70%);
}
.map-teaser h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.map-teaser p { color: rgba(255, 255, 255, .72); margin-top: 10px; max-width: 48ch; }
.teaser-modes { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.teaser-modes span { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 600; font-size: .85rem; }
.teaser-cats { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.teaser-cats a {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); font-weight: 600; font-size: .9rem; transition: background .15s, transform .15s;
}
.teaser-cats a:hover { background: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.teaser-cats a b { font-variant-numeric: tabular-nums; opacity: .6; font-weight: 600; }
.teaser-pins { position: absolute; right: -20px; top: -20px; width: 300px; height: 300px; z-index: -1; opacity: .9; }
@media (min-width: 1000px) {
    .map-teaser { grid-template-columns: 1.1fr 1fr; padding: 40px; align-items: center; }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.table { font-size: .88rem; }
.table th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 14px; background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Accordion ---------- */
.acc details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.acc details + details { margin-top: 8px; }
.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; font-weight: 700; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .icon { transition: transform .2s; color: var(--muted); }
.acc details[open] summary .icon { transform: rotate(180deg); }
.acc .acc-body { padding: 0 16px 14px; }
.phone-link { color: var(--brand-ink); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.phone-link:hover { text-decoration: underline; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: var(--surface-3); border-radius: 999px; width: max-content; max-width: 100%; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 650; font-size: .86rem; color: var(--muted); white-space: nowrap; }
.tabs [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
[role="tabpanel"][hidden] { display: none; }

/* ---------- Radio ---------- */
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: bottom; transform: scaleY(.3); }
[data-radio="playing"] .eq i { animation: eq .9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s !important; } .eq i:nth-child(3) { animation-delay: -.6s !important; } .eq i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes eq { 0% { transform: scaleY(.25); } 100% { transform: scaleY(1); } }

.radio-card { background: linear-gradient(150deg, #2a1410 0%, #1a0f14 50%, #0a1a26 100%); color: #fff; border: 0; }
.radio-card .card-foot { background: rgba(0, 0, 0, .2); color: rgba(255, 255, 255, .6); border-top-color: rgba(255, 255, 255, .1); }
.radio-card .muted { color: rgba(255, 255, 255, .62); }
.play-btn {
    width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center;
    box-shadow: 0 14px 30px -12px rgba(255, 90, 54, .8); transition: transform .15s, filter .15s; flex-shrink: 0;
}
.play-btn:hover { filter: brightness(1.08); }
.play-btn:active { transform: scale(.95); }
.play-btn .icon { width: 24px; height: 24px; }
.play-btn.lg { width: 84px; height: 84px; }
.play-btn.lg .icon { width: 34px; height: 34px; }
.radio-ico-pause, .radio-ico-load { display: none; }
[data-radio="playing"] .radio-ico-play { display: none; }
[data-radio="playing"] .radio-ico-pause { display: block; }
[data-radio="loading"] .radio-ico-play { display: none; }
[data-radio="loading"] .radio-ico-load { display: block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.on-air-label { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.radio-card .on-air-label { color: #ff8a6b; }

.radio-dock {
    position: fixed; left: 12px; right: 12px; z-index: 65;
    bottom: calc(var(--tabbar-h) + 10px);
    display: none; align-items: center; gap: 12px; padding: 8px 10px 8px 8px;
    background: var(--night); color: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, .08);
    max-width: 560px; margin: 0 auto;
}
[data-radio-dock="open"] .radio-dock { display: flex; }
[data-radio-dock="open"] body { --dock-h: 76px; }
.radio-dock .play-btn { width: 44px; height: 44px; box-shadow: none; }
.radio-dock .play-btn .icon { width: 18px; height: 18px; }
.radio-dock .dock-info { flex: 1; min-width: 0; }
.radio-dock .dock-title { font-weight: 750; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.radio-dock .dock-sub { font-size: .78rem; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-dock .eq { color: var(--accent); height: 14px; }
.radio-dock .icon-btn { background: transparent; border-color: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .8); width: 36px; height: 36px; }
.radio-dock input[type="range"] { width: 90px; accent-color: var(--accent); }
@media (min-width: 1000px) {
    .radio-dock { left: auto; right: 24px; bottom: 24px; }
}

.schedule { position: relative; }
.slot { display: grid; grid-template-columns: 64px 1fr; gap: 14px; padding: 12px 0; }
.slot + .slot { border-top: 1px solid var(--line); }
.slot .time { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.slot.is-now { background: var(--accent-soft); border-radius: 14px; padding: 12px; margin: 4px -12px; border-top-color: transparent; }
.slot.is-now + .slot { border-top-color: transparent; }
.slot.is-now .time { color: var(--accent); }
.slot h3 { font-family: var(--font); font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.slot p { font-size: .88rem; color: var(--muted); margin-top: 2px; }

/* ---------- Footer ---------- */
.footer { margin-top: 48px; background: var(--night); color: rgba(255, 255, 255, .7); padding: 44px 0 36px; font-size: .88rem; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer .brand-word { color: #fff; }
.footer .brand-word span { color: var(--mint); }
.footer h2 { font-family: var(--font); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .45); font-weight: 700; margin-bottom: 12px; }
.footer li + li { margin-top: 8px; }
.footer a:hover { color: #fff; }
.footer .legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .78rem; color: rgba(255, 255, 255, .45); display: grid; gap: 6px; }
.footer .legal a { color: var(--mint); }

/* ---------- Empty / notice ---------- */
.empty { padding: 22px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); text-align: center; font-size: .92rem; }
.toast {
    position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--dock-h) + 18px); transform: translate(-50%, 20px); z-index: 120;
    background: var(--night); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-lg);
    font-size: .9rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: min(92vw, 440px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Turbo progress bar nel colore del brand */
.turbo-progress-bar { height: 3px; background: linear-gradient(90deg, var(--brand), var(--mint)); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ==========================================================================
   Mappa (app a schermo intero)
   ========================================================================== */
.page-mappa .footer { display: none; }
.map-app {
    position: relative;
    height: calc(100dvh - var(--header-h) - var(--tabbar-h) - var(--dock-h));
    min-height: 460px;
    display: grid;
    grid-template-columns: 1fr;
}
.map-canvas { position: absolute; inset: 0; z-index: 0; background: var(--bg-2); }
.map-canvas .leaflet-container { font-family: var(--font); background: var(--bg-2); }
.leaflet-container a { color: inherit; }
.map-canvas .leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--muted); border-radius: 8px 0 0 0; }
.map-canvas .leaflet-control-attribution a { color: var(--ink-2); }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a { width: 40px !important; height: 40px !important; line-height: 40px !important; background: var(--surface) !important; color: var(--ink) !important; border-bottom-color: var(--line) !important; font-size: 18px !important; }
.leaflet-bar a:hover { background: var(--surface-3) !important; }
.map-canvas .leaflet-tile-pane { filter: saturate(.8) contrast(1.02); }
.map-canvas.map-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.55); }

.map-panel {
    position: absolute; z-index: 10; left: 12px; right: 12px; top: 12px;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.map-panel > * { pointer-events: auto; }
.map-search {
    display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 8px 0 16px;
    background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.map-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1rem; height: 100%; }
.map-search .icon { color: var(--muted); }
.map-search .icon-btn { width: 38px; height: 38px; border: 0; }
.map-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.map-chips::-webkit-scrollbar { display: none; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    font-size: .84rem; font-weight: 650; white-space: nowrap; flex-shrink: 0; transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { background: var(--surface-3); }
.chip .n { font-size: .74rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] .n { color: color-mix(in srgb, var(--bg) 70%, transparent); }

.search-results {
    background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line);
    max-height: min(52vh, 420px); overflow-y: auto; padding: 6px;
}
.search-results[hidden] { display: none; }
.result {
    width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 0; background: transparent; text-align: left;
}
.result:hover, .result[aria-selected="true"] { background: var(--surface-3); }
.result .r-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; flex-shrink: 0; background: var(--surface-3); }
.result .r-title { font-weight: 650; font-size: .94rem; line-height: 1.25; }
.result .r-sub { font-size: .8rem; color: var(--muted); }
.result-empty { padding: 14px; color: var(--muted); font-size: .9rem; }

.map-sheet {
    position: absolute; z-index: 12; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -18px 40px -20px rgba(0, 0, 0, .35);
    max-height: 62%; display: flex; flex-direction: column; transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    border: 1px solid var(--line); border-bottom: 0;
}
.map-sheet.open { transform: translateY(0); }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 2px; flex-shrink: 0; }
.sheet-body { overflow-y: auto; padding: 8px 18px 18px; }
.sheet-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-2); }

@media (min-width: 900px) {
    .map-panel { right: auto; width: 400px; left: 16px; top: 16px; }
    .map-sheet {
        left: 16px; right: auto; top: auto; bottom: 16px; width: 400px; border-radius: 20px; border-bottom: 1px solid var(--line);
        max-height: calc(100% - 150px); transform: translateX(calc(-100% - 30px));
    }
    .map-sheet.open { transform: translateX(0); }
    .sheet-grip { display: none; }
}

.place-cat { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.place-name { font-size: 1.35rem; margin-top: 6px; padding-right: 36px; }
.place-meta { margin-top: 12px; display: grid; gap: 8px; font-size: .9rem; color: var(--ink-2); }
.place-meta .flex { align-items: flex-start; }
.place-meta .icon { margin-top: 3px; color: var(--muted); }
.place-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.route-form { display: grid; gap: 8px; position: relative; }
.route-field { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px; border-radius: 12px; background: var(--surface-3); }
.route-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: .95rem; }
.route-field .pin { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.route-field .pin.a { background: var(--surface); border: 3px solid var(--sky); }
.route-field .pin.b { background: var(--accent); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.route-field .icon-btn { width: 30px; height: 30px; border: 0; background: transparent; }
.route-swap { position: absolute; right: -6px; top: 31px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.route-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.route-mode {
    border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px 6px; display: grid; justify-items: center; gap: 2px;
    font-size: .8rem; font-weight: 650; color: var(--ink-2);
}
.route-mode .m-emoji { font-size: 1.25rem; line-height: 1.2; }
.route-mode .m-time { font-variant-numeric: tabular-nums; font-weight: 750; color: var(--ink); min-height: 1.2em; }
.route-mode[aria-pressed="true"] { border-color: var(--sky); background: var(--sky-soft); }
.route-summary { margin-top: 14px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.route-summary .big { font-family: var(--font-display); font-size: 1.8rem; font-weight: 750; letter-spacing: -0.03em; }
.route-steps { margin-top: 10px; }
.route-step { display: flex; gap: 12px; padding: 10px 6px; border-radius: 10px; width: 100%; border: 0; background: transparent; text-align: left; align-items: flex-start; }
.route-step:hover { background: var(--surface-3); }
.route-step + .route-step { border-top: 1px solid var(--line); }
.route-step .s-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--sky-soft); color: var(--sky); display: grid; place-items: center; flex-shrink: 0; font-weight: 800; }
.route-step .s-ico svg { width: 18px; height: 18px; }
.route-step .s-text { font-size: .9rem; line-height: 1.35; }
.route-step .s-dist { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.route-note { margin-top: 12px; font-size: .78rem; color: var(--muted); }

.map-fab { position: absolute; z-index: 9; right: 12px; bottom: 24px; display: grid; gap: 8px; }
.map-fab .icon-btn { width: 46px; height: 46px; border-radius: 14px; box-shadow: var(--shadow); background: var(--surface); }
.map-fab .fab-route { background: var(--sky); color: #fff; border-color: var(--sky); }
.map-fab .icon-btn.active { color: var(--sky); }

.poi-pin { position: relative; width: 34px; height: 42px; }
.poi-pin .pin-body {
    position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
    background: var(--c); box-shadow: 0 4px 10px -2px rgba(0, 0, 0, .35); border: 2px solid #fff;
}
.poi-pin .pin-emoji { position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; font-size: 16px; line-height: 1; }
.poi-pin.active .pin-body { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent), 0 6px 14px -2px rgba(0, 0, 0, .4); }
.poi-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.cluster-icon {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .85rem;
    background: var(--night); border: 3px solid #fff; box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .45);
}
:root[data-theme="dark"] .cluster-icon { background: var(--brand); color: var(--night); border-color: var(--night); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cluster-icon { background: var(--brand); color: var(--night); border-color: var(--night); } }
.user-dot { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37, 99, 235, .25), 0 2px 6px rgba(0, 0, 0, .3); }
.route-pin { width: 22px; height: 22px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.route-pin.a { background: #2563eb; }
.route-pin.b { background: var(--accent); }
.map-ctx { position: absolute; z-index: 30; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px; min-width: 190px; }
.map-ctx button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 0; background: transparent; border-radius: 8px; font-weight: 600; font-size: .9rem; text-align: left; }
.map-ctx button:hover { background: var(--surface-3); }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; color: var(--muted); font-weight: 600; }

.places-index { padding: 40px 0 10px; }
.places-index details { border-top: 1px solid var(--line); }
.places-index summary { cursor: pointer; padding: 14px 0; font-weight: 700; display: flex; gap: 10px; align-items: center; list-style: none; }
.places-index summary::-webkit-details-marker { display: none; }
.places-index ul { columns: 1; column-gap: 28px; padding-bottom: 14px; font-size: .9rem; }
@media (min-width: 700px) { .places-index ul { columns: 2; } }
@media (min-width: 1000px) { .places-index ul { columns: 3; } }
.places-index li { break-inside: avoid; padding: 4px 0; }
.places-index li a:hover { color: var(--brand-ink); text-decoration: underline; }
.page-mappa .places-wrap { background: var(--bg); }
.card.prose { max-width: none; }
