/* UnaDies: stile del sito (derivato dal prototipo approvato). */
/* Layout: barra di ricerca in alto, poi lista abbinamenti a sinistra e mappa a destra (su telefono: mappa sopra, lista sotto). */
:root {
  --bg: #F7F6F3; --surface: #FFFFFF; --surface-2: #F1EFEA; --fg: #1E2226; --muted: #5A626B; --line: #E3E0D9; --line-2: #CFCBC2;
  --accent: #B5472A; --accent-hover: #9C3B21; --accent-soft: #FBECE5; --accent-ink: #84301A; --on-accent: #FFFFFF;
  --navy: #1F3A5F; --navy-soft: #E5ECF5; --navy-ink: #17304F; --on-navy: #FFFFFF;
  --ok: #1B7449; --ok-soft: #E2F2E8; --warn: #8F5E00; --warn-soft: #FAEFD6; --warn-dot: #D49A1E; --bad: #A32D2D; --bad-soft: #FBE9E9;
  --map-land: #EDEFE8; --map-road: #FFFFFF; --map-road-2: #F8F8F4; --map-water: #D3E2EA; --map-park: #DCE7D1; --map-label: #7A8176; --map-zone: #B5472A;
  --pin-church: #1F3A5F; --pin-venue: #B5472A; --pin-off: #A7ACB1; --pin-ring: #FFFFFF;
  --h0: #EFEAE6; --h0-ink: #8D8589; --h1: #FBEAF0; --h2: #F4C0D1; --h3: #ED93B1; --h4: #D4537E; --h-ink: #72243E; --h4-ink: #FFFFFF; --rite: #C2456F;
  --overlay: rgba(20, 22, 26, 0.45);
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --r: 10px; --r-lg: 14px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #141618; --surface: #1C1F22; --surface-2: #24282C; --fg: #ECEDEE; --muted: #A4ABB3; --line: #30353A; --line-2: #444A50;
  --accent: #E17B58; --accent-hover: #EB9474; --accent-soft: #3A231B; --accent-ink: #F4B49C; --on-accent: #1B0E09;
  --navy: #8FB4E2; --navy-soft: #1D2A3A; --navy-ink: #BCD3EF; --on-navy: #0E1A2B;
  --ok: #63C690; --ok-soft: #17301F; --warn: #E8B55A; --warn-soft: #34290F; --warn-dot: #E0A63A; --bad: #F09595; --bad-soft: #3A1B1B;
  --map-land: #1E231F; --map-road: #30372F; --map-road-2: #2A3029; --map-water: #172833; --map-park: #223024; --map-label: #8C9589; --map-zone: #E17B58;
  --pin-church: #5D8CC8; --pin-venue: #D9693F; --pin-off: #4D5358; --pin-ring: #141618;
  --h0: #24282C; --h0-ink: #7E858C; --h1: #3A1F29; --h2: #5C2438; --h3: #8A3456; --h4: #D4537E; --h-ink: #F7D3DF; --h4-ink: #FFFFFF; --rite: #E07A9C;
  --overlay: rgba(0, 0, 0, 0.6); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #141618; --surface: #1C1F22; --surface-2: #24282C; --fg: #ECEDEE; --muted: #A4ABB3; --line: #30353A; --line-2: #444A50;
  --accent: #E17B58; --accent-hover: #EB9474; --accent-soft: #3A231B; --accent-ink: #F4B49C; --on-accent: #1B0E09;
  --navy: #8FB4E2; --navy-soft: #1D2A3A; --navy-ink: #BCD3EF; --on-navy: #0E1A2B;
  --ok: #63C690; --ok-soft: #17301F; --warn: #E8B55A; --warn-soft: #34290F; --warn-dot: #E0A63A; --bad: #F09595; --bad-soft: #3A1B1B;
  --map-land: #1E231F; --map-road: #30372F; --map-road-2: #2A3029; --map-water: #172833; --map-park: #223024; --map-label: #8C9589; --map-zone: #E17B58;
  --pin-church: #5D8CC8; --pin-venue: #D9693F; --pin-off: #4D5358; --pin-ring: #141618;
  --h0: #24282C; --h0-ink: #7E858C; --h1: #3A1F29; --h2: #5C2438; --h3: #8A3456; --h4: #D4537E; --h-ink: #F7D3DF; --h4-ink: #FFFFFF; --rite: #E07A9C;
  --overlay: rgba(0, 0, 0, 0.6); color-scheme: dark; }
