/* Alfred · il maggiordomo della famiglia (ex Insieme, 30-11-2026). Stesso stile della console Alfred: Apple (San Francisco, sfondi
   raggruppati di iOS, titoli grandi, widget, barra delle schede in basso sul telefono e barra laterale sul computer), il maggiordomo
   in stile cartone anni '30, colori del personaggio: rosso papillon, oro, crema. Segue il tema chiaro/scuro del telefono. */
:root {
  color-scheme: light dark;
  --bg: #F2F2F7; --card: #FFFFFF; --card2: #F2F2F7; --fill: rgba(118, 118, 128, .12); --fill2: rgba(118, 118, 128, .08);
  --tx: #000000; --tx2: rgba(60, 60, 67, .62); --tx3: rgba(60, 60, 67, .32); --sep: rgba(60, 60, 67, .22); --sep2: rgba(60, 60, 67, .12);
  --acc: #D92B1E; --acc-t: #C42519; --acc-soft: rgba(217, 43, 30, .1);
  --oro: #A86B00; --crema: #FAEBD3;
  --ok: #34C759; --ok-t: #1F8A3A; --ok-soft: rgba(52, 199, 89, .14);
  --warn: #FF9500; --warn-t: #B25000; --warn-soft: rgba(255, 149, 0, .14);
  --bad: #FF3B30; --bad-t: #D70015; --bad-soft: rgba(255, 59, 48, .12);
  --vetro: rgba(249, 249, 251, .8); --ombra: 0 1px 1px rgba(0, 0, 0, .03), 0 6px 22px rgba(0, 0, 0, .06);
  --hero: linear-gradient(140deg, #FFF8EC 0%, #FBE9CF 100%); --hero-tx: #2B1A08;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  --font-d: -apple-system-headline, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --r: 20px; --r2: 14px; --r3: 10px;
  --lato: max(16px, env(safe-area-inset-left));
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --card: #1C1C1E; --card2: #2C2C2E; --fill: rgba(118, 118, 128, .24); --fill2: rgba(118, 118, 128, .16);
    --tx: #FFFFFF; --tx2: rgba(235, 235, 245, .6); --tx3: rgba(235, 235, 245, .3); --sep: rgba(84, 84, 88, .65); --sep2: rgba(84, 84, 88, .4);
    --acc: #FF5245; --acc-t: #FF6B60; --acc-soft: rgba(255, 82, 69, .16);
    --oro: #F2B53A;
    --ok: #30D158; --ok-t: #30D158; --ok-soft: rgba(48, 209, 88, .16);
    --warn: #FF9F0A; --warn-t: #FF9F0A; --warn-soft: rgba(255, 159, 10, .16);
    --bad: #FF453A; --bad-t: #FF6961; --bad-soft: rgba(255, 69, 58, .18);
    --vetro: rgba(22, 22, 24, .78); --ombra: none;
    --hero: linear-gradient(140deg, #2B2117 0%, #1C1C1E 78%); --hero-tx: #FFF3E0;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font: 16px/1.4 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body { min-height: 100svh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--acc-t); text-decoration: none; }
img { -webkit-user-drag: none; }
svg { width: 1em; height: 1em; flex: none; }
.hide { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--acc) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
.anima .rivela { opacity: 0; }

/* ---------------------------------------------------------------- bottoni e campi (come iOS) */
.tasto { width: 100%; min-height: 52px; margin-top: 4px; border-radius: 14px; background: var(--acc); color: #fff; font-weight: 600; font-size: 17px; padding: 10px 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform .12s, opacity .12s; }
.tasto:active { transform: scale(.97); opacity: .85; }
.tasto:disabled { opacity: .45; cursor: default; }
.tasto.chiaro { background: var(--fill); color: var(--tx); }
.tasto.tinto { background: var(--acc-soft); color: var(--acc-t); }
.tasto.sm { width: auto; min-height: 34px; padding: 6px 14px; font-size: 14.5px; border-radius: 99px; margin: 0; }
.link { color: var(--acc-t); font-size: inherit; font-weight: 500; }
.link.forte { font-weight: 600; }
.msg { min-height: 0; margin-top: 4px; font-size: 14.5px; font-weight: 600; color: var(--bad-t); }
.msg:empty { display: none; }
.msg.ok { color: var(--ok-t); }
.campo { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r2); padding: 9px 16px 8px; box-shadow: var(--ombra); margin-bottom: 10px; text-align: left; }
.campo span { font-size: 12px; color: var(--tx2); font-weight: 500; }
.campo input { width: 100%; border: 0; background: none; padding: 2px 0; min-height: 30px; font-size: 17px; outline: none; }
.campo:focus-within { box-shadow: var(--ombra), inset 0 0 0 2px var(--acc); }
#in-codice, #in-invito, #in-licenza { font: 700 26px/1.2 var(--mono); letter-spacing: .22em; text-transform: uppercase; }

/* ---------------------------------------------------------------- fuori: accesso, famiglia, cassa (come l'accesso di Alfred) */
.fuori { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: radial-gradient(120% 70% at 50% 0%, var(--crema) 0%, var(--bg) 60%); }
@media (prefers-color-scheme: dark) { .fuori { background: radial-gradient(120% 60% at 50% 0%, #2A2016 0%, var(--bg) 62%); } }
.fuori-dentro { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; }
.pub-alfred { width: 124px; height: auto; margin-bottom: 4px; filter: drop-shadow(0 10px 18px rgba(80, 40, 0, .18)); animation: entra .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.pub-nome { margin: 0; font: 700 40px/1.05 var(--font-d); letter-spacing: -.02em; }
.pub-sotto { margin: 2px 0 22px; color: var(--tx2); font-size: 17px; }
.passo { width: 100%; display: flex; flex-direction: column; gap: 0; text-align: center; }
.passo h1 { font: 700 26px/1.18 var(--font-d); letter-spacing: -.015em; margin-bottom: 6px; }
.passo .sotto { margin: 0 auto 18px; font-size: 15.5px; line-height: 1.45; color: var(--tx2); max-width: 360px; }
.piede { margin-top: 14px; font-size: 13.5px; color: var(--tx2); line-height: 1.55; text-align: center; }
.piede a { color: var(--tx2); text-decoration: underline; text-underline-offset: 2px; }
.prezzo { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 6px 0 16px; }
.prezzo b { font: 700 48px/1 var(--font-d); letter-spacing: -.02em; }
.prezzo span { color: var(--tx2); }
.punti { list-style: none; padding: 0; margin: 0 0 18px; background: var(--card); border-radius: var(--r2); box-shadow: var(--ombra); text-align: left; overflow: hidden; }
.punti li { position: relative; padding: 12px 16px 12px 44px; font-size: 15.5px; }
.punti li + li { border-top: .5px solid var(--sep); }
.punti li::before { content: ''; position: absolute; left: 16px; top: 14px; width: 18px; height: 18px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5 6.8 11 12 5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
@keyframes entra { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- impalcatura: schede in basso (telefono), barra laterale (computer) */
.app { min-height: 100svh; }
.vista { padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(150px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 0 auto; outline: none; }
.schede { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px max(8px, env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  background: var(--vetro); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); border-top: .5px solid var(--sep); }
.schede .side-brand, .schede .side-chiedi { display: none; }
.schede a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 2px; color: var(--tx3); font-size: 10.5px; font-weight: 600; }
.schede a svg { width: 27px; height: 27px; }
.schede a.attiva { color: var(--acc); }
.schede a.attiva svg { filter: drop-shadow(0 0 0 currentColor); }
@media (min-width: 900px) {
  .schede { top: 0; right: auto; width: 252px; display: flex; flex-direction: column; gap: 2px; padding: 22px 14px 16px; border-top: 0; border-right: .5px solid var(--sep); z-index: 10; }
  .schede .side-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 16px; }
  .side-brand img { width: 40px; height: 40px; border-radius: 11px; }
  .side-brand b { display: block; font: 700 19px/1.1 var(--font-d); letter-spacing: -.01em; }
  .side-brand span { font-size: 13px; color: var(--tx2); }
  .schede a { flex-direction: row; gap: 11px; border-radius: 10px; padding: 8px 10px; font-size: 15px; font-weight: 500; color: var(--tx); }
  .schede a svg { width: 22px; height: 22px; color: var(--acc); }
  .schede a:hover { background: var(--fill2); }
  .schede a.attiva { background: var(--fill); font-weight: 600; color: var(--tx); }
  .schede .side-chiedi { margin-top: auto; display: flex; align-items: center; gap: 10px; background: var(--hero); color: var(--hero-tx); border-radius: 16px; padding: 10px 12px; text-align: left; box-shadow: var(--ombra); }
  .side-chiedi img { width: 38px; height: 58px; object-fit: contain; object-position: top; }
  .side-chiedi b { display: block; font-size: 14.5px; } .side-chiedi small { font-size: 12px; opacity: .7; }
  .vista { margin-left: 252px; max-width: none; padding: 34px 40px 120px; gap: 18px; }
  .vista > * { width: 100%; max-width: 1000px; margin-left: auto; margin-right: auto; }
}

/* testata: data piccola + titolo grande + microfono rosso + Alfred */
.testa { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 6px 2px 2px; }
.testa .data { margin: 0 0 1px; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--tx2); }
.lt, .titolo-grande { margin: 0; font: 700 34px/1.12 var(--font-d); letter-spacing: -.025em; overflow-wrap: anywhere; }
.testa .azioni { display: flex; gap: 8px; align-items: center; flex: none; }
.mic-testa { width: 38px; height: 38px; border-radius: 50%; background: var(--acc); color: #fff; display: grid; place-items: center; flex: none; transition: transform .12s; }
.mic-testa:active { transform: scale(.92); }
.mic-testa svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.faccia { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--crema); flex: none; box-shadow: 0 0 0 .5px var(--sep); display: block; }
.faccia img { width: 100%; height: 100%; display: block; }
@media (min-width: 900px) { .faccia { display: none; } .lt, .titolo-grande { font-size: 38px; } }
.sottotitolo { margin: -8px 2px 0; color: var(--tx2); font-size: 14.5px; }

/* sezioni */
.sezione { margin: 12px 2px -4px; font: 700 22px/1.2 var(--font-d); letter-spacing: -.015em; }
.sezione.piccola { margin: 18px 18px -6px; font: 600 13px/1.3 var(--font); letter-spacing: .02em; text-transform: uppercase; color: var(--tx2); }
.nota { margin: -6px 18px 0; color: var(--tx2); font-size: 13.5px; line-height: 1.45; }
.nota a { color: var(--acc-t); }

/* il biglietto di Alfred (in cima a «Oggi») */
.hero { position: relative; border-radius: 24px; background: var(--hero); color: var(--hero-tx); padding: 18px 20px; min-height: 196px; overflow: hidden; box-shadow: var(--ombra); }
.hero::after { content: ''; position: absolute; right: -40px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 181, 58, .35), transparent 68%); pointer-events: none; }
.hero-testo { position: relative; z-index: 1; margin-right: 124px; }
.hero-img { position: absolute; z-index: 1; right: 8px; bottom: -10px; height: 196px; width: auto; filter: drop-shadow(0 8px 14px rgba(60, 30, 0, .18)); animation: entra .7s cubic-bezier(.2, .9, .3, 1.15) both; pointer-events: none; }
.hero .stato { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px 4px 8px; border-radius: 99px; background: rgba(255, 255, 255, .7); color: #1F1206; }
@media (prefers-color-scheme: dark) { .hero .stato { background: rgba(255, 255, 255, .1); color: #fff; } }
.hero h2 { margin: 10px 0 6px; font: 700 21px/1.2 var(--font-d); letter-spacing: -.01em; }
.hero .adesso { font-size: 15px; line-height: 1.45; }
.hero .adesso b { font-weight: 650; }
.hero .tools { margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .link { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (min-width: 900px) { .hero { padding: 26px 30px; min-height: 230px; } .hero-testo { margin-right: 220px; max-width: 640px; } .hero-img { height: 250px; right: 28px; bottom: -14px; } .hero h2 { font-size: 26px; } }
@media (max-width: 380px) { .hero-testo { margin-right: 100px; } .hero-img { height: 168px; } }

/* stato con pallino + parola */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--tx2); }
.st::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--tx3); flex: none; }
.st.ok { color: var(--ok-t); } .st.ok::before { background: var(--ok); }
.st.bad { color: var(--bad-t); } .st.bad::before { background: var(--bad); animation: pulsa 1.6s ease-in-out infinite; }
.st.warn { color: var(--warn-t); } .st.warn::before { background: var(--warn); }
@keyframes pulsa { 50% { box-shadow: 0 0 0 5px var(--bad-soft); } }

/* widget come quelli di iOS (riepilogo di «Oggi») */
.riepilogo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cifra { position: relative; background: var(--card); border-radius: var(--r); padding: 14px 15px; min-height: 132px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--ombra); color: inherit; overflow: hidden; transition: transform .15s; }
.cifra:active { transform: scale(.97); }
.cifra span { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--tx2); }
.cifra span svg { width: 16px; height: 16px; }
.cifra b { font: 700 30px/1.05 var(--font-d); letter-spacing: -.02em; margin-top: auto; font-variant-numeric: tabular-nums; }
.cifra small { font-size: 13px; color: var(--tx2); line-height: 1.3; }
.cifra small.rit { color: var(--bad-t); font-weight: 600; }

/* «Parla con Alfred» */
.parla-card { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; overflow: hidden; border-radius: var(--r);
  background: var(--hero); color: var(--hero-tx); padding: 12px 16px 0 10px; min-height: 104px; box-shadow: var(--ombra); transition: transform .15s; }
.parla-card:active { transform: scale(.985); }
.parla-card img { width: 78px; height: 98px; object-fit: cover; object-position: top; align-self: flex-end; flex: none; }
.parla-card .main { flex: 1; min-width: 0; padding-bottom: 12px; }
.parla-card b { display: block; font: 700 18px/1.2 var(--font-d); }
.parla-card small { display: block; margin-top: 3px; font-size: 14px; opacity: .72; line-height: 1.35; }
.parla-card .mic-testa { width: 48px; height: 48px; margin-bottom: 12px; box-shadow: 0 6px 14px rgba(217, 43, 30, .3); }
.parla-card .mic-testa svg { width: 24px; height: 24px; }

/* ---------------------------------------------------------------- liste raggruppate (iOS) */
.gruppo-lista { background: var(--card); border-radius: var(--r2); overflow: hidden; box-shadow: var(--ombra); }
.voce { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; text-align: left; color: inherit; }
.voce + .voce::before, .persona + .persona::before, .riga-imp + .riga-imp::before, .persona + .riga-imp::before, .riga-imp + .persona::before { content: ''; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--sep); }
.voce + .voce::before { left: 78px; }
button.voce:active, .voce .voce-testo:active { background: var(--fill2); }
.voce-ora { width: 46px; flex: none; font: 600 15px/1.2 var(--font); font-variant-numeric: tabular-nums; text-align: right; }
.voce-ora small { display: block; font-size: 12px; color: var(--tx2); font-weight: 500; }
.voce-segno { width: 4px; align-self: stretch; border-radius: 2px; flex: none; background: var(--c, var(--acc)); margin: 3px 0; }
.voce-testo { flex: 1; min-width: 0; }
.voce-titolo { font-size: 16px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.voce-sotto { font-size: 13.5px; color: var(--tx2); display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; }
.voce-sotto svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }
.voce-importo { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 16px; text-align: right; flex: none; }
.voce.pagata .voce-titolo, .voce.pagata .voce-importo { color: var(--tx3); text-decoration: line-through; }
.spunta { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1.5px solid var(--tx3); display: grid; place-items: center; color: transparent; transition: transform .12s; }
.spunta:active { transform: scale(.9); }
.spunta.si { background: var(--ok); border-color: var(--ok); color: #fff; }
.spunta svg { width: 14px; height: 14px; }
.pallini { display: inline-flex; gap: 3px; vertical-align: 1px; }
.pallini i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.vuoto { padding: 22px 16px; color: var(--tx2); text-align: center; font-size: 15px; }
.rit { color: var(--bad-t); font-weight: 600; }

/* ---------------------------------------------------------------- calendario del mese */
.mese-testa { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 6px 2px 0; }
.mese-testa h1 { font: 700 34px/1.12 var(--font-d); letter-spacing: -.025em; }
.mese-testa .frecce { display: flex; gap: 6px; align-items: center; flex: none; }
.mese-testa .frecce button:not(.mic-testa) { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--acc-t); }
.mese-testa .frecce button svg { width: 18px; height: 18px; }
.mese-testa .frecce button.oggi-t { width: auto; padding: 0 14px; border-radius: 99px; font-size: 14.5px; font-weight: 600; }
.griglia { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--card); border-radius: var(--r); padding: 8px; box-shadow: var(--ombra); }
.griglia .gs { text-align: center; font-size: 12px; font-weight: 600; color: var(--tx3); padding: 4px 0 8px; text-transform: uppercase; }
.giorno { aspect-ratio: 1 / 1.05; border-radius: var(--r3); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding-top: 6px; font-variant-numeric: tabular-nums; font-size: 16.5px; font-weight: 500; }
.giorno.fuori-mese { color: var(--tx3); }
.giorno.oggi > span:first-child { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: #fff; margin-top: -3px; font-weight: 700; }
.giorno.scelto { background: var(--fill); }
.giorno .pallini { flex-wrap: wrap; justify-content: center; max-width: 34px; }
.giorno .pallini i { width: 6px; height: 6px; }
@media (min-width: 900px) { .giorno { aspect-ratio: auto; height: 64px; } .mese-testa h1 { font-size: 38px; } }

/* ---------------------------------------------------------------- famiglia e impostazioni */
.persona, .riga-imp { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 16px; text-align: left; color: inherit; }
.persona + .persona::before { left: 64px; }
button.riga-imp:active { background: var(--fill2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 700; font-size: 15px; }
.persona-testo { flex: 1; min-width: 0; font-weight: 500; }
.persona-testo small { display: block; font-size: 13px; color: var(--tx2); font-weight: 400; }
.riga-imp > span:first-child { flex: 1; min-width: 0; }
.riga-imp .val { margin-left: auto; color: var(--tx2); font-size: 15px; text-align: right; }
.riga-imp svg.vai { color: var(--tx3); width: 9px; height: 15px; margin-left: 4px; }
.riga-imp.rossa { color: var(--bad-t); justify-content: center; }
.riga-imp input[type=time] { border: 0; background: var(--fill); border-radius: 8px; padding: 4px 8px; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--tx); }
.codice-invito { font: 700 32px/1 var(--mono); letter-spacing: .2em; text-align: center; padding: 20px 0 4px; }
.passi-cal { margin: 8px 0 0; padding: 0 16px 14px 36px; color: var(--tx2); font-size: 15px; line-height: 1.6; }
.tasti-due { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px 16px; }
.tasti-due .tasto { margin: 0; min-height: 44px; font-size: 15px; border-radius: 12px; }
.interr { -webkit-appearance: none; appearance: none; width: 51px; height: 31px; border-radius: 999px; background: var(--fill); position: relative; transition: background .2s; flex: none; margin: 0 0 0 auto; cursor: pointer; }
.interr::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 0 0 .5px rgba(0, 0, 0, .04); transition: transform .22s cubic-bezier(.3, .9, .3, 1); }
.interr:checked { background: var(--ok); }
.interr:checked::after { transform: translateX(20px); }
.notif { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.notif-testa { display: flex; align-items: center; gap: 12px; }
.notif-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--acc); color: #fff; display: grid; place-items: center; flex: none; }
.notif-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.notif-testa b { display: block; font-size: 17px; }
.notif .esito { font-size: 14.5px; line-height: 1.45; font-weight: 600; }
.notif .esito:empty { display: none; }
.notif .esito.ko { color: var(--bad-t); } .notif .esito.ok { color: var(--ok-t); }
.notif .riga-tasti { display: flex; gap: 8px; flex-wrap: wrap; }
.notif .anteprima { background: var(--fill2); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.notif .anteprima b { display: block; font-size: 13px; }
.barra-scarico { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin: 4px 16px 14px; }
.barra-scarico i { display: block; height: 100%; background: var(--acc); width: var(--p, 0%); transition: width .3s; }

/* ---------------------------------------------------------------- foglio: nuovo / modifica (come i fogli di iOS) */
.foglio { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.foglio-velo { position: absolute; inset: 0; background: rgba(0, 0, 0, .38); animation: velo .22s ease both; }
@keyframes velo { from { opacity: 0; } }
.foglio-carta { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 12px - env(safe-area-inset-top)); display: flex; flex-direction: column;
  background: var(--bg); border-radius: 14px 14px 0 0; overflow: clip; }
.foglio-carta::before { content: ''; width: 36px; height: 5px; border-radius: 99px; background: var(--tx3); margin: 6px auto 0; flex: none; }
.foglio-testa { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 6px 16px 8px; flex: none; }
.foglio-testa > :first-child { justify-self: start; font-size: 17px; } .foglio-testa > :last-child { justify-self: end; font-size: 17px; }
.foglio-testa h2 { font-size: 17px; font-weight: 600; text-align: center; }
.foglio-corpo { overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .foglio { align-items: center; } .foglio-carta { border-radius: 20px; max-height: min(760px, 92dvh); } .foglio-carta::before { display: none; } .foglio-testa { padding-top: 14px; } }
.segmenti { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border-radius: 10px; background: var(--fill); margin-bottom: 16px; }
.segmenti input { position: absolute; opacity: 0; pointer-events: none; }
.segmenti span, .segmenti button { display: block; text-align: center; padding: 7px 0; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--tx); }
.segmenti input:checked + span, .segmenti button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
@media (prefers-color-scheme: dark) { .segmenti input:checked + span, .segmenti button.on { background: #636366; } }
.segmenti input:focus-visible + span { outline: 2px solid var(--acc); }
.gruppo { background: var(--card); border-radius: var(--r2); margin-bottom: 16px; overflow: hidden; box-shadow: var(--ombra); }
.gruppo > .riga, .gruppo > .riga-titolo { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 16px; position: relative; }
.gruppo > * + *::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.riga-titolo { width: 100%; border: 0; background: none; outline: none; font-size: 18px; font-weight: 500; }
.riga input, .riga select { border: 0; background: none; outline: none; text-align: right; font-size: 16px; color: var(--tx2); min-width: 0; max-width: 60%; }
.riga select { -webkit-appearance: none; appearance: none; padding-right: 2px; text-align-last: right; direction: rtl; }
.riga select option { direction: ltr; }
.riga .euro { display: flex; align-items: center; gap: 4px; color: var(--tx2); }
.riga .euro input { width: 110px; max-width: none; font-variant-numeric: tabular-nums; }
.riga.interruttore input { -webkit-appearance: none; appearance: none; width: 51px; height: 31px; border-radius: 999px; background: var(--fill); position: relative; transition: background .2s; flex: none; max-width: none; }
.riga.interruttore input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15); transition: transform .22s cubic-bezier(.3, .9, .3, 1); }
.riga.interruttore input:checked { background: var(--ok); }
.riga.interruttore input:checked::after { transform: translateX(20px); }
.gruppo textarea { width: 100%; border: 0; background: none; outline: none; padding: 12px 16px; resize: vertical; font-size: 16px; }
.riga-etichetta { padding: 12px 16px 0; font-size: 13px; font-weight: 600; color: var(--tx2); text-transform: uppercase; letter-spacing: .02em; }
.chi { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 14px; }
.chi label input { position: absolute; opacity: 0; pointer-events: none; }
.chi label span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--fill); font-size: 15px; font-weight: 500; cursor: pointer; }
.chi label span::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.chi label input:checked + span { background: var(--acc); color: #fff; }
.chi label input:checked + span::before { box-shadow: 0 0 0 2px #fff; }
.chi label input:focus-visible + span { outline: 2px solid var(--acc); }
[data-tipo="impegno"] .solo-bolletta, [data-tipo="scadenza"] .solo-bolletta { display: none; }
[data-tipo="scadenza"] .solo-impegno, [data-tipo="bolletta"] .solo-impegno { display: none; }
[data-tutto="si"] .con-ora { display: none; }
.tasto-elimina { width: 100%; height: 50px; border-radius: var(--r2); background: var(--card); color: var(--bad-t); font-size: 17px; box-shadow: var(--ombra); }

/* ---------------------------------------------------------------- avviso, + */
.avviso { position: fixed; z-index: 200; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); background: var(--vetro);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: var(--tx); padding: 11px 18px; border-radius: 99px; font-weight: 600; font-size: 14.5px;
  opacity: 0; pointer-events: none; transition: .22s; box-shadow: 0 8px 30px rgba(0, 0, 0, .18), 0 0 0 .5px var(--sep); max-width: calc(100vw - 32px); text-align: center; }
.avviso.su { opacity: 1; transform: translate(-50%, 0); }
.avviso.male { color: var(--bad-t); }
@media (min-width: 900px) { .avviso { bottom: 28px; left: calc(50% + 126px); } }
.piu { position: fixed; z-index: 18; right: max(16px, env(safe-area-inset-right)); bottom: calc(80px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 50%;
  background: var(--acc); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(217, 43, 30, .32); transition: transform .12s; }
.piu:active { transform: scale(.92); }
.piu svg { width: 26px; height: 26px; }
@media (min-width: 900px) { .piu { bottom: 32px; right: 32px; } }

/* ---------------------------------------------------------------- «Mettila nella Home» */
.hm-tel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 20px 20px 16px; margin: 0 auto 16px; max-width: 300px; border-radius: var(--r); background: var(--card); box-shadow: var(--ombra); }
.hm-tel span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hm-tel span i { width: 52px; height: 52px; border-radius: 12px; background: var(--fill); }
.hm-tel span u { width: 34px; height: 6px; border-radius: 3px; background: var(--fill); }
.hm-tel .hm-mia img { width: 52px; height: 52px; border-radius: 12px; }
.hm-tel .hm-mia em { font-style: normal; font-size: 11px; color: var(--tx); }
.hm-intro { color: var(--tx2); text-align: center; margin: 0 8px 16px; line-height: 1.5; }
.hm-tab { grid-template-columns: 1fr 1fr; }
.hm-installa { margin: 0 0 16px; }
.hm-passi { list-style: none; padding: 0; margin: 0; background: var(--card); border-radius: var(--r2); box-shadow: var(--ombra); }
.hm-passi li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; position: relative; line-height: 1.45; }
.hm-passi li + li::before { content: ''; position: absolute; top: 0; left: 52px; right: 0; border-top: .5px solid var(--sep); }
.hm-n { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--acc); color: #fff; font-style: normal; font-size: 14px; font-weight: 700; }
.hm-passi span { flex: 1; font-size: 15px; }
.hm-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--fill); color: var(--acc-t); }
.hm-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hm-nota { font-size: 14px; color: var(--tx2); line-height: 1.55; margin: 12px 4px 0; }
.hm-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--ombra); text-align: left; }
.hm-banner img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.hm-banner span { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.35; }
.hm-banner small { display: block; color: var(--tx2); font-size: 13px; font-weight: 400; }
.hm-banner .vai { width: 9px; height: 15px; }

/* ---------------------------------------------------------------- chat a voce «Parla con Alfred» (identica alla console Alfred)
   Come un cartone anni '30: si apre a iride sul viso di Alfred, raggi che girano piano dietro di lui, inchino, stelline,
   nuvoletta di fumo a ogni cambio di posa, fumetti con il contorno d'inchiostro. */
dialog { position: fixed; inset: 0; z-index: 100; border: 0; padding: 0; background: transparent; color: var(--tx); max-width: none; max-height: none; width: auto; height: auto; margin: 0; overflow: hidden; overflow: clip; }
html.foglio-aperto, html.foglio-aperto body { overflow: hidden; }
.parla { --pa-ink: #1F1206; --pa-carta: #FFFDF7; --pa-tx: #2B1A08; --pa-raggi: rgba(196, 128, 18, .13); --pa-alone: rgba(242, 181, 58, .42);
  --pa-bg: radial-gradient(130% 80% at 40% 26%, #FFF7EA 0%, #FBEBD2 50%, #F1D8B0 100%); --pa-ombra: 3px 3px 0 var(--pa-ink); --pa-tasto: rgba(31, 18, 6, .08); }
@media (prefers-color-scheme: dark) {
  .parla { --pa-tx: #FBEFD9; --pa-raggi: rgba(242, 181, 58, .075); --pa-alone: rgba(242, 181, 58, .2); --pa-tasto: rgba(255, 243, 224, .1);
    --pa-bg: radial-gradient(130% 80% at 40% 26%, #3D2D1B 0%, #231910 52%, #130D07 100%); --pa-ombra: 3px 3px 0 rgba(242, 181, 58, .45); }
}
dialog.parla[open] { display: flex; align-items: stretch; justify-content: center; z-index: 110; background: rgba(20, 12, 4, .66); }
.pa { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--pa-bg); color: var(--pa-tx); overflow: hidden; overflow: clip; padding-top: env(safe-area-inset-top); }
.pa.apre { animation: pa-iride-apre .7s cubic-bezier(.65, 0, .25, 1) both; }
.pa.chiude { animation: pa-iride-chiude .62s cubic-bezier(.5, 0, .3, 1) both; pointer-events: none; }
@keyframes pa-iride-apre { from { -webkit-clip-path: circle(0 at var(--ix, 50%) var(--iy, 30%)); clip-path: circle(0 at var(--ix, 50%) var(--iy, 30%)); } to { -webkit-clip-path: circle(150vmax at var(--ix, 50%) var(--iy, 30%)); clip-path: circle(150vmax at var(--ix, 50%) var(--iy, 30%)); } }
@keyframes pa-iride-chiude { 0% { -webkit-clip-path: circle(150vmax at var(--ix, 50%) var(--iy, 30%)); clip-path: circle(150vmax at var(--ix, 50%) var(--iy, 30%)); }
  62%, 80% { -webkit-clip-path: circle(64px at var(--ix, 50%) var(--iy, 30%)); clip-path: circle(64px at var(--ix, 50%) var(--iy, 30%)); }
  100% { -webkit-clip-path: circle(0 at var(--ix, 50%) var(--iy, 30%)); clip-path: circle(0 at var(--ix, 50%) var(--iy, 30%)); } }
@media (min-width: 700px) {
  dialog.parla[open] { align-items: center; }
  .pa { width: 440px; height: min(840px, calc(100vh - 48px)); border-radius: 32px; padding-top: 0; box-shadow: 0 30px 90px rgba(0, 0, 0, .4); }
}
.pa-testa { position: relative; z-index: 3; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 8px 12px 0; min-height: 52px; }
.pa-tasto { width: 38px; height: 38px; border-radius: 50%; background: var(--pa-tasto); color: inherit; display: grid; place-items: center; transition: transform .12s; }
.pa-tasto:active { transform: scale(.92); }
.pa-tasto svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pa-tasto svg .pieno { fill: currentColor; stroke-width: 1.4; }
.pa-tasto[aria-pressed="true"] .off, .pa-tasto[aria-pressed="false"] .on { display: none; }
.pa-tasto:last-child { justify-self: end; }
.pa-stato { text-align: center; font-size: 14px; font-weight: 600; opacity: .72; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-palco { position: relative; flex: none; height: clamp(250px, 44dvh, 410px); transition: height .5s cubic-bezier(.3, .9, .3, 1); cursor: pointer; }
.pa.conversa .pa-palco { height: clamp(200px, 32dvh, 320px); }
.pa.tastiera .pa-palco { height: clamp(130px, 24dvh, 210px); }
.pa-raggi { position: absolute; left: 41%; top: 58%; width: 1500px; height: 1500px; margin: -750px 0 0 -750px; pointer-events: none;
  background: repeating-conic-gradient(var(--pa-raggi) 0deg 7.5deg, transparent 7.5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, rgba(0, 0, 0, .85) 9%, transparent 30%); mask-image: radial-gradient(circle, #000 0, rgba(0, 0, 0, .85) 9%, transparent 30%);
  animation: pa-gira 110s linear infinite; }
.pa-raggi::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, var(--pa-alone) 0, transparent 13%); }
@keyframes pa-gira { to { transform: rotate(360deg); } }
.pa-fig { position: absolute; left: 41%; bottom: 2px; height: 95%; aspect-ratio: 488 / 612; transform: translateX(-50%); }
.pa-salta { position: absolute; inset: 0; transform-origin: 50% 100%; }
.pa-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 100%; filter: drop-shadow(0 10px 16px rgba(60, 30, 0, .16)); -webkit-user-select: none; user-select: none; }
.pa-ombra { position: absolute; left: 50%; bottom: -1%; width: 58%; height: 6%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 20, 0, .26), transparent); }
@media (prefers-color-scheme: dark) { .pa-ombra { background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); } .pa-fig img { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); } }
.pa.apre .pa-fig img { animation: pa-entra .8s .18s cubic-bezier(.3, .8, .3, 1) both; }
@keyframes pa-entra { 0% { transform: translateY(75%) scale(.62, 1.32); opacity: 0; } 42% { transform: translateY(-7%) scale(.9, 1.12); opacity: 1; }
  62% { transform: translateY(0) scale(1.14, .84); } 78% { transform: scale(.95, 1.06); } 100% { transform: none; } }