body[data-rite="comunione"] { --h1: #EEEDFE; --h2: #CECBF6; --h3: #AFA9EC; --h4: #6F66D6; --h-ink: #3C3489; --rite: #6F66D6; }
body[data-rite="battesimo"] { --h1: #E6F1FB; --h2: #B5D4F4; --h3: #85B7EB; --h4: #2F7FD0; --h-ink: #0C447C; --rite: #2F7FD0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body[data-rite="comunione"] { --h1: #26234A; --h2: #3C3489; --h3: #534AB7; --h4: #7F77DD; --h-ink: #DCD9FA; --rite: #A39DF0; }
  :root:not([data-theme="light"]) body[data-rite="battesimo"] { --h1: #10283F; --h2: #0C447C; --h3: #185FA5; --h4: #378ADD; --h-ink: #CFE2F7; --rite: #7FB4EA; } }
:root[data-theme="dark"] body[data-rite="comunione"] { --h1: #26234A; --h2: #3C3489; --h3: #534AB7; --h4: #7F77DD; --h-ink: #DCD9FA; --rite: #A39DF0; }
:root[data-theme="dark"] body[data-rite="battesimo"] { --h1: #10283F; --h2: #0C447C; --h3: #185FA5; --h4: #378ADD; --h-ink: #CFE2F7; --rite: #7FB4EA; }

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--fg); }
body { font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1320px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ic.sm { width: 15px; height: 15px; vertical-align: -3px; }
.num { font-variant-numeric: tabular-nums; }

.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
/* Àncore (#ordine, #cancellazione, #come-funziona…) e campi raggiunti con Tab: si fermano sotto l'header fisso, non dietro (TST-070).
   --hdr è l'altezza vera dell'header, che app.js tiene aggiornata; qui i valori di partenza: una riga, due sul telefono. */
html { scroll-padding-top: calc(var(--hdr, 61px) + env(safe-area-inset-top, 0px) + 12px); }
@media (max-width: 560px) { :root { --hdr: 86px; } }
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.logo { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--fg); text-decoration: none; letter-spacing: 0.2px; white-space: nowrap; }
.logo em { color: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav button { background: none; border: 0; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.nav button:hover { color: var(--fg); background: var(--surface-2); }
.nav button[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.badge { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; font-weight: 600; }

.hero { padding-block: 28px 18px; display: grid; gap: 6px; }
.hero h1, .page-h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.05; letter-spacing: -0.3px; }
.hero h1 em, .page-h1 em { font-style: italic; color: var(--accent); }
.hero p, .lead { color: var(--muted); max-width: 64ch; font-size: 16px; }

.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo .mark { width: 42px; height: 26px; flex: none; }
.mark .ln { stroke: var(--fg); fill: none; stroke-linecap: round; }
.mark .hl { stroke: var(--accent); fill: none; stroke-linecap: round; }
.mark .gn { fill: var(--fg); }
.authbtn { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; height: 38px; padding: 0 12px 0 4px; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; flex: none; }
.authbtn.out { padding: 0 16px; }
.authbtn:hover { background: var(--surface-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-soft); color: var(--navy-ink); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.res-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.btn.saved { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.area-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.area-head .who { display: grid; gap: 2px; min-width: 0; }
.area-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.saved, .feed { display: grid; gap: 10px; }
.sv { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 8px; }
.sv-t { font-weight: 600; }
.sv-m { font-size: 13px; color: var(--muted); }
.delta { font-size: 12.5px; font-weight: 600; color: var(--ok); }
.fd { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.fd:last-child { border-bottom: 0; padding-bottom: 0; }
.fd small { color: var(--muted); display: block; font-size: 12.5px; }
.sec-h { font-family: var(--serif); font-size: 27px; font-weight: 500; }
.gbtn { height: 46px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.gbtn:hover { background: var(--surface-2); }
.fb-logo { width: 20px; height: 20px; flex: none; }
.topout { margin: 0; display: flex; flex: none; }
button.authbtn { font: inherit; font-weight: 500; color: var(--fg); cursor: pointer; }
.profiles { display: grid; gap: 8px; }
.profile { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--surface); text-align: left; width: 100%; }
.profile:hover { border-color: var(--line-2); background: var(--surface-2); }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--accent); }
.rite-pick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.rite-q { flex: 1 1 100%; font-size: 13px; color: var(--muted); font-weight: 500; }
.rite-pick .dot { grid-row: 1 / span 2; width: 12px; height: 12px; }
.rite-pick b { font-size: 16px; font-weight: 600; }
.rite-pick small { font-size: 13px; color: var(--muted); }
.rule { font-size: 13.5px; background: var(--surface-2); border-radius: var(--r); padding: 8px 12px; margin-top: 4px; }
.halls { font-size: 13px; color: var(--muted); }
.halls b { color: var(--fg); font-weight: 600; }
.sheet.wide { width: min(820px, 100%); }
.fs { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; min-width: 0; }
.fs legend { font-weight: 600; padding: 0 6px; display: flex; gap: 8px; align-items: center; }
.previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.msg .bubble { white-space: pre-line; }
.reply { display: grid; gap: 8px; }
textarea.ctl.bubble-edit { width: 100%; height: auto; min-height: 240px; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; resize: vertical; background: var(--surface); }
.edit-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.reply .row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.reply .ctl { width: 100%; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > label, .field > .lbl { font-size: 12.5px; color: var(--muted); font-weight: 500; letter-spacing: 0.2px; }
.ctl { height: 40px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); padding: 0 10px; min-width: 0; }
.ctl:hover { border-color: var(--muted); }
input.ctl[type="number"] { width: 96px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.matrimonio { background: #D4537E; } .dot.comunione { background: #7F77DD; } .dot.battesimo { background: #378ADD; }

.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-head h2 { font-family: var(--serif); font-size: 26px; font-weight: 500; text-transform: capitalize; min-width: 170px; }
.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); }
.iconbtn:hover { background: var(--surface-2); }
.cal-legend { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-left: auto; }
.cal-legend span.sw { width: 14px; height: 14px; border-radius: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-dow { font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 2px; }
.cal-day { border: 0; border-radius: 10px; min-height: 58px; padding: 6px 8px; text-align: left; display: grid; align-content: space-between; background: var(--h0); color: var(--h0-ink); position: relative; }
.cal-day .n { font-size: 13px; font-weight: 500; }
.cal-day .c { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-day .c small { font-size: 11px; font-weight: 500; }
/* Oltre 999 abbinamenti la casella mostra la forma breve, «14» e sotto «mila», che ci sta anche a 375 px (TST-081). */
.cal-day .c .u { display: block; font-size: 10px; font-weight: 500; line-height: 1.1; }
.cal-day.l1 { background: var(--h1); color: var(--h-ink); } .cal-day.l2 { background: var(--h2); color: var(--h-ink); }
.cal-day.l3 { background: var(--h3); color: var(--h-ink); } .cal-day.l4 { background: var(--h4); color: var(--h4-ink); }
.cal-day.past { opacity: 0.45; cursor: default; }
.cal-day.sel { box-shadow: 0 0 0 2px var(--fg); }
.cal-day .lit { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.55; }
.cal-note { font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }

.reslist { display: grid; gap: 10px; }
.pair { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 10px; transition: border-color .15s; }
.pair:hover, .pair.hl { border-color: var(--line-2); box-shadow: 0 0 0 1px var(--line-2); }
.pair-rows { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; }
.ent { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.ent-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ent-ic.chiesa { background: var(--navy-soft); color: var(--navy); } .ent-ic.locale { background: var(--accent-soft); color: var(--accent); }
.ent-name { font-weight: 600; line-height: 1.25; }
.ent-meta { font-size: 13px; color: var(--muted); }
.travel { grid-row: 1 / span 2; grid-column: 2; align-self: center; display: grid; justify-items: center; gap: 2px; font-size: 12.5px; color: var(--muted); padding: 6px 10px; border-radius: var(--r); background: var(--surface-2); }
.travel b { font-size: 17px; color: var(--fg); font-weight: 600; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { font-size: 13px; border-radius: 999px; padding: 3px 10px; background: var(--surface-2); color: var(--fg); white-space: nowrap; }
.fresh { font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.fresh span { display: inline-flex; align-items: center; gap: 6px; }
.fresh i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--ok); }
.fresh .ok i { background: var(--muted); } .fresh .stale { color: var(--warn); } .fresh .stale i { background: var(--warn-dot); }
.pair-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 500; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.btn.no { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13.5px; }
.empty { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 22px; display: grid; gap: 8px; }
.empty h3 { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.empty p { color: var(--muted); }

.btn.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.overlay { position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sheet { background: var(--surface); border-radius: 18px; width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 22px; display: grid; gap: 16px; position: relative; }
.sheet h2 { font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.1; padding-right: 40px; }
.sheet .close { position: absolute; top: 14px; right: 14px; }
.sheet .sub { color: var(--muted); }
.block { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 8px; }
.block h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; } /* siti ed email lunghi vanno a capo su telefono (Tester, TST-020, 6/11/2026) */
.slotlist { display: flex; flex-wrap: wrap; gap: 6px; }
.slot { font-size: 13px; border-radius: 999px; padding: 4px 11px; border: 1px solid var(--line-2); background: var(--surface); }
.slot.free { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.slot.busy { background: var(--surface-2); color: var(--muted); text-decoration: line-through; border-color: transparent; }
button.slot:hover { border-color: var(--fg); }
.form { display: grid; gap: 12px; }
.form .row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form input.ctl, .form textarea.ctl { width: 100%; }
.form textarea.ctl { height: auto; min-height: 76px; padding: 9px 10px; resize: vertical; }
.err { color: var(--bad); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--accent); }
/* Bollino in Gestione: tre stili da scegliere, con l'anteprima */
.badge-pick { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.badge-opt { display: grid; gap: 8px; justify-items: start; cursor: pointer; font-size: 14px; font-weight: 500; }
.badge-opt input { position: absolute; opacity: 0; pointer-events: none; }
.badge-prev { display: grid; place-items: center; min-height: 96px; min-width: 248px; padding: 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.badge-prev img { display: block; width: auto; max-width: 100%; }
.badge-opt input:checked + .badge-prev { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.badge-opt input:focus-visible + .badge-prev { outline: 2px solid var(--accent); outline-offset: 2px; }
.badge-code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
/* Servizi in Gestione: caselle su più colonne in un riquadro */
.feat-set { border: 1px solid var(--line); border-radius: 12px; padding: 8px 16px 16px; margin: 0; min-width: 0; display: grid; gap: 8px; }
.feat-set legend { font-weight: 600; font-size: 14px; padding: 0 4px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }

.page { padding-block: 28px 48px; display: grid; gap: 22px; }
.reqs { display: grid; gap: 14px; }
.req { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 14px; }
.req-head { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; align-items: baseline; }
.req-head h3 { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.party { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 10px; align-content: start; }
.status { font-size: 13px; font-weight: 600; border-radius: 999px; padding: 3px 10px; display: inline-flex; gap: 6px; align-items: center; width: fit-content; }
.status.wait { background: var(--warn-soft); color: var(--warn); }
.status.yes { background: var(--ok-soft); color: var(--ok); }
.status.no { background: var(--bad-soft); color: var(--bad); }
/* Parte già prenotata da chi scrive (stage63): non è una risposta, colore neutro. */
.status.own { background: var(--surface-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.msg { background: var(--surface-2); border-radius: 12px; padding: 12px; display: grid; gap: 8px; font-size: 14px; }
.msg .from { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.msg .bubble { background: var(--surface); border-radius: 12px 12px 12px 4px; padding: 10px 12px; border: 1px solid var(--line); }
.msg .acts { display: flex; gap: 8px; flex-wrap: wrap; }

.mgr-top { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.mgr-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 12px; }
.card h2 { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.card .sub { color: var(--muted); font-size: 14px; }
.mail { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mail-h { background: var(--surface-2); padding: 10px 14px; font-size: 13px; color: var(--muted); display: grid; gap: 2px; }
.mail-h b { color: var(--fg); font-weight: 600; }
.mail-b { padding: 16px; display: grid; gap: 12px; font-size: 14.5px; }
.mail-dates { display: grid; gap: 6px; }
.mail-date { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); font-size: 14px; }
.editor { display: grid; gap: 8px; }
.ed-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ed-row:last-child { border-bottom: 0; }
.ed-date { font-size: 14px; font-weight: 500; }
.ed-date small { display: block; color: var(--muted); font-weight: 400; text-transform: none; }
.prefs { display: grid; gap: 10px; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row label { border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.radio-row input { accent-color: var(--accent); }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.how div { background: var(--surface-2); border-radius: var(--r); padding: 12px; font-size: 14px; display: grid; gap: 4px; }
.how b { font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; max-width: calc(100% - 32px); box-shadow: 0 4px 16px rgba(0,0,0,.2); }

@media (max-width: 900px) {
  .mgr-grid { grid-template-columns: minmax(0, 1fr); }
  .area-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .topbar-in { gap: 10px; }
  .logo { font-size: 22px; }
  .nav button { padding: 7px 9px; font-size: 14px; }
  .nav .long { display: none; }
  .authbtn .nm { display: none; }
  .authbtn { padding: 0 3px; }
  .authbtn.out { padding: 0 12px; }
  .logo .mark { width: 32px; height: 20px; }
  .cal-day { min-height: 48px; padding: 4px 5px; } .cal-day .c { font-size: 15px; } .cal-day .c small { display: none; }
  .cal-legend { margin-left: 0; }
  .overlay { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 18px 18px 0 0; max-height: 90vh; padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .ed-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Sito reale: caratteri locali, struttura, mappa Leaflet ---------- */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/figtree-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/figtree-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/figtree-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 600; font-display: swap; src: url('../fonts/cormorant-garamond-latin-600-italic.woff2') format('woff2'); }

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent-ink); }
a:hover { color: var(--accent); }
img, svg { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

.logo .mark { width: 42px; height: 26px; flex: none; }
.mark .ln { stroke: var(--fg); fill: none; stroke-linecap: round; }
.mark .hl { stroke: var(--accent); fill: none; stroke-linecap: round; }
.mark .gn { fill: var(--fg); }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; padding: 8px 12px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.authbtn { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; height: 38px; padding: 0 12px 0 4px; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; flex: none; text-decoration: none; color: var(--fg); }
.authbtn.out { padding: 0 16px; }
.authbtn:hover { background: var(--surface-2); color: var(--fg); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-soft); color: var(--navy-ink); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.langsw { position: relative; }
.langsw select { height: 34px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 8px; font-size: 13.5px; color: var(--fg); }

.flash { background: var(--ok-soft); color: var(--ok); padding-block: 10px; font-weight: 500; }
.flash.err { background: var(--bad-soft); color: var(--bad); }

.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; }
.footer-in { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 24px; padding-block: 28px; font-size: 14px; }
.footer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer a { color: var(--fg); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer .fine { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-block: 14px; }

.section { padding-block: 34px; }
.section h2.big { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 38px); font-weight: 500; line-height: 1.1; margin-bottom: 14px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 6px; align-content: start; }
.step b { font-weight: 600; font-size: 16px; }
.step p { color: var(--muted); }
.cta-band { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; gap: 18px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.cta-band h2 { font-family: var(--serif); font-weight: 500; font-size: 28px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-link { border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; text-decoration: none; color: var(--fg); background: var(--surface); font-size: 14px; }
.chip-link:hover { border-color: var(--fg); color: var(--fg); }

#map.leaflet-container { width: 100%; height: 100%; background: var(--map-land); font: inherit; cursor: grab; }
#map.drawing, #map.drawing .leaflet-interactive { cursor: crosshair; }
.leaflet-control-attribution { font-size: 11px; }
.ud-pin { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2.5px solid var(--pin-ring); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.ud-pin svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ud-pin.church { background: var(--pin-church); } .ud-pin.venue { background: var(--pin-venue); } .ud-pin.off { background: var(--pin-off); }
.ud-pin.hot { transform: scale(1.25); }
.leaflet-tooltip.ud-tip { font-family: var(--sans); font-size: 13px; border-radius: 8px; }
.ud-mins { background: var(--navy); color: var(--surface); border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }

.entity-head { display: grid; gap: 8px; padding-block: 26px 10px; }
.entity-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4vw, 46px); line-height: 1.05; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.vbadge { font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 3px 10px; display: inline-flex; gap: 6px; align-items: center; }
.vbadge.ok { background: var(--ok-soft); color: var(--ok); } .vbadge.no { background: var(--warn-soft); color: var(--warn); } .vbadge.n { background: var(--surface-2); color: var(--muted); }
.vbadge.bad { background: var(--bad-soft); color: var(--bad); }
/* Struttura chiusa: avviso ben visibile sotto il nome, con la ricerca nella zona */
.closed-note { margin-top: 16px; padding: 16px; border: 1px solid var(--bad); border-radius: 12px; background: var(--bad-soft); color: var(--fg); display: grid; gap: 8px; max-width: 70ch; }
.closed-note > b { color: var(--bad); font-size: 16px; }
.closed-note p { margin: 0; }
.closed-note .pair-actions { align-items: center; }
.entity-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ent-photo { position: relative; margin: 6px 0 18px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.ent-photo img { display: block; width: 100%; height: clamp(200px, 30vw, 360px); object-fit: cover; background: var(--surface-2); cursor: zoom-in; }
/* Foto ritagliata: il pulsante (e un tocco sulla foto) la apre intera */
.ph-full { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 999px; background: rgba(20, 22, 26, .72); color: #fff; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.ph-full:hover { background: rgba(20, 22, 26, .88); }
.ph-full:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(20, 22, 26, .72); }
.ph-view { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 56px 16px 16px; border: 0; background: transparent;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.ph-view[open] { display: flex; }
.ph-view::backdrop { background: rgba(10, 12, 14, .9); }
.ph-view img { max-width: min(100%, 1600px); max-height: calc(100vh - 120px); width: auto; height: auto; object-fit: contain; border-radius: 6px; background: transparent; }
.ph-view .ph-cap { margin: 0; color: #e6e7e8; font-size: 13px; text-align: center; max-width: 70ch; }
.ph-view .ph-cap a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ph-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.ph-x:hover { background: rgba(255, 255, 255, .26); }
.ph-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .ph-view[open] img { animation: ph-in 150ms ease-out; } }
@keyframes ph-in { from { opacity: 0; } to { opacity: 1; } }
.ent-photo figcaption { font-size: 12px; line-height: 1.4; color: var(--muted); padding: 8px 12px; }
.ent-photo figcaption a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.photo-edit { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.photo-edit > div { flex: 1 1 280px; }
.photo-prev { width: 240px; max-width: 100%; height: 160px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); }
.ent-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); }
.minimap { height: 300px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.breadcrumb { font-size: 13.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; padding-top: 18px; }
.breadcrumb a { color: var(--muted); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; }
.form .ctl, .form select.ctl { width: 100%; }
.form .inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form .inline .ctl { width: auto; }
.note { font-size: 13px; color: var(--muted); }
.code-input { font-size: 24px; letter-spacing: 8px; text-align: center; width: 220px !important; font-variant-numeric: tabular-nums; }
.answer-big { display: grid; gap: 10px; max-width: 520px; }
.answer-big .btn { height: 52px; font-size: 16px; justify-content: center; }
.prose { max-width: 72ch; display: grid; gap: 12px; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; margin-top: 10px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

@media (max-width: 900px) {
  .footer-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .entity-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .authbtn .nm { display: none; }
  .authbtn { padding: 0 3px; }
  .authbtn.out { padding: 0 12px; }
  .logo .mark { width: 32px; height: 20px; }
  .langsw select { width: 56px; }
  .footer-in { grid-template-columns: minmax(0, 1fr); }
}
.proto { font-size: 12.5px; color: var(--muted); background: var(--warn-soft); border-bottom: 1px solid var(--line); padding-block: 6px; }
.langsw summary { list-style: none; cursor: pointer; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; }
.langsw summary::-webkit-details-marker { display: none; }
.langsw[open] .langmenu { display: grid; }
/* Con la tendina aperta la barra in alto sale sopra la barra di ricerca sulla mappa (.qbar, z-index 850), altrimenti la copre (5/11/2026) */
.topbar:has(.langsw[open]) { z-index: 1100; }
.langmenu { display: none; position: absolute; right: 0; top: 40px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; min-width: 140px; z-index: 40; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.langmenu a { padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--fg); font-size: 14px; }
.langmenu a:hover, .langmenu a[aria-current="true"] { background: var(--surface-2); }
[hidden] { display: none !important; }
.rite-pick label { flex: 1 1 210px; text-align: left; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-lg); padding: 12px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 10px; align-items: center; cursor: pointer; position: relative; }
.rite-pick label:hover { border-color: var(--muted); }
.rite-pick label input { position: absolute; opacity: 0; pointer-events: none; }
.rite-pick label:has(input:checked) { border-color: var(--rite); box-shadow: 0 0 0 1px var(--rite); }
.rite-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
a.ent-name { color: var(--fg); text-decoration: none; }
a.ent-name:hover { text-decoration: underline; }
a.btn { text-decoration: none; color: var(--fg); }
a.btn:hover { color: var(--fg); }
a.btn.primary, a.btn.primary:hover { color: var(--on-accent); }
a.gbtn { text-decoration: none; color: var(--fg); }
button.gbtn { color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; }
.ud-cluster { border-radius: 50%; display: grid; place-items: center; background: var(--pin-off); color: #fff; font-weight: 600; font-size: 13px; border: 2.5px solid var(--pin-ring); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.ud-cluster.on { background: var(--pin-church); }

/* Colori dei due ruoli, come sulla mappa: blu per parroci e chiese, terracotta per gestori e locali. */
.btn.priest { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.btn.priest:hover { background: var(--navy-ink); border-color: var(--navy-ink); color: var(--on-navy); }
.btn.priest-soft { background: var(--navy-soft); border-color: transparent; color: var(--navy-ink); }
.btn.priest-soft:hover { border-color: var(--navy); color: var(--navy-ink); }
.btn.venue { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.venue:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.venue-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.btn.venue-soft:hover { border-color: var(--accent); color: var(--accent-ink); }
.role-head { display: grid; gap: 10px; justify-items: start; }
.role-tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.role-tag.priest { background: var(--navy-soft); color: var(--navy-ink); }
.role-tag.venue { background: var(--accent-soft); color: var(--accent-ink); }
[data-role="priest"] .page-h1 em { color: var(--navy); }
[data-role="priest"] .how div { border-left: 3px solid var(--navy); }
[data-role="venue"] .how div { border-left: 3px solid var(--accent); }
/* Tablet: "La mia area" si raggiunge dal pulsante con le iniziali, così in barra restano Cerca, Parroci e Gestori. */
@media (min-width: 561px) and (max-width: 760px) { .nav a.nav-area { display: none; } .nav a { padding: 8px 9px; } }
/* Telefono: logo, lingua e profilo sulla prima riga, menu a tutta larghezza sotto. */
@media (max-width: 560px) {
  .topbar-in { flex-wrap: wrap; row-gap: 0; padding-top: 6px; }
  .langsw { margin-left: auto; }
  .nav { order: 3; flex: 1 1 100%; margin-left: 0; justify-content: space-between; padding-bottom: 6px; }
  .nav a { padding: 7px 6px; gap: 4px; font-size: 14px; }
  /* Su telefono La mia area si apre dal tondo con le iniziali: in barra restano Cerca, Parroci e Gestori */
  .nav a.nav-area { display: none; }
}

/* Suggerimenti mentre si scrive (città, chiese, locali) */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1200; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 10px 28px rgba(0, 0, 0, .14); max-height: 340px; overflow-y: auto; min-width: 240px; }
.ac-list li[role=option] { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: calc(var(--r) - 2px); cursor: pointer; }
.ac-list li[role=option]:hover, .ac-list li[aria-selected=true] { background: var(--surface-2); }
.ac-list li[aria-selected=true] { outline: 2px solid var(--line-2); outline-offset: -2px; }
.ac-txt { display: grid; min-width: 0; line-height: 1.3; }
.ac-txt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-txt small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-none { padding: 10px; color: var(--muted); font-size: 13.5px; }
/* Elenco aperto verso l'alto quando sotto il campo non c'è posto prima dei pulsanti del percorso (TST-079). */
.ac-list.up { top: auto; bottom: calc(100% + 4px); }
.ent-ic.citta { background: var(--surface-2); color: var(--muted); }

/* Partenza da una scheda: struttura scelta e stato di ogni combinazione */
.st-line { font-size: 13.5px; } .st-line.free { color: var(--ok); } .st-line.ask { color: var(--warn); } .st-line.busy { color: var(--bad); }
.pair-status { justify-self: start; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: 13px; padding: 5px 10px; border-radius: var(--r); }
.pair-status b { font-weight: 600; }
.pair-status.free { background: var(--ok-soft); color: var(--ok); }
.pair-status.possible { background: var(--warn-soft); color: var(--warn); }
.pair-status.busy { background: var(--surface-2); color: var(--muted); }
.pair.is-busy { opacity: .8; }

/* Segnaposto: forma per il tipo (chiese quadrate, locali tondi), colore per la disponibilità nella data scelta */
.ud-pin.church { border-radius: 8px; }
.ud-pin.st-free { background: var(--ok); }
.ud-pin.st-ask { background: var(--warn-dot); }
.ud-pin.st-busy { background: var(--pin-off); }
.ud-pin.dim { opacity: .45; transform: scale(.85); }
/* Strutture spente quando è scelta una chiesa (o un locale): piccole, grigie, senza icona, ma ancora da toccare */
.ud-pin-off { width: 12px; height: 12px; margin: 8px; border-radius: 50%; background: var(--pin-off); border: 1.5px solid var(--pin-ring); opacity: .8; }
.ud-pin-off.church { border-radius: 3px; }
.ud-cluster-off { width: 24px; height: 24px; margin: 2px; border-radius: 6px; display: grid; place-items: center; background: var(--pin-off); color: #fff; font-size: 12px; font-weight: 600; border: 1.5px solid var(--pin-ring); opacity: .8; }
.shape-off { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--pin-off); }
.shape-off.church { border-radius: 2px; }
.ud-pin.anchor { position: relative; transform: scale(1.45); box-shadow: 0 0 0 4px rgba(255, 255, 255, .85), 0 2px 10px rgba(0, 0, 0, .45); }
/* Pallino × sulla struttura scelta: chiude la selezione. Disegnato piccolo (il segnaposto è ingrandito), area da toccare di circa 44 px. */
.ud-pin-x { position: absolute; top: -10px; right: -10px; width: 16px; height: 16px; border-radius: 50%; background: #fff; color: #1E2226; font: 600 13px/16px var(--sans); text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); cursor: pointer; }
.ud-pin-x::after { content: ""; position: absolute; inset: -8px; }
.ud-cluster.st-free { background: var(--ok); }
.ud-cluster.st-ask { background: var(--warn-dot); }

/* Struttura scelta: intestazione piena nel colore del tipo (chiesa blu, locale terracotta) */
.anchor-box { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.anchor-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--navy); color: var(--on-navy); }
.anchor-box.is-venue .anchor-head { background: var(--accent); color: var(--on-accent); }
.anchor-txt { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.anchor-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; opacity: .85; }
.anchor-name { color: inherit; font-weight: 600; font-size: 16px; line-height: 1.3; text-decoration: none; }
.anchor-name:hover { text-decoration: underline; }
.anchor-body { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 14px 12px; }
/* Struttura già prenotata da chi cerca (stage63): la riga del giorno in colore normale, «Non è ancora prenotata» a destra. */
.st-line.own { color: var(--fg); }
.anchor-box.is-own .anchor-body .btn { margin-left: auto; }
.own-tag { font-weight: 600; color: var(--fg); }
.anchor-body .pair-social { border: 0; padding: 0; }
/* Scheda «Hai scelto» per data e periodo (stage72, mockup approvato il 20/11/2026): riquadro colorato (troppi invitati, periodo
   con o senza date libere), «Prima data libera» con la data da toccare, «Cerca per {n} invitati». Sul telefono nella riga sotto la fascia. */
.hs-box { flex-basis: 100%; border-radius: var(--r); padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.hs-box b { font-weight: 600; }
.hs-box.warn { background: var(--warn-soft); color: var(--warn); }
.hs-box.ok { background: var(--ok-soft); color: var(--ok); }
.hs-box.bad { background: var(--bad-soft); color: var(--bad); }
.hs-bar { display: block; height: 8px; margin-top: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.hs-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.hs-row { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.hs-lbl { font-size: 13px; color: var(--muted); }
/* La data è un pulsante a pastiglia verde; l'area da toccare arriva a 44 px senza allungare la riga */
.hs-date { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); background: var(--ok-soft); color: var(--ok); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.hs-date::before, .hs-act::before { content: ""; position: absolute; inset: -5px 0; }
.hs-act::before { inset: -6px 0; }
.hs-date:hover { border-color: var(--ok); }
.hs-act { position: relative; border-radius: 9px; font-weight: 600; }
.hs-act .ic { width: 15px; height: 15px; }

/* «Avete già anche il locale?»: secondo nome sotto la struttura scelta. Il riquadro non taglia l'elenco dei suggerimenti. */
.anchor-box:has(.mate) { overflow: visible; }
.anchor-box:has(.mate) .anchor-head { border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0; }
.mate { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.mate .pl-lbl { margin-bottom: 6px; }
.mate .ctl { width: 100%; }
.mate .hint { margin-top: 6px; font-size: 13px; }

/* Chiesa e locale scelti tutti e due: due righe collegate dalla distanza */
.pp-lbl { padding: 10px 14px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.pp-row { display: flex; gap: 10px; align-items: center; padding: 8px 6px 8px 14px; }
.pp-row .anchor-name { font-size: 15px; }
.pp-row.church .anchor-name { color: var(--navy-ink); }
.pp-row.venue .anchor-name { color: var(--accent-ink); }
.pp-row .anchor-x { width: 44px; height: 44px; background: transparent; color: var(--muted); }
.pp-row .anchor-x:hover { background: var(--surface-2); color: var(--fg); }
.pp-row .anchor-x:focus-visible { outline-color: var(--fg); }
.pp-link { display: flex; gap: 6px; align-items: center; margin-left: 28px; padding: 2px 0 2px 22px; border-left: 2px dashed var(--line-2); font-size: 13px; color: var(--muted); }

/* Date libere insieme: tre mesi, verde liberi entrambi, giallo da chiedere, grigio non disponibile */
.pcal-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pcal-nav .iconbtn[disabled] { opacity: .4; cursor: default; }
.pcal-legend { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.pcal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; border: 1.5px solid currentColor; }
.pcal-legend span { display: inline-flex; align-items: center; }
.pcal-legend i.st-free { color: var(--ok); } .pcal-legend i.st-ask { color: var(--warn-dot); } .pcal-legend i.st-busy { color: var(--line-2); }
.pcal-m { margin-bottom: 16px; }
.pcal-m h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; text-transform: capitalize; }
.pcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pcal-dow { font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 2px; text-transform: capitalize; }
.pcal-d { position: relative; height: 44px; border: 0; border-radius: 8px; font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; }
.pcal-d.st-free, .pcal-legend .st-free { background: var(--ok-soft); color: var(--ok); }
.pcal-d.st-ask, .pcal-legend .st-ask { background: var(--warn-soft); color: var(--warn); }
.pcal-d.st-free, .pcal-d.st-ask { font-weight: 600; }
.pcal-d.st-busy, .pcal-legend .st-busy { background: var(--surface-2); color: var(--muted); }
.pcal-d.st-busy { text-decoration: line-through; cursor: default; }
.pcal-d.st-past { background: transparent; color: var(--muted); opacity: .45; cursor: default; }
.pcal-d.sel { box-shadow: 0 0 0 2px var(--fg); }
.pcal-d:not([disabled]):hover { box-shadow: 0 0 0 2px var(--line-2); }
.pcal-d.sel:hover { box-shadow: 0 0 0 2px var(--fg); }
.pcal-d .lit { position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .6; }

/* Social di chiesa e locale in fondo alla card della coppia */
.pair-social { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.soc-grp { display: inline-flex; align-items: center; gap: 6px; }
.soc-kind { color: var(--muted); }
/* Colori ufficiali appena accennati: icona nel colore del marchio, bordo e fondo molto tenui */
.soc { --brand: var(--navy); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.soc:hover, .soc:focus-visible { border-color: color-mix(in srgb, var(--brand) 70%, var(--line)); background: color-mix(in srgb, var(--brand) 16%, var(--surface)); }
.soc-facebook { --brand: #1877F2; }
.soc-instagram { --brand: #E4405F; }
/* TikTok: nota nera (bianca sul tema scuro) con i due riflessi azzurro e rosso del logo */
.soc-tiktok { --brand: #FE2C55; color: var(--fg); }
.soc-tiktok .ic { filter: drop-shadow(1px 1px 0 #FE2C55) drop-shadow(-1px -1px 0 #25F4EE); }

/* Quaresima e Avvento: matrimonio da confermare con la parrocchia */
.opt.season { background: var(--warn-soft); color: var(--warn); }

/* Suggerimenti: etichetta (per esempio "Già su UnaDies") e fonte in fondo all'elenco */
.ac-tag { color: var(--accent-ink); }
.ac-list li.ac-foot { padding: 4px 10px 2px; text-align: right; font-size: 11px; color: var(--muted); cursor: default; }
/* Intestazioni dei gruppi quando ci sono città, chiese e locali insieme */
.ac-list li.ac-grp { padding: 10px 10px 2px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); cursor: default; }
.ac-list li.ac-grp:first-child { padding-top: 4px; }
.note.ok { color: var(--ok); } .note.bad { color: var(--bad); } .note.warn { color: var(--warn); }
.pick-who .pick-warn { display: block; color: var(--warn); font-size: 13px; }

/* ---------- Ricerca: percorso a passi in home, pillola con editor, pannello dei risultati, foglio su telefono ---------- */
:root { --m-100: 100ms; --m-150: 150ms; --m-200: 200ms; --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in: cubic-bezier(.7, 0, .84, 0); --panel-w: 416px; }
.hint { font-size: 14px; color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0 4px; min-height: 44px; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; font-size: 14px; }
.linkbtn:hover { color: var(--accent); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--surface-2); }
.iconbtn { width: 44px; height: 44px; color: var(--fg); }
/* Pulsanti a icona: il nome compare al passaggio del mouse e con il fuoco da tastiera */
.tip { position: relative; }
/* Il riquadro esiste solo quando si vede: nascosto non deve allargare la pagina */
.tip[data-tip]::after { content: attr(data-tip); display: none; position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); background: var(--fg); color: var(--bg); font-size: 12px; font-weight: 500; line-height: 1.4; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 1300; }
.tip[data-tip]:focus-visible::after { display: block; }
@media (hover: hover) { .tip[data-tip]:hover::after { display: block; } }
.pick-x.tip[data-tip]::after, #qedClose.tip[data-tip]::after { left: auto; right: 0; transform: none; }

/* Campi del piano (home e editor della pillola) */
.pl-sec { display: grid; gap: 16px; min-width: 0; }
.pl-sec[hidden] { display: none !important; }
.pl-body { display: grid; gap: 16px; min-width: 0; }
.pl-h { outline-offset: 4px; }
.pl-lbl { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; padding: 0; }
.pl-fs { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.pl-exact .ctl, .pl-city .ctl, .pl-place .ctl { height: 48px; font-size: 16px; }
.pl-exact .ctl { width: 100%; max-width: 280px; }
.pl-city .ctl, .pl-place .ctl { width: 100%; }
.pl-sec .rite-pick { margin-top: 0; display: grid; gap: 8px; }
.pl-sec .rite-pick label { min-height: 64px; }
.pl-season { font-size: 14px; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 4px; justify-self: start; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg input:checked + span { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--line-2); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.mo, .wdays label { position: relative; }
.mo input, .wdays input { position: absolute; opacity: 0; pointer-events: none; }
.mo > span { position: relative; min-height: 56px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); display: grid; place-content: center; text-align: center; font-weight: 500; line-height: 1.25; cursor: pointer; }
.mo small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.mo > span:hover, .wdays label > span:hover { border-color: var(--muted); }
.mo input:checked + span, .wdays input:checked + span { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); background: var(--surface-2); }
.mo input:focus-visible + span, .wdays input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.lit-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warn-dot); vertical-align: 1px; }
.mo .lit-dot { position: absolute; top: 6px; right: 6px; }
.wdays { display: flex; flex-wrap: wrap; gap: 8px; }
.wdays label > span[aria-hidden] { display: grid; place-items: center; min-width: 48px; min-height: 44px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-weight: 500; cursor: pointer; }
.pl-alt { display: grid; gap: 8px; }
/* Passo «Dove?» del percorso in home: quattro riquadri (stage60). Vicino a me e Disegna agiscono subito; Città e Chiesa o locale aprono il loro campo. */
.pl-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pl-tile { position: relative; min-height: 96px; display: grid; align-content: start; gap: 4px; padding: 12px 36px 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); text-align: left; color: var(--fg); }
.pl-tile:hover { border-color: var(--muted); }
.pl-tile > .ic:first-child { color: var(--accent); }
.pl-tile-t { font-weight: 600; font-size: 15px; line-height: 1.25; }
.pl-tile small { font-size: 13px; line-height: 1.3; color: var(--muted); }
.pl-tile[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); background: var(--surface-2); }
.pl-tile .pl-tick { position: absolute; top: 12px; right: 12px; display: none; color: var(--ok); }
.pl-tile[aria-pressed="true"] .pl-tick { display: block; }
.pl-tile.busy { color: var(--muted); cursor: progress; }
.pl-or { font-size: 14px; color: var(--muted); }
.pl-opt { min-height: 48px; display: flex; gap: 12px; align-items: center; padding: 0 16px; border: 1px dashed var(--line-2); border-radius: 10px; background: var(--surface); font-weight: 500; text-align: left; color: var(--fg); }
.pl-opt:hover { border-color: var(--muted); }
.pl-opt[aria-pressed="true"] { border-style: solid; border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); background: var(--surface-2); }
.pl-opt .pl-tick { display: none; margin-left: auto; color: var(--ok); }
.pl-opt[aria-pressed="true"] .pl-tick { display: block; }
.pl-opt.busy { color: var(--muted); cursor: progress; }
.pl-geo-ok { display: flex; gap: 8px; align-items: center; margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-size: 14px; font-weight: 500; }
.pl-radius .ctl { height: 44px; }
.pl-anchor { display: grid; gap: 8px; justify-items: start; }
/* «L'hai già prenotata?» sotto la struttura scelta (stage63) */
.pl-own { display: grid; gap: 12px; margin-top: 4px; justify-items: start; }
.pl-own-time { display: grid; gap: 6px; }
.pl-own-time .ctl { width: auto; min-width: 120px; height: 44px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper input.ctl[type="number"] { width: 112px; height: 48px; text-align: center; font-size: 20px; font-weight: 500; }
.pl-presets { gap: 8px; }
.chip { min-height: 44px; min-width: 56px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); background: var(--surface-2); }

/* Home: percorso a passi */
.hero-wiz { justify-items: center; text-align: center; padding-block: 32px 16px; }
.hero-wiz p { margin-inline: auto; }
.wiz { max-width: 680px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 24px; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); }
.wiz .pl-h { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1.15; }
.wiz:not(.js) .pl-sec + .pl-sec { border-top: 1px solid var(--line); padding-top: 24px; }
.wiz-body { display: grid; gap: 24px; min-width: 0; }
.wiz-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.wiz-dot { width: 100%; min-height: 44px; border: 0; background: none; padding: 0; display: grid; gap: 8px; align-content: start; text-align: left; color: var(--muted); font-size: 14px; font-weight: 500; }
.wiz-dot { grid-template-columns: auto minmax(0, 1fr); column-gap: 0; }
.wiz-dot::before { content: ""; grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--line); }
.wiz-steps [data-state="done"] .wiz-dot::before, .wiz-steps [data-state="on"] .wiz-dot::before { background: var(--accent); }
.wiz-steps [data-state="on"] .wiz-dot { color: var(--fg); }
.wiz-steps [data-state="done"] .wiz-dot:hover { color: var(--fg); }
.wiz-dot:disabled { cursor: default; }
.wiz-n::after { content: "\00a0·\00a0"; }
.pl-flex { display: grid; gap: 24px; min-width: 0; }
.wiz-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }
.wiz-foot .btn { height: 44px; }
.wiz-foot .btn.primary { margin-left: auto; }
/* Strada alternativa alla procedura guidata: un vero pulsante, blu come le chiese sulla mappa, che non compete con "Avanti" */
.wiz-skip { border-color: var(--navy); color: var(--navy-ink); font-weight: 600; }
.wiz-skip .ic { color: var(--navy); }
.wiz-skip:hover { background: var(--navy-soft); }
.wiz-restored { display: flex; gap: 4px 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 0 12px; }
.wiz-restored .linkbtn { padding: 0; }

/* Cerca: pannello a sinistra e mappa, a tutta altezza. La pagina non deve mai scorrere (iPhone, 8/11/2026):
   - min-height: 0 annulla il min-height: 100vh di body, che su iPhone è più alto dello schermo con le barre di Safari aperte;
   - .srch taglia il foglio dei risultati spostato in giù (translateY), che altrimenti allunga la pagina;
   - clip, a differenza di hidden, non si fa scorrere nemmeno da programma (hidden resta per i browser che non hanno clip).
   Se la pagina si spostava, la pillola della ricerca (z-index 850) passava sopra l'header. */
body.full { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
body.full main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.srch { flex: 1; min-height: 0; position: relative; display: grid; grid-template-columns: var(--panel-w) minmax(0, 1fr); overflow: hidden; overflow: clip; }
/* Finestre («Dettagli» di una coppia) e avvisi sopra la pillola (850) e i pulsanti della mappa (500), non sotto */
body.full .overlay { z-index: 1100; }
body.full .toast { z-index: 1150; }
.spanel { position: relative; z-index: 2; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.sheet-grip { display: none; }
/* In cima al pannello la struttura scelta, se c'è; poi la barra fissa con conteggio e comandi */
.spanel-head { padding: 16px 16px 0; background: var(--surface); }
.spanel-head:has(> .anchor-box[hidden]) { display: none; }
/* Tutto il pannello scorre insieme (struttura scelta, titolo, filtri, lista); in cima resta solo "Torna alla zona" */
.spanel-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); }
.anchor-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0; }
.anchor-back { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px; border: 0; border-radius: var(--r); background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; text-align: left; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.anchor-back:hover { background: var(--accent-hover); }
.anchor-back:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.anchor-back .ic { flex: none; }
.ab-txt { display: grid; min-width: 0; line-height: 1.3; }
.ab-main { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-sub { font-weight: 400; font-size: 13px; opacity: .92; }
.anchor-x { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: inherit; display: grid; place-items: center; cursor: pointer; }
.anchor-x:hover { background: rgba(255, 255, 255, .3); }
.anchor-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Barra fissa dei risultati (Idea 3, scelta dall'utente l'8/11/2026): resta in cima al pannello mentre l'elenco scorre */
.res-bar { position: sticky; top: 0; z-index: 3; display: grid; gap: 8px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.res-row { display: flex; align-items: center; gap: 12px; }
.res-count { flex: 1; min-width: 0; display: grid; }
.res-title { font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.15; outline-offset: 4px; }
.res-sub { color: var(--muted); font-size: 14px; }
.res-sub:empty { display: none; }
.iconbtn.saved { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.res-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.travel-ctl { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.travel-ctl .ctl { height: 44px; color: var(--fg); }
/* «Solo disponibili»: una casella a forma di pastiglia, verde quando è scelta */
.only-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.only-chip:hover { border-color: var(--muted); }
.only-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.only-chip .box { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.only-chip .box .ic { width: 12px; height: 12px; vertical-align: 0; stroke-width: 2.4; }
.only-chip:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.only-chip:has(input:checked) .box { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.only-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Spiegazioni in fondo all'elenco: regola del rito, consiglio sulla mappa, legenda, ordine dei risultati */
.res-notes { display: grid; gap: 8px; padding-top: 8px; }
.res-notes h2 { font-size: 15px; font-weight: 600; }
/* Come ordiniamo i risultati (art. 22, comma 4-bis, Codice del consumo): nella stessa pagina dei risultati, in fondo all'elenco */
.res-how { font-size: 13px; }
.res-how a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.res-how a:hover { color: var(--fg); }
.legend-mini { display: none; }
.spanel-body { padding: 16px; display: grid; gap: 12px; align-content: start; background: var(--bg); }
.srch.has-pick .spanel-body { padding-bottom: 136px; }
.spanel-body .rule { margin-top: 0; font-size: 14px; }
.reslist.loading { opacity: .55; transition: opacity var(--m-150) var(--ease-out); }
.skel { height: 148px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); }
.pair { cursor: pointer; }
.pair.is-busy { cursor: default; }
.pair.sel { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.pick-btn[aria-pressed="true"] { background: var(--navy-soft); border-color: transparent; color: var(--navy-ink); }
.pair-actions .btn.small { height: 36px; }
.fine-links { font-size: 12px; color: var(--muted); padding-top: 8px; }
.fine-links a { color: var(--muted); }
.flexbox { display: grid; gap: 12px; }
.flex-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.flex-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.datestrip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.datestrip .empty { flex: 1; }
.dchip { flex: none; min-width: 104px; min-height: 56px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); padding: 8px 12px; display: grid; align-content: center; text-align: left; line-height: 1.3; }
.dchip:hover { border-color: var(--muted); }
.dchip b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.dchip small { font-size: 12px; font-weight: 500; color: var(--ok); }
.dchip small.lit { color: var(--warn); }
.dchip.on { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.calpanel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; display: grid; gap: 12px; }
.cal-head h3 { font-family: var(--serif); font-size: 22px; font-weight: 500; text-transform: capitalize; min-width: 140px; }
.cal-day.off:not(.past) { opacity: .55; }
.pickbar { position: absolute; left: 0; bottom: 0; width: var(--panel-w); z-index: 3; background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(0, 0, 0, .05); padding: 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; align-items: start; }
.pick-who { min-width: 0; font-size: 14px; line-height: 1.4; }
.pick-who b { display: block; font-weight: 600; }
.pick-who span { color: var(--muted); }
.pick-acts { grid-column: 1 / -1; display: flex; gap: 8px; }
.pick-acts .btn { height: 48px; }
.pick-go { flex: 1; justify-content: center; }
/* Mappa sul telefono (stage70): copertina, riga del conteggio, pastiglie, × nella barra e menu ☰. Sul computer non si vedono. */
.cover, .cover-sub, .res-cnt, .travel-chip, .only-alt, .qx, .navbtn { display: none; }
/* Vuoto (sempre sul computer): non occupa posto nell'elenco */
.mate-slot:empty { display: none; }
.smap { position: relative; min-width: 0; min-height: 0; background: var(--map-land); }
.smap #map { position: absolute; inset: 0; z-index: 0; }
.qbar { position: absolute; top: 16px; left: 16px; right: 16px; z-index: 850; display: flex; justify-content: center; pointer-events: none; }
.qpill { pointer-events: auto; display: flex; align-items: stretch; max-width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .07); padding: 4px; }
.qseg { position: relative; border: 0; background: none; border-radius: 999px; padding: 4px 16px; min-height: 48px; min-width: 0; display: grid; align-content: center; text-align: left; line-height: 1.3; color: var(--fg); }
.qseg small { font-size: 12px; color: var(--muted); }
.qseg span { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.qseg + .qseg::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.qseg:hover, .qseg[aria-expanded="true"] { background: var(--surface-2); }
.qseg:hover::before, .qseg:hover + .qseg::before, .qseg[aria-expanded="true"]::before, .qseg[aria-expanded="true"] + .qseg::before { opacity: 0; }
.qwrap { container-type: inline-size; width: 100%; display: flex; justify-content: center; }
/* Riga compatta: si tocca tutta per aprire «Cosa hai cercato» (niente matita: la matita sulla mappa disegna la zona, 8/11/2026) */
.qsum { display: none; width: 100%; min-height: 48px; align-items: center; gap: 8px; padding: 0 8px 0 12px; border: 0; border-radius: 999px; background: none; text-align: left; color: var(--fg); }
.qsum:hover, .qsum[aria-expanded="true"] { background: var(--surface-2); }
.qsum-t { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.qsum-t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qsum-t small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Filtri locale e chiesa: due segmenti dopo Invitati; con servizi scelti, icona e testo nel colore principale */
/* Con sei segmenti si accorcia prima il luogo: rito, data e invitati restano interi */
.qseg[data-edit="rite"], .qseg[data-edit="when"], .qseg[data-edit="guests"], .qflt { flex-shrink: 0; }
.qseg[data-edit="where"] { flex-shrink: 4; }
.qflt b { font-weight: 500; }
.qflt .ic { vertical-align: -3px; margin-right: 6px; color: var(--muted); }
.qflt.on b { color: var(--accent-ink); }
.qflt.on .ic { color: var(--accent); }
/* Pillola compatta: un solo pulsante Filtri con il numero dei servizi scelti */
.qfbtn { display: none; flex: none; position: relative; width: 44px; height: 44px; align-self: center; margin-right: 2px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); place-items: center; color: var(--fg); }
.qfbtn.on { border-color: var(--accent); color: var(--accent-ink); }
.qf-n { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.qf-n[hidden] { display: none; }
.flt-grid { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 0; }
.flt-grid .check { min-height: 44px; align-items: center; font-size: 16px; }
.flt-grid .check input { margin-top: 0; width: 18px; height: 18px; flex: none; }
/* Mappa troppo stretta per i segmenti (telefono, finestre medie): pillola compatta su due righe */
@container (max-width: 799.98px) { .qseg { display: none; } .qsum { display: flex; } .qpill { width: 100%; } .qfbtn { display: grid; } }
.pl-acc { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font-weight: 600; text-align: left; color: var(--fg); }
.pl-acc small { margin-left: auto; max-width: 62%; font-size: 14px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-acc .ic { transition: transform var(--m-150) var(--ease-out); }
.pl-acc[aria-expanded="true"] .ic { transform: rotate(180deg); }
.qed.acc { gap: 0; }
.qed.acc .qed-head { margin-bottom: 8px; }
.qed.acc .pl-sec, .qed.acc .pl-sec:not(.open) { display: grid; gap: 0; border-bottom: 1px solid var(--line); }
.qed.acc .pl-h { display: block; font-size: 16px; }
.qed.acc .pl-sec:not(.open) .pl-body { display: none; }
.qed.acc .pl-sec.open .pl-body { padding-bottom: 16px; }
.qed.acc .qed-foot { display: flex; gap: 8px; align-items: center; padding-top: 12px; }
.qed.acc .qed-foot .btn.primary { flex: 1; justify-content: center; }
.qed { position: absolute; top: calc(100% + 8px); width: 400px; max-width: calc(100% - 16px); max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); overflow-y: auto; pointer-events: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 8px 28px rgba(0, 0, 0, .07); padding: 16px; display: grid; gap: 16px; }
.qed[hidden] { display: none; }
.qed-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -8px -8px 0 0; }
.qed-head h2 { font-size: 16px; font-weight: 600; }
.qed .pl-h { display: none; }
.qed .pl-sec:not(.open) { display: none; }
.qed .months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qed .wdays { gap: 4px; }
.qed-foot { display: none; }
/* In basso a sinistra, in colonna: pulsanti della mappa e sotto la legenda; non si sovrappongono più (TST-066, 8/11/2026) */
.map-bl { position: absolute; left: 16px; bottom: 16px; z-index: 500; max-width: calc(100% - 200px); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
.map-bl > * { pointer-events: auto; }
.map-tools { display: grid; gap: 8px; justify-items: start; }
.map-tools .btn { height: 40px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
/* «Cerca vicino a me»: premuto quando la ricerca è intorno alla posizione letta; in attesa mentre il browser la cerca */
#locBtn[aria-pressed="true"] { background: var(--navy-soft); border-color: var(--navy); color: var(--navy-ink); }
#locBtn.busy { color: var(--muted); cursor: progress; }
.map-legend { max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; font-size: 12px; display: flex; gap: 4px 12px; flex-wrap: wrap; }
.map-legend span, .legend-mini span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i, .legend-mini i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.map-legend i.sq, .legend-mini i.sq { border-radius: 2px; }
.map-legend i.shape, .legend-mini i.shape { background: var(--surface); box-shadow: inset 0 0 0 2px var(--muted); }
.map-hint, .here-btn { position: absolute; left: 50%; top: 88px; transform: translateX(-50%); z-index: 500; }
.map-hint { background: var(--fg); color: var(--bg); font-size: 14px; padding: 8px 16px; border-radius: 999px; max-width: calc(100% - 32px); text-align: center; }
.here-btn { height: 40px; box-shadow: 0 2px 8px rgba(0, 0, 0, .07); }
/* Lo zoom sta sotto la pillola, che con i filtri arriva quasi al bordo destro */
.smap .leaflet-top.leaflet-right { top: 76px; }
.smap .leaflet-control-zoom a { width: 40px; height: 40px; line-height: 40px; }
@media (min-width: 768px) and (max-width: 1023.98px) { :root { --panel-w: 360px; } .qseg { padding: 4px 12px; } .qseg span { max-width: 140px; } }
/* Poca altezza con la mappa accanto al pannello (iPhone girato, 844×390 e meno; finestre basse): i pulsanti della mappa
   diventano tondi, solo icona, in una riga; la legenda passa in fondo all'elenco. Così non arrivano alla pillola
   né a «Cerca in quest'area» (TST-065, 8/11/2026). Il nome resta per i lettori di schermo e nel suggerimento. */
@media (min-width: 768px) and (max-height: 560px) {
  .map-tools { grid-auto-flow: column; }
  .map-tools .tool { position: relative; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .map-tools .tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .map-tools .tool[data-tip]::after { content: attr(data-tip); display: none; position: absolute; left: 0; bottom: calc(100% + 8px); background: var(--fg); color: var(--bg); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
  .map-tools .tool[data-tip]:focus-visible::after { display: block; }
  .map-legend { display: none; }
  .legend-mini { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
}
@media (min-width: 768px) and (max-height: 560px) and (hover: hover) { .map-tools .tool[data-tip]:hover::after { display: block; } }

/* Telefono: mappa a tutto schermo, pillola compatta, foglio dal basso, editor a tutta altezza */
@media (max-width: 767.98px) {
  .wiz { padding: 16px; gap: 16px; border-radius: 14px; }
  .wiz .pl-h { font-size: 28px; }
  .wiz-foot { position: sticky; bottom: 0; z-index: 3; background: var(--surface); margin: 0 -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 0 0 14px 14px; }
  .wiz-skip { order: 3; flex-basis: 100%; margin: 0; justify-content: center; }
  .wiz-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wiz-n { display: none; }
  .months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wdays { gap: 4px; }
  .wdays label > span[aria-hidden] { min-width: 44px; padding: 0 4px; }
  .srch { display: block; }
  .smap { position: absolute; inset: 0; }
  /* Il foglio va da «top» (search.js) al fondo dello schermo, così il fondo «Chiedi conferma» sta dentro, in basso (stage70). */
  .spanel { position: absolute; left: 0; right: 0; top: 48%; bottom: 0; z-index: 5; border-right: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -2px 12px rgba(0, 0, 0, .08); transition: top var(--m-200) var(--ease-out); }
  .spanel.instant { transition: none; }
  /* Foglio alzato del tutto: copre i pulsanti tondi e gli avvisi della mappa (500), che altrimenti coprivano «Salva ricerca»;
     la pillola (850) resta sopra, e la barra «Chiedi conferma» sopra il foglio (8/11/2026). */
  .spanel[data-sheet="full"] { z-index: 600; }
  .sheet-grip { position: relative; display: grid; place-items: center; flex: none; width: 100%; height: 32px; border: 0; background: none; touch-action: none; cursor: grab; }
  .sheet-grip::before { content: ""; position: absolute; inset: -6px 0; }
  .sheet-grip span { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); }
  .sheet-grip.tip[data-tip]::after { top: auto; bottom: calc(100% + 4px); }
  .spanel-head { padding: 12px 16px 0; }
  .res-bar { padding: 8px 16px 12px; }
  .anchor-back { min-height: 52px; }
  .res-title { font-size: 24px; }
  .res-sub { font-size: 13px; }
  .legend-mini { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
  .spanel-body { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .srch.has-pick .spanel-body { padding-bottom: 16px; }
  /* «Chiedi conferma» è il fondo del foglio (search.js la sposta dentro il pannello): l'elenco finisce sopra, mai sotto (stage70). */
  .pickbar { position: static; flex: none; width: auto; z-index: auto; border-right: 0; box-shadow: none; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .map-legend { display: none; }
  .qbar { top: 8px; left: 8px; right: 8px; }
  .smap .leaflet-control-zoom { display: none; }
  .map-bl { position: static; display: block; max-width: none; }
  .map-tools { position: absolute; z-index: 500; right: 8px; top: 68px; justify-items: end; }
  .map-tools .tool { position: relative; width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .map-tools .tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .map-tools .tool[data-tip]::after { content: attr(data-tip); display: none; position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); background: var(--fg); color: var(--bg); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
  .map-tools .tool[data-tip]:focus-visible::after { display: block; }
  .map-hint, .here-btn { top: 68px; }
  .map-hint { max-width: calc(100% - 80px); }
  .pair-actions .btn.small, .res-tools .btn.small, .travel-ctl .ctl { height: 44px; }
}
/* ---------- Mappa sul telefono, mockup B «copertina» scelto dall'utente il 17/11/2026 (stage70) ----------
   Con una chiesa o un locale scelto: copertina in cima al foglio (foto alta circa 150 px, o una fascia bassa senza foto),
   una riga di conteggio, pastiglie, righe compatte dell'altro tipo e «Chiedi conferma» come fondo del foglio.
   Senza scelta (ricerca per zona) cambiano solo riga del conteggio, pastiglie e spazi. Il computer resta com'è. */
@media (max-width: 767.98px) {
  /* Barra in alto: con la scelta, sopra piccoli data, rito e invitati, sotto «Vicino a …»; la × riporta alla zona */
  .srch.is-anchor .qsum-t small { order: -1; }
  .qx { display: grid; flex: none; position: relative; width: 44px; height: 44px; align-self: center; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--fg); }
  .qx::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface-2); }
  .qx .ic { position: relative; }
  .qx:hover::before { background: var(--line); }
  .qx.tip[data-tip]::after { left: auto; right: 0; transform: none; }
  .anchor-bar { display: none !important; }
  /* Copertina: la foto con la fascia scura in basso; il manico sta sopra la foto */
  .cover { display: block; position: relative; flex: none; overflow: hidden; border-radius: 16px 16px 0 0; background: var(--surface-2); }
  .cover.has-ph { height: 150px; }
  .spanel:has(.cover.has-ph:not([hidden])) .sheet-grip { position: absolute; top: 0; left: 0; right: 0; z-index: 3; }
  .spanel:has(.cover.has-ph:not([hidden])) .sheet-grip span { background: rgba(255, 255, 255, .92); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
  .spanel:has(.cover:not([hidden])) { border-top: 0; }
  /* Senza foto il manico e la fascia sono un blocco solo, sullo stesso fondo */
  .spanel:has(.cover.no-ph:not([hidden])) .sheet-grip { background: var(--surface-2); border-radius: 16px 16px 0 0; }
  .cover.no-ph { border-radius: 0; }
  .cover.no-ph .cv-bar { padding-top: 0; }
  .cv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: var(--surface-2); }
  .cv-bar { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 4px 6px 16px; }
  .cover.has-ph .cv-bar { position: absolute; left: 0; right: 0; bottom: 0; min-height: 44px; padding: 2px 4px 2px 16px; background: rgba(20, 22, 26, .64); color: #fff; }
  .cv-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
  .cv-ic.chiesa { background: var(--navy-soft); color: var(--navy); } .cv-ic.locale { background: var(--accent-soft); color: var(--accent); }
  .cv-t { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
  .cv-lbl { color: inherit; font-weight: 600; text-decoration: none; }
  .cv-lbl:hover { text-decoration: underline; }
  .cover.no-ph .cv-st.free { color: var(--ok); } .cover.no-ph .cv-st.ask, .cover.no-ph .cv-st.warn { color: var(--warn); } .cover.no-ph .cv-st.busy { color: var(--muted); }
  /* Riga sotto la fascia (stage72): «Prima data libera» o «Cerca per {n} invitati», tocchi di 44 px */
  .cover-sub { display: flex; flex-wrap: wrap; gap: 8px; flex: none; padding: 10px 16px 4px; background: var(--surface); }
  .cover-sub .hs-row { flex-basis: auto; }
  .hs-date, .hs-act { min-height: 44px; }
  .hs-date::before, .hs-act::before { display: none; }
  .cv-ch { flex: none; min-width: 44px; min-height: 44px; padding: 0 12px; border: 0; background: none; color: inherit; font: inherit; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
  .cover.has-ph :focus-visible { outline-color: #fff; }
  /* Credito della foto di Wikimedia Commons: in alto a destra, sotto il manico, su fondo scuro come la fascia (chiaro e scuro) */
  /* Tutta la pastiglia è il link, con un'area da toccare di 44 px; se non c'è posto si accorcia l'autore, mai licenza e «Wikimedia Commons» (TST-116) */
  .cv-cr { position: absolute; top: 34px; right: 8px; z-index: 2; display: flex; align-items: baseline; gap: 0 4px; max-width: calc(100% - 16px); margin: 0; padding: 3px 10px; border-radius: 999px; background: rgba(20, 22, 26, .64); color: #fff; font-size: 11.5px; line-height: 1.4; white-space: nowrap; text-decoration: none; }
  a.cv-cr::before { content: ""; position: absolute; inset: -11px -4px; }
  .cv-cr .cr-a { min-width: 0; overflow: hidden; text-overflow: ellipsis; text-decoration: underline; text-underline-offset: 2px; }
  .cv-cr .cr-b, .cv-cr .cr-l { flex: none; }
  /* «La tua chiesa»: area da toccare di 44 px senza allungare la fascia (TST-116) */
  .cv-lbl { display: inline-block; padding: 13px 0; margin: -13px 0; }
  /* Riga del conteggio: una sola, senza titolo grande. Con la scelta il titolo resta per i lettori di schermo */
  .res-title { font-family: var(--sans); font-size: 15px; font-weight: 600; line-height: 1.35; }
  .res-count { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
  .res-sub { font-size: 15px; }
  .res-sub::before { content: "· "; }
  .srch.is-anchor .res-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .srch.is-anchor .res-sub { display: none; }
  .srch.is-anchor .res-cnt { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; }
  .srch.is-anchor:not(.is-own) .spanel-head { display: none; }
  .srch.is-anchor .res-bar { position: static; border-bottom: 0; padding: 14px 16px 12px; gap: 10px; }
  .srch.is-anchor .spanel-scroll, .srch.is-anchor .spanel-body { background: var(--surface); }
  .srch.is-anchor .spanel-body { padding-top: 0; }
  /* Già prenotata da chi cerca: sotto la copertina restano solo «Salva nella mia area» e «Non l'ho ancora prenotata» */
  .srch.is-own .spanel-head { padding: 12px 16px 0; }
  .srch.is-own .anchor-box.is-own { border: 0; border-radius: 0; margin: 0; background: none; }
  .srch.is-own .anchor-box.is-own .anchor-head, .srch.is-own .anchor-box.is-own .anchor-txt { display: none; }
  .srch.is-own .anchor-box.is-own .anchor-body { padding: 0; }
  .srch.is-own .anchor-box.is-own .anchor-body .btn { margin-left: 0; }
  /* Pastiglie: «Liberi quel giorno» (con la scelta) e «Entro 10 km ▾»; la distanza resta un menu vero, sotto la pastiglia */
  .srch.is-anchor #onlyFreeLbl { display: none; }
  .srch.is-anchor .only-alt { display: inline; }
  .travel-ctl { position: relative; }
  .travel-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: 14px; font-weight: 500; white-space: nowrap; pointer-events: none; }
  .travel-ctl .ctl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  .travel-ctl:hover .travel-chip { border-color: var(--muted); }
  .travel-ctl:has(.ctl:focus-visible) .travel-chip { outline: 2px solid var(--accent); outline-offset: 2px; }
  /* Righe compatte dell'altro tipo: miniatura 92 px, nome, tipo · città · km, stato con il pallino; scelta = fondo terracotta chiaro */
  .srch.is-anchor .reslist { gap: 0; margin: 0 -16px; }
  /* Nota in fondo alle righe («E altre…», TST-119 a): con lo stesso margine delle righe, non attaccata ai bordi (stage72) */
  .srch.is-anchor .reslist > .note { padding: 12px 16px 0; }
  .srch.is-anchor .reslist > .empty { margin: 0 16px; }
  .ro { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--surface); box-shadow: none; }
  .ro:first-child { border-top: 1px solid var(--line); }
  .ro:hover, .ro.hl { border-color: var(--line); box-shadow: none; }
  .ro.sel { background: var(--accent-soft); border-color: var(--line); box-shadow: none; }
  .ro.is-busy { opacity: 1; }
  .ro.is-busy .ro-ph { opacity: .6; }
  .ro-ph { position: relative; width: 92px; height: 92px; flex: none; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
  .ro-ph .ic { width: 24px; height: 24px; }
  .ro-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .ro-bd { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-top: 2px; }
  .ro-nm { display: block; padding: 0; border: 0; background: none; color: var(--fg); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; text-align: left; }
  /* Tutta la riga si tocca: il pulsante del nome si allarga sulla riga; il fuoco da tastiera si vede su tutta la riga */
  button.ro-main { cursor: pointer; }
  button.ro-main::after { content: ""; position: absolute; inset: 0; }
  button.ro-main:focus-visible { outline: none; }
  .ro:has(.ro-main:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
  .ro-m { color: var(--muted); font-size: 13.5px; line-height: 1.35; }
  .ro-s { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; font-size: 13.5px; font-weight: 500; line-height: 1.35; }
  .ro-s i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
  .ro-s.free { color: var(--ok); } .ro-s.free i { background: var(--ok); }
  .ro-s.ask { color: var(--warn); } .ro-s.ask i { background: var(--warn-dot); }
  .ro-s.busy { color: var(--muted); } .ro-s.busy i { background: var(--pin-off); }
  .ro-x { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
  .ro-x.warn { color: var(--warn); }
  /* «Dettagli»: discreto, sopra il pulsante della riga; area da toccare di 44 px senza allungare la riga */
  .ro-det { position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 44px; margin: -8px 0 -12px; padding: 0 12px 0 0; font-size: 13.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
  .ro-det:hover { color: var(--fg); }
  /* «Hai già anche il locale?» dopo l'elenco */
  .mate-slot .mate { padding: 16px 0 4px; border-top: 0; }
  /* Fondo del foglio: l'altra scelta, km e data; poi «Date libere insieme» e «Chiedi conferma» */
  .pick-who.pick-one { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
  .pick-one b { display: block; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
  .pick-one span { font-size: 13px; }
  .pick-one .pick-warn { flex-basis: 100%; }
  .pick-acts .btn { height: 48px; padding: 0 14px; font-size: 14px; }
  .pick-dates { flex: none; }
  .pick-dates.tip[data-tip]::after { top: auto; bottom: calc(100% + 6px); left: 0; transform: none; }
  .pick-acts.tight .pick-dates { width: 48px; padding: 0; justify-content: center; }
  .pick-acts.tight .pd-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 767.98px) and (prefers-reduced-motion: no-preference) {
  .ro { transition: background-color var(--m-150) var(--ease-out); }
}
/* Intestazione della Mappa sul telefono (stage70): una riga sola con logo, lingua, account e il menu ☰ (Cerca, Parroci, Gestori).
   Le altre pagine restano come sono. */
@media (max-width: 560px) {
  body.full .topbar-in { flex-wrap: nowrap; gap: 8px; padding-top: 0; min-height: 56px; }
  body.full .navbtn { display: grid; order: 5; flex: none; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--fg); }
  body.full .navbtn:hover, body.full .navbtn[aria-expanded="true"] { background: var(--surface-2); }
  body.full .nav { display: none; position: absolute; top: calc(100% + 4px); right: max(8px, env(safe-area-inset-right, 0px)); z-index: 40; flex-direction: column; gap: 2px; min-width: 200px; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); overflow: visible; }
  body.full .nav.open { display: flex; }
  body.full .nav a { min-height: 44px; padding: 0 12px; gap: 10px; font-size: 15px; border-radius: 8px; justify-content: flex-start; }
  body.full .topbar:has(.nav.open) { z-index: 1100; }
  /* Parroco o gestore collegato: «La tua gestione» resta l'icona del calendario, con il nome per i lettori di schermo, così la riga ci sta */
  body.full .authbtn .mg-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* «Cosa hai cercato» a tutto schermo, sopra l'header: sul telefono e, al tocco, sul telefono girato con poca altezza
   (fino a 500 px: la tendina lì era alta 190 px a 844×390 e 140 a 844×340, TST-068). search.js la sposta in fondo alla pagina
   mentre è aperta, fuori da .srch (Safari la tagliava al bordo della mappa ma le dava i tocchi anche sopra l'header, 8/11/2026).
   Margini anche per la zona sicura di iPhone. Con il mouse resta la tendina. */
@media (max-width: 767.98px), (max-height: 500px) and (pointer: coarse) {
  .qed { position: fixed; inset: 0; z-index: 1000; width: auto; max-width: none; max-height: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; }
  .qed-head { flex: none; height: calc(56px + env(safe-area-inset-top, 0px)); margin: 0; padding: env(safe-area-inset-top, 0px) max(4px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); }
  .qed-head h2 { font-size: 17px; }
  .qed-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .qed .pl-sec, .qed .pl-sec:not(.open) { display: grid; gap: 0; border-bottom: 1px solid var(--line); }
  .qed .pl-h { display: block; font-size: 16px; }
  .qed .pl-sec:not(.open) .pl-body { display: none; }
  .qed .pl-sec.open .pl-body { padding-bottom: 16px; }
  .qed-foot { flex: none; display: flex; gap: 8px; align-items: center; padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); }
  .qed-foot .btn.primary { flex: 1; height: 48px; justify-content: center; }
}
/* Telefono girato (stretto e basso, per esempio 667×375): i pulsanti tondi in una riga sotto la pillola, così non scendono sul foglio */
@media (max-width: 767.98px) and (max-height: 500px) {
  .map-tools { grid-auto-flow: column; }
  .map-tools .tool[data-tip]::after { left: auto; right: 0; top: calc(100% + 8px); transform: none; }
}
@media (prefers-reduced-motion: reduce) { .spanel, .pl-acc .ic, .reslist.loading { transition: none; } }

/* Statistiche per parroci e gestori (gestione/statistiche): grafici in CSS, valori sotto 5 con una barra fissa e neutra */
.st { display: grid; gap: 24px; --st-lit: repeating-linear-gradient(135deg, var(--navy) 0 3px, color-mix(in srgb, var(--navy) 45%, var(--surface)) 3px 6px); --st-out: repeating-linear-gradient(135deg, var(--line-2) 0 3px, var(--surface-2) 3px 6px); }
.st-top { margin-bottom: -16px; }
.st-top .btn { min-height: 44px; }
.st-head { display: grid; gap: 4px; }
.st-h { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: end; justify-content: space-between; }
.st-h h2 { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1.15; margin: 0; }
.st-h p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 70ch; }
.st-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.st-seg { display: inline-flex; flex-wrap: wrap; background: var(--surface-2); border-radius: 26px; padding: 4px; gap: 4px; }
.st-seg a { min-height: 44px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.st-seg a:hover { color: var(--fg); }
.st-seg a[aria-current] { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--line-2); }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.st-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 4px; align-content: start; }
.st-tile small { font-size: 14px; color: var(--muted); }
.st-tile b { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.st-tile span { font-size: 14px; color: var(--muted); }
.st-tile span.up { color: var(--ok); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.st-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; container-type: inline-size; }
.st-card h3 { font-size: 16px; font-weight: 600; margin: 0; }
.st-card .sub { font-size: 14px; color: var(--muted); margin: 0; }
.st-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; height: 160px; padding-top: 20px; border-bottom: 1px solid var(--line-2); }
.st-cols .col { display: flex; align-items: flex-end; min-width: 0; }
.st-cols .c { width: 100%; background: var(--navy); border-radius: 4px 4px 0 0; }
.st-cols .c.lit { background: var(--st-lit); }
.st-cols .c.few, .st-hb .bar.few { background: var(--line-2); }
.st-cols .c .v { position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@container (max-width: 340px) { .st-cols .c:not(.top) .v { display: none; } }
.st-xlab { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; font-size: 12px; color: var(--muted); text-align: center; margin-top: -8px; }
.st-hb, .st-cmp { display: grid; grid-template-columns: minmax(72px, max-content) minmax(0, 1fr) max-content; gap: 8px 12px; align-items: center; font-size: 14px; }
.st-hb .bar { height: 18px; background: var(--navy); border-radius: 0 4px 4px 0; }
.st-hb .bar.out { background: var(--st-out); box-shadow: inset 0 0 0 1px var(--line-2); }
.st-cmp .bar { height: 14px; background: var(--line-2); border-radius: 0 4px 4px 0; }
.st-cmp .bar.me { background: var(--ok); }
.st-hb .n, .st-cmp .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.st-callout { font-size: 14px; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin: 0; }
.st-callout b { font-weight: 600; }
.st-leg { display: flex; gap: 8px 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.st-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; background: var(--navy); }
.st-leg i.lit { background: var(--st-lit); }
.st-leg i.out { background: var(--st-out); box-shadow: inset 0 0 0 1px var(--line-2); }
.st-empty { font-size: 14px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 16px; margin: 0; }
table.data.st-table th.num, table.data.st-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.st-mine { border-top: 2px solid var(--fg); padding-top: 24px; display: grid; gap: 16px; }
.st-privacy { font-size: 14px; color: var(--muted); max-width: 75ch; margin: 0; }
.st-teaser { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
@media (max-width: 767.98px) {
  .st-h h2 { font-size: 26px; }
  .st-seg { display: flex; width: 100%; }
  .st-seg a { flex: 1 1 auto; padding: 0 12px; }
}

/* Un giorno dell'agenda (link "Cambia" dell'email): libera o occupata per sala e turno */
.day { max-width: 760px; gap: 16px; }
.day-form { display: grid; gap: 16px; }
.day-hall { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.day-hall + .day-hall { border-top: 1px solid var(--line); padding-top: 16px; }
.day-hall legend { float: left; width: 100%; padding: 0 0 4px; font-weight: 600; }
.day-hall legend .note { font-weight: 400; }
.day-shift { clear: both; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.day-shift .lbl { font-size: 14px; }
.day .seg span, .day .btn.small { min-height: 44px; }
.day .seg input[value="1"]:checked + span { background: var(--ok-soft); color: var(--ok); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 35%, transparent); }

/* "Ritrova UnaDies con un tocco": collegamento da trascinare, passi per il telefono, resta collegato */
.app-card { display: grid; gap: 12px; }
.app-addr { font-weight: 600; white-space: nowrap; color: var(--fg); }
.app-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.app-way { display: grid; gap: 8px; align-content: start; }
.app-way h3 { font-size: 15px; font-weight: 600; margin: 0; }
.app-link { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--surface-2); color: var(--fg); font-weight: 600; text-decoration: none; cursor: grab; }
.app-link:active { cursor: grabbing; }
.app-steps { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.app-remember { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.app-remember .sub { margin: 0; }
.app-remember form { justify-self: start; }

/* Regioni, province, comuni vicini e guide */
.place-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 8px 16px; }
.place-cities > div { display: grid; gap: 0; }
.place-cities a { font-weight: 500; }
.about .lead { font-size: 18px; color: var(--muted); }
.about-founder { display: flex; gap: 20px; align-items: flex-start; margin: 12px 0 8px; }
.about-founder img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line); background: var(--surface-2); }
.about-name { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; }
.about-mission { font-family: var(--serif); font-size: 20px; line-height: 1.4; color: var(--fg); }
@media (max-width: 767.98px) { .about-founder { flex-direction: column; align-items: flex-start; } .about-founder img { width: 128px; height: 128px; } }
.checklist-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 12px 14px; margin: 10px 0 4px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.cl-progress { font-weight: 600; }
.cl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.checklist-bar .note { flex-basis: 100%; }
.guide ul.checklist { list-style: none; padding-left: 0; gap: 8px; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font-size: 16px; line-height: 1.5; }
.checklist label:hover { border-color: var(--line-2); }
.checklist input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.checklist input:checked + span { color: var(--muted); }
.checklist input:checked + span b { text-decoration: line-through; text-decoration-color: var(--line-2); }
/* Volantino A4 della parrocchia: sullo schermo un foglio al centro, in stampa la pagina intera */
.flyer-tools { display: grid; gap: 8px; padding-top: 24px; padding-bottom: 16px; }
.flyer { width: min(210mm, calc(100% - 32px)); min-height: 297mm; margin: 0 auto 32px; padding: 20mm 18mm; background: #fff; color: #1E2226; border: 1px solid var(--line); border-radius: 4px;
  display: grid; gap: 5mm; align-content: start; justify-items: center; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.fl-brand { display: flex; gap: 10px; align-items: center; font-family: var(--serif); font-size: 30px; font-weight: 600; }
.fl-brand .mark { width: 54px; height: 33px; }
.fl-brand .mark .ln, .fl-brand .mark .gn { stroke: #1E2226; } .fl-brand .mark .gn { fill: #1E2226; } .fl-brand .mark .hl { stroke: #B5472A; }
.fl-brand em { color: #B5472A; }
.fl-kicker { margin: 4mm 0 0; font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #B5472A; }
.fl-title { font-family: var(--serif); font-size: clamp(30px, 5vw, 46px); font-weight: 600; line-height: 1.1; max-width: 16ch; }
.fl-city { margin: -3mm 0 0; font-size: 18px; color: #5A626B; }
.fl-lead { font-size: 19px; line-height: 1.45; max-width: 34ch; }
.fl-qr { display: grid; gap: 2mm; justify-items: center; margin: 2mm 0; }
.fl-code svg { display: block; width: min(68mm, 60vw); height: auto; }
.fl-qr b { font-size: 16px; }
.fl-qr span { font-size: 14px; color: #5A626B; word-break: break-all; }
.fl-steps { margin: 0; padding: 0; list-style: none; counter-reset: fl; display: grid; gap: 3mm; max-width: 40ch; text-align: left; }
.fl-steps li { counter-increment: fl; display: grid; grid-template-columns: 30px 1fr; gap: 10px; font-size: 16px; line-height: 1.45; }
.fl-steps li::before { content: counter(fl); width: 30px; height: 30px; border-radius: 50%; background: #1E2226; color: #fff; display: grid; place-items: center; font-weight: 600; }
.fl-free { margin-top: auto; font-size: 14px; color: #5A626B; }
@media print {
  @page { size: A4; margin: 0; }
  .flyer-tools, .proto { display: none !important; }
  .flyer { width: 210mm; height: 297mm; min-height: 0; margin: 0; border: 0; border-radius: 0; }
  .fl-code svg { width: 68mm; }
}
@media print {
  header, footer, .breadcrumb, .cta-band, .guide-links, .cl-actions, .checklist-bar .note { display: none !important; }
  body { background: #fff; }
  .checklist label { border: 0; padding: 2px 0; break-inside: avoid; }
  .guide h2 { break-after: avoid; }
}
.city-about { margin: 0 0 18px; display: grid; gap: 10px; }
.city-about p { max-width: 70ch; margin: 0; }
.nc-list { display: grid; gap: 10px; margin-top: 18px; }
.nc-item { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) auto; gap: 14px 18px; align-items: center; }
.nc-church { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.nc-dist { font-weight: 600; font-size: 14px; }
.nc-link { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--accent-ink); }
@media (max-width: 767.98px) { .nc-item { grid-template-columns: 1fr; } }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.guide-card { display: grid; gap: 8px; align-content: start; text-decoration: none; color: inherit; }
.guide-card:hover { border-color: var(--line-2); }
.guide-card h2, .guide-card h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.2; margin: 0; }
.guide-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--accent); }
.guide { max-width: 72ch; display: grid; gap: 4px; }
.guide h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 4vw, 42px); line-height: 1.15; margin: 0 0 4px; }
.guide h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.2; margin: 22px 0 6px; }
.guide p, .guide li { font-size: 16px; line-height: 1.6; }
.guide ul { padding-left: 22px; display: grid; gap: 6px; margin: 4px 0 8px; }
.guide .lead { font-size: 18px; }

/* Pagina d'arrivo per attivare il profilo (dal link dell'email): scheda, vantaggi, modulo subito sotto */
.claim-page { gap: 16px; }
.claim-why { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 8px; }
.claim-why ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.claim-why li { font-size: 15px; line-height: 1.5; }
.claim-free { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ok); }
.claim-gift { margin: 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.55; color: var(--muted); }
.pp-gift h2 { display: flex; align-items: center; gap: 10px; }
.pp-gift p { margin: 0; max-width: 72ch; font-size: 15px; line-height: 1.6; color: var(--muted); }
.claim-step { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.found-hint { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 500; color: var(--ok); }
.found-hint .ic { margin-top: 2px; }
/* Soggiorno nella richiesta: una notte per gli sposi, alloggio per gli ospiti da fuori */
.stay-field { display: grid; gap: 8px; }
.stay-n { max-width: 260px; }
.stay-ok { display: grid; gap: 8px; }

/* Segnali pubblici (stage64): grafico dell'interesse sulla scheda, riga nelle card, prenotazioni dichiarate. */
.sig-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 140px; margin: 8px 0 4px; }
.sig-col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; align-items: end; justify-items: center; gap: 4px; min-width: 0; }
.sig-col i { display: block; width: 100%; max-width: 28px; background: var(--accent); border-radius: 6px 6px 2px 2px; align-self: end; }
.sig-col i.lo { background: var(--line-2); }
.sig-col small { font-size: 11.5px; color: var(--muted); }
.sig-n { font-size: 11.5px; font-weight: 600; color: var(--fg); min-height: 1em; }
/* Riti sopra il grafico: link a forma di pillola, senza sottolineatura e senza il colore dei link (TST-090). */
.sig-rites .chip-link { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; font-weight: 500; }
.sig-rites .chip-link[aria-current="true"] { background: var(--surface-2); border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.sig-line { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.decl-note { font-size: 13px; color: var(--fg); background: var(--surface-2); border-radius: 10px; padding: 6px 10px; margin: 6px 0 0; }
.decl-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.decl-row .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.own-save { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Notifiche sul telefono (stage73): riquadro della gestione, codice per l'app su iPhone, elemento aperto dal tocco su una notifica. */
.push-card .pair-actions { gap: 8px; }
.push-card .pair-actions .btn { min-height: 44px; }
.push-on { display: flex; gap: 8px; align-items: center; margin: 0; color: var(--ok); font-weight: 600; font-size: 14.5px; }
.push-warn { margin: 0; font-size: 14px; background: var(--warn-soft); color: var(--fg); border-radius: 10px; padding: 10px 12px; }
.push-ios { display: grid; gap: 8px; font-size: 14.5px; }
.push-code { display: grid; gap: 8px; justify-items: start; }
.push-code .btn { min-height: 44px; }
.push-code-out { margin: 0; font-size: 15px; }
.push-code-out b, .push-code-in { font-size: 22px; font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.push-code-in { max-width: 200px; height: 52px; text-align: center; }
.push-devs { display: grid; gap: 6px; font-size: 14px; }
.push-devs ul { list-style: none; margin: 0; padding: 0; display: grid; }
.push-devs li { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 44px; border-top: 1px solid var(--line); padding: 6px 0; }
.push-devs .btn.small { min-height: 36px; }
.push-this { font-weight: 600; }
.msg, .cta-band, .push-card, #appCode { scroll-margin-top: 84px; }
.msg.is-focus { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.cta-band.is-focus, .card.is-focus { box-shadow: 0 0 0 2px var(--accent); }
.is-focus:focus { outline: none; }
.is-focus:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .is-focus { animation: push-focus 1.2s ease-out 1; }
  @keyframes push-focus { from { box-shadow: 0 0 0 8px var(--accent-soft), 0 0 0 2px var(--accent); } }
}

/* Messaggi tra chi ha scritto e la struttura, dopo la risposta (stage75, mockup dev/developer/mockup-risposte): i messaggi dell'altra
   parte a sinistra, nel fumetto bianco di sempre; i propri a destra, nel colore tenue del sito. Nell'area, nella gestione e nella
   pagina di risposta del link. Il campo per scrivere si apre nella pagina (details), senza finestre sopra. */
.thread { display: grid; gap: 10px; }
.tm { display: grid; gap: 3px; justify-items: start; max-width: 88%; min-width: 0; }
.tm .from { font-size: 12px; color: var(--muted); }
.tm .bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 10px 12px; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.tm.mine { justify-self: end; justify-items: end; text-align: left; }
.msg .tm.mine .bubble, .tm.mine .bubble { background: var(--accent-soft); border-color: transparent; border-radius: 12px 12px 4px 12px; }
.msg.is-focus .tm.mine .bubble { background: var(--surface-2); }   /* richiesta in evidenza (fondo tenue): i propri messaggi restano visibili */
.thread-form { display: grid; gap: 8px; }
.msg > .thread, .msg > .thread-form, .msg > .thread-write { max-width: 720px; }   /* in gestione la richiesta è larga quanto la pagina */
.thread-form textarea.ctl, .msg textarea.ctl[readonly] { width: 100%; height: auto; min-height: 96px; padding: 9px 10px; line-height: 1.5; resize: vertical; }
.thread-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.thread-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.thread-write > summary { list-style: none; cursor: pointer; width: fit-content; }
.thread-write > summary::-webkit-details-marker { display: none; }
.thread-write[open] > summary { display: none; }
.status.new { background: var(--accent-soft); color: var(--accent-ink); }
.status.new::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.req { scroll-margin-top: 84px; }
/* Esito dell'invio sotto l'ultimo messaggio (TST-139): stesso testo dell'avviso in alto, verde o rosso. */
.thread-msg { margin: 0; font-size: 13.5px; font-weight: 500; line-height: 1.45; padding: 8px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); max-width: 720px; }
.thread-msg.err { background: var(--bad-soft); color: var(--bad); }

/* Chiusura, archivio e cancellazione delle conversazioni (stage76, mockup dev/developer/mockup-chiusura). Pulsanti discreti sotto la
   conversazione («ghost» grigi; «Elimina» diventa rosso solo al passaggio), riga di sistema al centro quando è chiusa, giorno della
   cancellazione, sezione «Archiviate» che si apre col tocco, domanda di conferma nel foglio del sito (o qui sotto senza JavaScript). */
.th-acts { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; margin: 0 0 -4px -10px; }
.th-acts > form { display: inline-flex; margin: 0; }
/* Solo i pulsanti discreti: senza JavaScript la domanda di conferma si apre qui dentro, e i suoi pulsanti restano quelli del sito (TST-147). */
.th-acts > form > .btn, .th-ask > summary.btn { color: var(--muted); }
.th-acts > form > .btn:hover, .th-ask > summary.btn:hover { color: var(--fg); background: var(--surface); }
.th-ask > summary.btn.del:hover { color: var(--bad); background: var(--bad-soft); }
.msg > .th-acts { border-top: 1px solid var(--line); padding-top: 6px; margin-left: -4px; }
.msg > .th-acts, .msg > .th-purge { max-width: 720px; }
.th-ask > summary { list-style: none; cursor: pointer; }
.th-ask > summary::-webkit-details-marker { display: none; }
.th-ask[open] { flex-basis: 100%; }
.th-ask-body { display: grid; gap: 10px; margin: 8px 0 6px 10px; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); max-width: 520px; }
.th-ask-body p { font-size: 14.5px; }
.th-ask-t { font-family: var(--serif); font-size: 26px; font-weight: 500; line-height: 1.1; }
.th-req { display: flex; gap: 10px; align-items: center; background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; font-size: 14px; }
.th-req b { font-weight: 600; }
.sheet-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 0; }
.sheet.confirm { width: min(480px, 100%); gap: 14px; }
.sheet.confirm .th-ask-t { font-size: 28px; padding-right: 54px; }   /* lontano dalla X del foglio (36 px a 14 px dal bordo) */
.sheet.confirm p { font-size: 14.5px; }
.tm-sys { margin: 0; justify-self: stretch; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); text-align: center; text-wrap: balance; }
.tm-sys::before, .tm-sys::after { content: ""; flex: 1 1 24px; height: 1px; background: var(--line-2); }
.th-purge { margin: 0; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: baseline; }
.th-purge .ic { align-self: center; }
.th-arch-line { display: flex; gap: 6px; align-items: baseline; }
.th-arch-line .ic { align-self: center; }
.status.closed { background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.status.closed::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.arch > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.arch > summary::-webkit-details-marker { display: none; }
.arch > summary h2, .arch > summary h3 { font-family: var(--serif); font-weight: 500; }
.arch > summary h3 { font-size: 21px; }
.arch-n { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; }
.arch > summary .chev { margin-left: auto; color: var(--muted); }
.arch[open] > summary .chev { transform: rotate(180deg); }
.arch[open] > summary { margin-bottom: 4px; }
.arch-list { display: grid; gap: 10px; }
.arch-item { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 8px; background: var(--surface); scroll-margin-top: 84px; }
.arch-item .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.arch-item.is-focus { box-shadow: 0 0 0 2px var(--accent); }
.th-show > summary { cursor: pointer; width: fit-content; }
.th-show[open] > summary { margin-bottom: 8px; }
.mgarch { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; }
.card.arch { scroll-margin-top: 84px; }