.pa-fig img.pop { animation: pa-pop .38s cubic-bezier(.3, .8, .3, 1.2) both; }
@keyframes pa-pop { 0% { transform: scale(1.12, .86); } 55% { transform: scale(.95, 1.07); } 100% { transform: none; } }
.pa[data-stato="attesa"] .pa-salta, .pa[data-stato="ascolta"] .pa-salta { animation: pa-dondola 1.5s ease-in-out infinite; }
.pa[data-stato="ascolta"] .pa-salta { animation-duration: 1.1s; }
.pa[data-stato="pensa"] .pa-salta { animation: pa-pensa 2.6s ease-in-out infinite; }
.pa[data-stato="parla"] .pa-salta { animation: pa-parla .62s ease-in-out infinite; }
.pa[data-stato="attesa"] .pa-ombra, .pa[data-stato="ascolta"] .pa-ombra { animation: pa-ombra 1.5s ease-in-out infinite; }
.pa[data-stato="ascolta"] .pa-ombra { animation-duration: 1.1s; }
.pa[data-stato="parla"] .pa-ombra { animation: pa-ombra .62s ease-in-out infinite; }
@keyframes pa-dondola { 0%, 50%, 100% { transform: translateY(0) scale(1, 1); } 22% { transform: translateY(-1.6%) scale(.985, 1.02) rotate(-1.2deg); }
  50% { transform: translateY(0) scale(1.025, .975); } 72% { transform: translateY(-1.6%) scale(.985, 1.02) rotate(1.2deg); } }
@keyframes pa-pensa { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg) translateY(-.8%); } }
@keyframes pa-parla { 0%, 100% { transform: translateY(0) scale(1.015, .985); } 50% { transform: translateY(-1.8%) scale(.99, 1.015); } }
@keyframes pa-ombra { 0%, 50%, 100% { transform: translateX(-50%) scale(1); } 22%, 72% { transform: translateX(-50%) scale(.9); opacity: .8; } }
.pa-onde { position: absolute; left: -9%; top: 7%; width: 17%; height: auto; overflow: visible; opacity: 0; transition: opacity .25s; }
.pa-onde path { fill: none; stroke: var(--pa-ink); stroke-width: 5; stroke-linecap: round; opacity: 0; }
.pa[data-stato="ascolta"] .pa-onde path { animation: pa-onda 1.3s var(--d, 0s) ease-out infinite; }
@media (prefers-color-scheme: dark) { .pa-onde path { stroke: #F6E3BF; } }
.pa-onde path:nth-child(2) { --d: .18s; } .pa-onde path:nth-child(1) { --d: .36s; }
.pa[data-stato="ascolta"] .pa-onde { opacity: 1; }
.pa.senti .pa-onde path { stroke-width: 6.5; animation-duration: .7s; }
@keyframes pa-onda { 0% { opacity: 0; transform: translateX(-5px); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateX(5px); } }
.pa-pensiero { position: absolute; left: 78%; top: -9%; width: 44%; height: 25%; opacity: 0; transform: scale(.4); transform-origin: 0 100%; transition: opacity .2s, transform .35s cubic-bezier(.3, .9, .3, 1.3); pointer-events: none; }
.pa[data-stato="pensa"] .pa-pensiero { opacity: 1; transform: none; transition-delay: .25s; }
.pa-pensiero i, .pa-pensiero span { position: absolute; background: var(--pa-carta); border: 2.5px solid var(--pa-ink); border-radius: 50%; }
.pa-pensiero i:nth-child(1) { left: 0; bottom: 4%; width: 10%; aspect-ratio: 1; }
.pa-pensiero i:nth-child(2) { left: 10%; bottom: 24%; width: 15%; aspect-ratio: 1; }
.pa-pensiero span { left: 22%; top: 0; width: 76%; height: 62%; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 9%; box-shadow: var(--pa-ombra); }
.pa-pensiero b { width: 11%; aspect-ratio: 1; border-radius: 50%; background: var(--pa-ink); }
.pa[data-stato="pensa"] .pa-pensiero b { animation: pa-puntino 1.1s var(--d, 0s) ease-in-out infinite; }
.pa-pensiero b:nth-child(2) { --d: .15s; } .pa-pensiero b:nth-child(3) { --d: .3s; }
@keyframes pa-puntino { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-45%); opacity: 1; } }
.pa-puff { position: absolute; left: 50%; top: 46%; width: 92%; transform: translate(-50%, -50%) scale(0); opacity: 0; pointer-events: none; overflow: visible; }
.pa-puff .bordo circle { fill: var(--pa-ink); stroke: var(--pa-ink); stroke-width: 7; }
.pa-puff .dentro circle { fill: var(--pa-carta); }
.pa-puff.va { animation: pa-puff .46s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes pa-puff { 0% { transform: translate(-50%, -50%) scale(.25); opacity: 1; } 38% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; } }
.pa-stelle i { position: absolute; width: var(--s); height: var(--s); background: var(--pa-ink); pointer-events: none; transform: scale(0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath d='M0-10C.9-3 3-.9 10 0 3 .9.9 3 0 10-.9 3-3 .9-10 0-3-.9-.9-3 0-10z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath d='M0-10C.9-3 3-.9 10 0 3 .9.9 3 0 10-.9 3-3 .9-10 0-3-.9-.9-3 0-10z'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: pa-brilla 3.2s var(--d) ease-in-out infinite; }
@media (prefers-color-scheme: dark) { .pa-stelle i { background: #F2B53A; } }
.pa.apre .pa-stelle i { animation: pa-scoppio .9s calc(.55s + var(--d) / 6) cubic-bezier(.3, .9, .3, 1.4) both, pa-brilla 3.2s calc(1.6s + var(--d)) ease-in-out infinite; }
@keyframes pa-brilla { 0%, 55%, 100% { transform: scale(0) rotate(0); } 20% { transform: scale(1) rotate(30deg); } 38% { transform: scale(.7) rotate(60deg); } }
@keyframes pa-scoppio { 0% { transform: scale(0) rotate(-40deg); } 60% { transform: scale(1.3) rotate(10deg); } 100% { transform: scale(0) rotate(45deg); } }
.pa-fumetto { position: absolute; left: 76%; top: 1%; width: max-content; max-width: min(190px, 44vw); padding: 9px 14px 10px; background: var(--pa-carta); color: #1F1206; border: 2.5px solid var(--pa-ink);
  border-radius: 20px; box-shadow: var(--pa-ombra); font: 700 17px/1.25 var(--font-d); transform: scale(0); transform-origin: 0 100%; opacity: 0; pointer-events: none; z-index: 2; }
.pa-fumetto::before, .pa-fumetto::after { content: ''; position: absolute; left: 10px; bottom: -13px; border: 7px solid transparent; border-top: 9px solid var(--pa-ink); border-left-width: 2px; transform: skewX(28deg); }
.pa-fumetto::after { left: 11px; bottom: -8px; border-top-color: var(--pa-carta); border-width: 6px 6px 0 1px; border-top-width: 7px; }
.pa-fumetto.su { animation: pa-fumetto .45s cubic-bezier(.3, .9, .3, 1.35) both; }
@keyframes pa-fumetto { from { transform: scale(0) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-color-scheme: dark) { .pa-fumetto { border-color: #1F1206; } }
.pa-chat { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 10px;
  -webkit-mask-image: linear-gradient(transparent 0, #000 18px); mask-image: linear-gradient(transparent 0, #000 18px); }
.pa-chat > :first-child { margin-top: auto; }
.pa-msg { max-width: 86%; padding: 9px 14px 10px; border-radius: 20px; font-size: 16px; line-height: 1.42; border: 2px solid var(--pa-ink); box-shadow: var(--pa-ombra); overflow-wrap: anywhere; }
.pa-msg.io { align-self: flex-end; background: var(--acc); color: #fff; border-bottom-right-radius: 6px; animation: pa-io .3s cubic-bezier(.3, .9, .3, 1.2) both; }
.pa-msg.alfred { align-self: flex-start; background: var(--pa-carta); color: #1F1206; border-bottom-left-radius: 6px; transform-origin: 0 0; animation: pa-vassoio .55s cubic-bezier(.3, .9, .3, 1.15) both; }
.pa-msg.alfred.errore { background: #FFF1EE; }
.pa-msg.bozza { opacity: .6; border-style: dashed; box-shadow: none; animation: none; }
.pa-msg.vecchio { animation: none; opacity: .62; box-shadow: none; }
.pa-msg .pa-w { opacity: 0; animation: pa-parola .32s calc(var(--i) * 32ms + .25s) ease-out forwards; }
@keyframes pa-io { from { transform: translateY(12px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pa-vassoio { 0% { transform: translate(18px, -70px) scale(.2) rotate(-10deg); opacity: 0; } 60% { transform: scale(1.03); opacity: 1; } 100% { transform: none; } }
@keyframes pa-parola { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }
/* sotto la risposta: cosa ha fatto Alfred, con «Annulla» (e i tasti per mandare un invito) */
.pa-fatti { align-self: flex-start; max-width: 92%; display: flex; flex-direction: column; gap: 6px; margin: -2px 0 2px 6px; animation: pa-io .35s .25s cubic-bezier(.3, .9, .3, 1.2) both; }
.pa-fatto { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.pa-fatto::before { content: ''; width: 18px; height: 18px; border-radius: 50%; flex: none; border: 2px solid var(--pa-ink); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5 6.8 11 12 5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }
.pa-fatto.tolto::before { background-color: var(--tx3); }
.pa-fatto span { flex: 1; min-width: 0; }
.pa-fatto button, .pa-fatti .pa-chip { flex: none; border: 2px solid var(--pa-ink); background: var(--pa-carta); color: #1F1206; border-radius: 99px; padding: 3px 11px; font-size: 13px; font-weight: 700; box-shadow: 2px 2px 0 var(--pa-ink); }
.pa-fatto button:active, .pa-fatti .pa-chip:active { transform: translate(2px, 2px); box-shadow: none; }
.pa-fatti .riga-chip { display: flex; gap: 8px; flex-wrap: wrap; }
.pa-fatti .pa-chip.rosso { background: var(--acc); color: #fff; }
.pa-barra { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); }
.pa-in { flex: 1; min-width: 0; height: 50px; border-radius: 25px; border: 2px solid var(--pa-ink); background: var(--pa-carta); color: #1F1206; padding: 0 18px; font-size: 16px; outline: none; box-shadow: var(--pa-ombra); }
.pa-in::placeholder { color: rgba(31, 18, 6, .45); }
.pa-in:focus-visible { box-shadow: var(--pa-ombra), 0 0 0 4px color-mix(in srgb, var(--acc) 30%, transparent); }
.pa-mic, .pa-manda { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 2.5px solid var(--pa-ink); background: var(--acc); color: #fff; display: grid; place-items: center; padding: 0; box-shadow: var(--pa-ombra); transition: transform .12s; }
.pa-mic:active, .pa-manda:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pa-ink); }
.pa-mic svg, .pa-manda svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pa-manda { display: none; background: var(--pa-ink); color: var(--pa-carta); }
@media (prefers-color-scheme: dark) { .pa-manda { background: #F2B53A; color: #1F1206; } }
.pa-barra.scrive .pa-manda { display: grid; } .pa-barra.scrive .pa-mic { display: none; }
.pa-mic.on { animation: pa-mic 1.2s ease-out infinite; }
@keyframes pa-mic { 0% { box-shadow: var(--pa-ombra), 0 0 0 0 rgba(217, 43, 30, .45); } 100% { box-shadow: var(--pa-ombra), 0 0 0 18px rgba(217, 43, 30, 0); } }
.pa-idee { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-bottom: 4px; }
.pa-idee span { flex: 1 1 100%; text-align: center; font-size: 13px; font-weight: 600; opacity: .6; margin-bottom: 2px; }
.pa-idee button { border: 2px solid var(--pa-ink); background: var(--pa-carta); color: #1F1206; border-radius: 99px; padding: 7px 13px; font-size: 14.5px; font-weight: 600;
  box-shadow: 2px 2px 0 var(--pa-ink); animation: pa-io .4s calc(.9s + var(--n, 0) * 80ms) cubic-bezier(.3, .9, .3, 1.2) both; transition: transform .12s; }
.pa-idee button:nth-of-type(2) { --n: 1; } .pa-idee button:nth-of-type(3) { --n: 2; } .pa-idee button:nth-of-type(4) { --n: 3; }
.pa-idee button:active { transform: translate(2px, 2px); box-shadow: none; }
@media (prefers-color-scheme: dark) { .pa-idee button { box-shadow: 2px 2px 0 rgba(242, 181, 58, .45); } }
@media (prefers-reduced-motion: reduce) {
  .pa, .pa *, .pa *::before, .pa *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .pa-raggi { animation: none !important; }
  * { transition: none !important; }
}

/* =====================================================================================================================
   VETRO (30-11-2026, Paolo: «stile più raffinato tipo Quota, con quell'effetto iPhone schermate glass… però tieni i colori di Alfred»).
   Come lo stile vetro di Quota, ma coi colori del maggiordomo: fondo crema e oro con un bagliore rosso papillon (di notte: nero frac con
   bagliori d'oro e di rosso), schede di vetro smerigliato, barra delle schede e barra laterale di vetro nero frac che galleggiano,
   tasti rossi lucidi. Niente grana sugli sfondi.
   ===================================================================================================================== */
:root {
  --card: rgba(255, 255, 255, .6); --card2: rgba(255, 255, 255, .45); --fill: rgba(31, 18, 6, .07); --fill2: rgba(31, 18, 6, .045);
  --tx2: rgba(43, 26, 8, .62); --tx3: rgba(43, 26, 8, .36); --sep: rgba(43, 26, 8, .12); --sep2: rgba(43, 26, 8, .07);
  --vetro: rgba(255, 255, 255, .6); --vetro-bordo: rgba(255, 255, 255, .78);
  --frac: rgba(24, 13, 6, .86); --frac-bordo: rgba(255, 255, 255, .12);
  --ombra: 0 1px 0 rgba(255, 255, 255, .75) inset, 0 1px 2px rgba(60, 30, 5, .05), 0 12px 32px rgba(90, 45, 10, .1);
  --sfoca: blur(24px) saturate(170%);
  --rosso-lucido: linear-gradient(180deg, #EC4334 0%, #D92B1E 55%, #BF2116 100%);
  --hero: linear-gradient(140deg, rgba(255, 251, 243, .86) 0%, rgba(252, 234, 205, .74) 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --card: rgba(44, 30, 20, .52); --card2: rgba(60, 42, 28, .5); --fill: rgba(255, 240, 220, .1); --fill2: rgba(255, 240, 220, .06);
    --tx2: rgba(255, 243, 224, .62); --tx3: rgba(255, 243, 224, .34); --sep: rgba(255, 240, 220, .12); --sep2: rgba(255, 240, 220, .07);
    --vetro: rgba(40, 27, 18, .55); --vetro-bordo: rgba(255, 240, 220, .1);
    --frac: rgba(4, 2, 1, .72); --frac-bordo: rgba(255, 240, 220, .1);
    --ombra: 0 1px 0 rgba(255, 240, 220, .06) inset, 0 16px 40px rgba(0, 0, 0, .4);
    --hero: linear-gradient(140deg, rgba(74, 50, 26, .72) 0%, rgba(40, 26, 16, .6) 100%);
  }
}
html, body { background-color: #F4E2C6; }
body {
  background-image:
    radial-gradient(800px 560px at 96% -12%, rgba(217, 43, 30, .14), transparent 60%),
    radial-gradient(900px 620px at 70% -20%, rgba(242, 181, 58, .3), transparent 62%),
    radial-gradient(1000px 760px at -14% 108%, rgba(242, 181, 58, .5), transparent 60%),
    radial-gradient(700px 520px at 50% 35%, rgba(255, 249, 238, .55), transparent 70%),
    linear-gradient(160deg, #FFF8EC 0%, #FBE8CB 48%, #F1CC9B 100%);
  background-attachment: fixed;
}
@media (prefers-color-scheme: dark) {
  html, body { background-color: #0E0805; }
  body {
    background-image:
      radial-gradient(900px 640px at 92% -10%, rgba(242, 181, 58, .2), transparent 62%),
      radial-gradient(1000px 760px at -14% 108%, rgba(217, 43, 30, .3), transparent 60%),
      linear-gradient(160deg, #120B07 0%, #22150D 52%, #3A1B0E 100%);
  }
}

/* superfici di vetro */
.gruppo-lista, .gruppo, .cifra, .griglia, .hm-banner, .hm-passi, .hm-tel, .campo, .punti, .tasto-elimina {
  background: var(--card); border: 1px solid var(--vetro-bordo); -webkit-backdrop-filter: var(--sfoca); backdrop-filter: var(--sfoca); box-shadow: var(--ombra); }
.gruppo-lista, .gruppo, .hm-passi, .punti { border-radius: 18px; }
.cifra, .griglia, .hm-banner { border-radius: 22px; }
.hero, .parla-card { border: 1px solid var(--vetro-bordo); -webkit-backdrop-filter: var(--sfoca); backdrop-filter: var(--sfoca);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 18px 44px rgba(120, 60, 10, .16); }
@media (prefers-color-scheme: dark) { .hero, .parla-card { box-shadow: 0 1px 0 rgba(255, 240, 220, .08) inset, 0 20px 50px rgba(0, 0, 0, .45); } }
.hero { border-radius: 28px; }
.hero::after { background: radial-gradient(circle, rgba(242, 181, 58, .45), transparent 68%); }
.cifra:hover, button.voce:hover { background-color: rgba(255, 255, 255, .7); }
@media (prefers-color-scheme: dark) { .cifra:hover, button.voce:hover { background-color: rgba(70, 48, 30, .55); } }
.spunta { background: rgba(255, 255, 255, .5); }
.spunta.si { background: var(--ok); }

/* tasti rossi lucidi, come i bottoni di Quota ma col rosso del papillon */
.tasto, .mic-testa, .piu, .parla-card .mic-testa { background: var(--rosso-lucido); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 8px 20px rgba(217, 43, 30, .32); }
.tasto.chiaro { background: rgba(255, 255, 255, .7); color: var(--tx); border: 1px solid var(--vetro-bordo); box-shadow: 0 1px 2px rgba(60, 30, 5, .06); }
.tasto.tinto { background: var(--acc-soft); box-shadow: none; }
@media (prefers-color-scheme: dark) { .tasto.chiaro { background: rgba(255, 240, 220, .1); } }
.faccia { box-shadow: 0 0 0 2px rgba(255, 255, 255, .8), 0 6px 16px rgba(90, 45, 10, .18); }
.piu { box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 12px 28px rgba(217, 43, 30, .38); }

/* barra delle schede: vetro nero frac che galleggia (come le app di iPhone), la scheda accesa è una pillola rossa */
.schede { left: max(14px, env(safe-area-inset-left)); right: calc(max(14px, env(safe-area-inset-right)) + 74px); bottom: max(10px, env(safe-area-inset-bottom)); padding: 6px;
  border-radius: 30px; border: 1px solid var(--frac-bordo); background: var(--frac); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 18px 44px rgba(30, 12, 2, .34); gap: 4px; }
.schede a { color: rgba(255, 246, 232, .66); border-radius: 24px; padding: 6px 0 5px; font-size: 10px; transition: background .2s, color .2s; }
.schede a svg { width: 25px; height: 25px; }
.schede a.attiva { color: #fff; background: var(--rosso-lucido); box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, 0 8px 20px rgba(217, 43, 30, .42); }
.vista { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
.piu { right: max(14px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); width: 64px; height: 64px; border: 1px solid rgba(255, 255, 255, .22); }
.piu svg { width: 28px; height: 28px; }
.avviso { bottom: calc(104px + env(safe-area-inset-bottom)); background: var(--frac); color: #fff; border: 1px solid var(--frac-bordo); }
.avviso.male { color: #FF9C93; }

/* computer: barra laterale di vetro nero frac e il lavoro dentro un grande pannello di vetro chiaro (come Quota) */
@media (min-width: 900px) {
  .schede { top: 16px; bottom: 16px; left: 16px; right: auto; width: 252px; font-size: 15px; border-radius: 26px; padding: 20px 12px 14px; gap: 2px; display: flex; }
  .schede .side-brand b { color: #fff; } .schede .side-brand span { color: rgba(255, 246, 232, .55); }
  .schede a { color: rgba(255, 246, 232, .78); padding: 9px 12px; border-radius: 12px; font-size: 15px; }
  .schede a svg { color: inherit; }
  .schede a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .schede a.attiva { color: #fff; background: var(--rosso-lucido); }
  .schede .side-chiedi { background: linear-gradient(140deg, rgba(255, 248, 236, .95), rgba(250, 230, 200, .9)); color: #2B1A08; }
  .vista { margin: 16px 16px 16px 284px; padding: 30px 36px 60px; min-height: calc(100vh - 32px); border-radius: 30px; background: rgba(255, 252, 246, .5);
    border: 1px solid rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 30px 80px rgba(110, 55, 10, .18); }
  .vista > * { max-width: 1040px; }
  .piu { right: 36px; bottom: 36px; width: 56px; height: 56px; }
  .avviso { bottom: 30px; left: calc(50% + 142px); }
}
@media (min-width: 900px) and (prefers-color-scheme: dark) {
  .vista { background: rgba(30, 20, 13, .45); border-color: rgba(255, 240, 220, .08); box-shadow: 0 1px 0 rgba(255, 240, 220, .05) inset, 0 30px 80px rgba(0, 0, 0, .5); }
}

/* accesso: il fondo crema e oro, campi di vetro */
.fuori { background: none; }
.campo input { background: none; }
.punti li + li { border-top-color: var(--sep); }

/* fogli (nuovo/modifica, Home, Siri): vetro chiaro quasi pieno, si legge sopra a tutto */
.foglio-velo { background: rgba(30, 14, 4, .34); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.foglio-carta { background: rgba(253, 247, 238, .9); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%); border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: 0 -10px 50px rgba(60, 25, 5, .25); }
.foglio .gruppo, .foglio .hm-passi, .foglio .hm-tel { background: rgba(255, 255, 255, .75); }
@media (prefers-color-scheme: dark) {
  .foglio-carta { background: rgba(28, 18, 12, .9); border-color: rgba(255, 240, 220, .08); }
  .foglio .gruppo, .foglio .hm-passi, .foglio .hm-tel { background: rgba(60, 42, 28, .55); }
}
.segmenti { background: rgba(31, 18, 6, .08); }

/* =====================================================================================================================
   APPUNTAMENTI · PAGAMENTI · SPESE (30-11-2026 sera): schede nuove al posto di «Scadenze», spese divise come Splitwise
   ===================================================================================================================== */
/* telefono: 5 schede (Famiglia si apre dalla faccina di Alfred in alto), barra a tutta larghezza, il + galleggia sopra a destra */
@media (max-width: 899px) {
  .schede { grid-template-columns: repeat(5, 1fr); right: max(14px, env(safe-area-inset-right)); }
  .schede a[data-vista="famiglia"] { display: none; }
  .schede a { font-size: 9.5px; letter-spacing: -.01em; padding: 6px 0 5px; min-width: 0; }
  .schede a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
  .piu { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 76px); width: 54px; height: 54px; background: rgba(255, 255, 255, .82); color: var(--acc);
    border: 1px solid rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
    box-shadow: 0 1px 0 #fff inset, 0 10px 26px rgba(90, 40, 5, .22); }
  .piu svg { width: 26px; height: 26px; }
  .avviso { bottom: calc(150px + env(safe-area-inset-bottom)); }
}
@media (max-width: 899px) and (prefers-color-scheme: dark) { .piu { background: rgba(60, 40, 26, .78); border-color: rgba(255, 240, 220, .14); color: #FF7166; box-shadow: 0 10px 26px rgba(0, 0, 0, .45); } }

/* filtri per persona (Appuntamenti) */
.filtri { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 4px; }
.filtri::-webkit-scrollbar { display: none; }
.filtri button { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px; font-size: 14.5px; font-weight: 600;
  background: var(--card); border: 1px solid var(--vetro-bordo); -webkit-backdrop-filter: var(--sfoca); backdrop-filter: var(--sfoca); color: var(--tx); box-shadow: 0 1px 2px rgba(60, 30, 5, .05); }
.filtri button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.filtri button.on { background: var(--rosso-lucido); color: #fff; border-color: transparent; box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, 0 6px 16px rgba(217, 43, 30, .3); }
.filtri button.on i { box-shadow: 0 0 0 2px #fff; }

/* icone delle categorie */
.cat-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, rgba(255, 255, 255, .6)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent) inset; }
.cat-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cat-ic.piccola { width: 26px; height: 26px; border-radius: 8px; }
.cat-ic.piccola svg { width: 15px; height: 15px; }
@media (prefers-color-scheme: dark) { .cat-ic { background: color-mix(in srgb, var(--c) 22%, transparent); } }
.voce.spesa { min-height: 62px; }
.voce.spesa + .voce.spesa::before { left: 66px; }
.voce.spesa .voce-sotto { flex-direction: column; gap: 0; }
.avatar.mini { width: 30px; height: 30px; font-size: 13px; }

/* Spese: mese, totale, barre per categoria, chi deve a chi */
.mese-scelta { display: flex; align-items: center; justify-content: center; gap: 14px; margin: -4px 0 -2px; }
.mese-scelta b { min-width: 150px; text-align: center; font-size: 16px; font-weight: 650; }
.mese-scelta button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--acc-t); background: var(--card); border: 1px solid var(--vetro-bordo); }
.mese-scelta button svg { width: 16px; height: 16px; }
.mese-scelta button:disabled { opacity: .35; }
.hero-spese .cifra-grande { font: 700 40px/1.05 var(--font-d); letter-spacing: -.025em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.cat-barre { display: grid; gap: 8px; margin-top: 14px; }
.cat-barra { display: grid; grid-template-columns: 26px 92px 1fr auto; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; }
.cat-barra span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-barra i { height: 8px; border-radius: 99px; background: rgba(43, 26, 8, .08); overflow: hidden; }
.cat-barra i b { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.cat-barra em { font-style: normal; font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .cat-barra i { background: rgba(255, 240, 220, .1); } }
.riga-imp.debito { gap: 10px; }
.riga-imp.debito > .avatar { flex: none; }   /* il tondo resta tondo: la regola «span:first-child flex:1» lo allargava */
.riga-imp.debito > span:nth-child(2) { flex: 1; min-width: 0; font-size: 15px; line-height: 1.35; }
.riga-imp.debito b { font-weight: 650; }
.segmenti.tre { grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
.segmenti.tre button { padding: 8px 4px; }

/* fogli Spesa e «Chi ha pagato?» */
.importo-grande { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 4px 0 18px; }
.importo-grande input { width: 7.2ch; border: 0; background: none; outline: none; text-align: right; font: 700 46px/1.1 var(--font-d); letter-spacing: -.02em; color: var(--tx); font-variant-numeric: tabular-nums; padding: 0; }
.importo-grande input::placeholder { color: var(--tx3); }
.importo-grande span { font: 700 34px/1 var(--font-d); color: var(--tx2); }
.cat-scelta { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; padding: 10px 12px 14px; }
.cat-scelta input { position: absolute; opacity: 0; pointer-events: none; }
.cat-scelta span { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 7px; border-radius: 12px; font-size: 14px; font-weight: 600; background: var(--fill2); cursor: pointer; }
.cat-scelta input:checked + span { background: var(--acc-soft); color: var(--acc-t); box-shadow: 0 0 0 1.5px var(--acc) inset; }
.cat-scelta input:focus-visible + span { outline: 2px solid var(--acc); }
.chi-paga .conto::before { border-radius: 3px; }
.paga-cosa { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px; border-radius: 18px; background: rgba(255, 255, 255, .75); }
.paga-cosa div { flex: 1; min-width: 0; } .paga-cosa b { display: block; font-size: 17px; } .paga-cosa small { color: var(--tx2); font-size: 13.5px; }
.paga-cosa em { font-style: normal; font: 700 20px/1 var(--font-d); font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .paga-cosa { background: rgba(60, 42, 28, .55); } }
#paga-corpo > .tasto { margin-top: 0; }
/* ritocchi: «Appuntamenti» intero nella barra; Spese con le barre per categoria a tutta larghezza sotto il maggiordomo */
@media (max-width: 899px) {
  .schede { padding: 5px; gap: 2px; }
  .schede a { font-size: 9px; letter-spacing: -.025em; }
  .schede a span { padding: 0; text-overflow: clip; }
}
.hero-spese .hero-testo { margin-right: 0; }
.hero-spese .hero-testo > :not(.cat-barre) { margin-right: 112px; }
.hero-spese .hero-img { height: 122px; top: 14px; bottom: auto; right: 4px; }
.cat-barra { grid-template-columns: 26px minmax(70px, 110px) minmax(40px, 1fr) auto; }
.cat-barra i { display: block; }
.cat-barra em { white-space: nowrap; }
@media (min-width: 900px) { .hero-spese .hero-img { height: 210px; top: 18px; right: 30px; } .hero-spese .hero-testo > :not(.cat-barre) { margin-right: 220px; } .hero-spese .cat-barre { max-width: 640px; } }

/* codice licenza (4-12-2026): ben visibile alla cassa, subito sotto «Paga»; facoltativo quando si crea la famiglia */
#b-ho-licenza { margin-top: 10px; }
#cassa-msg:not(:empty) { margin-top: 10px; }
.campo .facolt { font-style: normal; font-weight: 400; opacity: .75; }
#f-cassa .punti { margin-top: 22px; }
.fuori.compatto .pub-alfred { width: 76px; }
.fuori.compatto .pub-nome { font-size: 30px; }
.fuori.compatto .pub-sotto { margin-bottom: 14px; font-size: 15px; }
.prezzo b { white-space: nowrap; }
