/* ============================================================
   TRACCIACASA — DESIGN SYSTEM
   Identità: "PETROLIO". Verde petrolio profondo (brand) + jade (azioni),
   su off-white freddo. Calma, seria, distintiva — mai allarmante.
   Marchio: "la traccia" (il segno del gesso sul muro).
   Valori VINCOLANTI: non aggiungere colori/font/ombre non elencati qui.
   ============================================================ */

/* ---------- FONT — Inter self-hosted (nessun CDN esterno: privacy/GDPR) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/InterVariable.woff2?v=2") format("woff2");
}

/* ---------- TOKEN ---------- */
:root {
  /* Base — le quattro superfici sono una SCALA: pagina → fascia → tenue → binario.
     Se si avvicinano fra loro, chip e barre spariscono. Vedi DESIGN.md §2. */
  --bg:        #F1F7F4;   /* sfondo pagina — è l'off-white del logo */
  --bg-card:   #FFFFFF;   /* card / elementi in rilievo */
  --band:      #EDF3F0;   /* fascia di sezione: contrasto leggero */
  --bg-2:      #E7EFEB;   /* superfici tenui: input, chip, pill */
  --track:     #D7E4DD;   /* parte vuota delle barre di avanzamento */
  --border:    #DAE5DF;
  --hair:      rgba(14,59,52,.10);  /* bordo capello, da usare come inset box-shadow */
  --text:      #14231C;
  --text-2:    #566860;
  --text-3:    #95A29B;

  /* Brand — petrolio profondo (superfici di brand: hero, header, login) */
  --brand:       #0E3B34;
  --brand-hover: #0B2F29;
  --brand-dim:   #9DC3B8;  /* testo tenue su fondo brand */
  --mark:        #48C39B;  /* il segno "traccia" su fondo brand */

  /* Accento — jade (azioni, un solo accento). Scurito per contrasto AA (~6:1 su bianco). */
  --accent:       #0F6E56;
  --accent-hover: #0C5A46;
  --accent-light: #E7F3EC;

  /* Semantici (solo flag e stati — mai decorativi) */
  --red:    #B42318;  --red-bg:   #FEF3F2;
  --amber:  #B54708;  --amber-bg: #FFFAEB;
  /* Ambra dei SEGNALI (DESIGN.md §2): l'unico accento fuori dal verde.
     Diverso da --amber, che è il vecchio ambra semantico per il testo. */
  --amber-strong: #E8912A;  --amber-ink: #8A5214;  --amber-soft: #FBEDD5;
  --amber-line:   #F1D9AE;
  --info:   #0E3B34;  --info-bg:  #E7F3EC;
  --green:  #0F6E56;  --green-bg: #E7F3EC;

  /* Spaziature (scala 4px) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px;

  /* Forme (soft-depth stile iOS) */
  --radius:      12px;
  --radius-sm:   6px;
  --radius-lg:   16px;
  --pad-screen:  20px;

  /* Ombre — profondità morbida a strati (mai marcate, mai glow, mai gradienti) */
  --shadow-card: 0 1px 2px rgba(16,24,40,0.05), 0 4px 12px rgba(16,24,40,0.04);
  --shadow-btn:  0 1px 2px rgba(16,24,40,0.12), inset 0 1px 0 rgba(255,255,255,0.14);
  --shadow-pop:  0 8px 24px rgba(16,24,40,0.10);

  /* Elevazione a DUE luci, tinta di petrolio invece che di nero:
     su un fondo verdino un'ombra grigia sporca. Vedi DESIGN.md §5. */
  --el-1: 0 1px 2px rgba(14,59,52,.05), 0 2px 6px -2px rgba(14,59,52,.07);
  --el-2: 0 2px 4px rgba(14,59,52,.05), 0 10px 22px -10px rgba(14,59,52,.16);
  --el-3: 0 4px 10px rgba(14,59,52,.07), 0 20px 44px -16px rgba(14,59,52,.30);

  /* Movimento */
  --t-screen: 180ms ease-out;
  --t-press:  100ms ease-out;
  --t-soft:   200ms ease-out;

  /* Durate e curve — DESIGN.md §6. Ogni animazione ne sceglie una, non improvvisa. */
  --m-press:   100ms;  /* pressione */
  --m-state:   180ms;  /* hover, colore, chip */
  --m-enter:   260ms;  /* comparsa */
  --m-settle:  420ms;  /* entrata che si posa */
  --m-sheet:   340ms;  /* foglio dal basso */
  --m-stagger:  45ms;  /* sfalsamento in fila */
  --e-out:   cubic-bezier(.22,.61,.36,1);  /* decelerata: per ciò che arriva */
  --e-inout: cubic-bezier(.5,0,.2,1);      /* simmetrica: per ciò che si sposta */
}

/* ---------- RESET LEGGERO ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--accent); text-decoration: none; }

/* ---------- TIPOGRAFIA ---------- */
.h-page    { font-size: 26px; font-weight: 700; line-height: 1.25; margin: 0; }
.h-section { font-size: 20px; font-weight: 600; line-height: 1.3;  margin: 0; }
.body      { font-size: 16px; font-weight: 400; line-height: 1.6; }
.body-strong { font-size: 16px; font-weight: 600; line-height: 1.6; }
.secondary { font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--text-2); }
.micro {
  font-size: 12px; font-weight: 600; line-height: 1.4;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2);
}

/* ---------- LAYOUT ---------- */
.screen {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--s-8) var(--pad-screen) var(--s-16);
  min-height: 100vh;
  animation: screen-appear 260ms ease-out both;
}
@keyframes screen-appear {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.stack   > * + * { margin-top: var(--s-4); }
.stack-2 > * + * { margin-top: var(--s-2); }
.stack-6 > * + * { margin-top: var(--s-6); }
.section + .section { margin-top: var(--s-8); }
.muted { color: var(--text-2); }
.center { text-align: center; }

/* ---------- MARCHIO / HERO (fondo petrolio) ---------- */
.brand-hero {
  background: var(--brand);
  padding: calc(var(--s-12) + env(safe-area-inset-top, 0px)) var(--pad-screen) var(--s-8);
}
.brand-hero-inner { max-width: 560px; margin: 0 auto; }
.brand-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand-dim); margin: 0;
}
.brand-logo b { font-weight: 400; }        /* "Casa" più leggero */
.brand-trace { display: block; margin-top: var(--s-2); width: 156px; height: 12px; color: var(--mark); }
.brand-payoff { margin: var(--s-3) 0 0; font-size: 14px; line-height: 1.5; color: var(--brand-dim); }
/* Logo immagine (nuovo marchio: lente + wordmark) */
.tb-logo-img { height: 26px; width: auto; display: block; }
.brand-logo-img { display: block; margin: var(--s-3) 0 0; width: min(300px, 76vw); height: auto; }

/* Logo piccolo su fondo chiaro (header interni) */
.brand-logo-sm { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--brand); }
.brand-logo-sm b { font-weight: 400; }

/* ---------- BOTTONI ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  height: 52px; padding: 0 var(--s-4);
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: transform var(--t-press), box-shadow var(--t-press), background var(--t-press);
  user-select: none;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:active:not(:disabled) {
  transform: scale(0.97);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.20);   /* premuto "dentro" */
}

.btn-secondary {
  background: var(--bg-card); color: var(--text);
  border-color: var(--border);
  box-shadow: 0 1px 1px rgba(16,24,40,0.04);
}
.btn-secondary:active:not(:disabled) { transform: scale(0.97); box-shadow: none; }

.btn-text {
  /* border:0 non e' cosmetica: .btn-text si usa DA SOLA, senza .btn (che porta il suo
     border:1px solid transparent). Senza questa riga i <button class="btn-text"> si
     prendono il bordo di default del browser, 2px outset nero. Riguardava 7 pulsanti
     veri: Esci (cancello e impostazioni), Annulla, Elimina appuntamento, Non ora del
     pop-up PWA, Riprova della mappa, Torna al promemoria. */
  min-height: 44px; padding: 0 var(--s-2); background: none; color: var(--accent);
  border: 0;
  box-shadow: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
}

/* ---------- FOCUS DA TASTIERA (accessibilità) ---------- */
.btn:focus-visible,
.btn-text:focus-visible,
.tab:focus-visible,
a:focus-visible,
a.house-card:focus-visible,
.input-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ---------- FORM ---------- */
.field { display: block; }
.field + .field { margin-top: var(--s-4); }
.label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--text-2); margin-bottom: var(--s-2);
}
.label .req { color: var(--red); margin-left: 2px; }

/* Campo con toggle (es. password) */
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 88px; }
.input-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 40px; padding: 0 10px; border: 0; background: none;
  color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; border-radius: var(--radius-sm);
}
.input {
  width: 100%; height: 52px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 var(--s-4);
  color: var(--text);
  transition: border-color var(--t-press), box-shadow var(--t-press);
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,110,86,0.25); }
.input.is-error { border-color: var(--red); }

.checkbox-row {
  display: flex; align-items: flex-start; gap: var(--s-3);
  cursor: pointer;
}
.checkbox-row input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); }

/* Griglia caratteristiche (form) — 2 colonne su mobile, 3 su desktop */
.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3) var(--s-4); }
@media (min-width: 560px) { .feat-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- CARD ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--s-4);
}
.card + .card { margin-top: var(--s-3); }
.card-soft { background: var(--bg-2); border: 0; box-shadow: none; }

/* ---------- BADGE ---------- */
.badge {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600;
  padding: var(--s-1) var(--s-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* ---------- MESSAGGI (banner) ---------- */
.notice {
  padding: var(--s-4); border-radius: var(--radius);
  font-size: 14px; line-height: 1.5;
}
.notice-red   { background: var(--red-bg);   color: var(--red); }
.notice-amber { background: var(--amber-bg); color: var(--amber); }
.notice-green { background: var(--green-bg); color: var(--green); }
.notice-info  { background: var(--info-bg);  color: var(--info); }

/* ---------- TABS (login / registrati) ---------- */
.tabs {
  display: flex; gap: var(--s-1);
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: var(--s-1);
}
.tab {
  flex: 1; height: 44px; border: 0; background: none;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: background var(--t-press), color var(--t-press);
}
.tab[aria-selected="true"] {
  background: var(--bg-card); color: var(--text);
  box-shadow: var(--shadow-card);
}

/* ---------- FLAG BOX (l'elemento-firma) ---------- */
.flag-box {
  position: relative;
  background: var(--red-bg);
  border-radius: var(--radius);
  padding: var(--s-4) var(--s-4) var(--s-4) var(--s-6);
  overflow: hidden;
}
.flag-box::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--red);
}
.flag-box.is-amber { background: var(--amber-bg); }
.flag-box.is-amber::before { background: var(--amber); }
.flag-box.is-info  { background: var(--info-bg); }
.flag-box.is-info::before  { background: var(--info); }
.flag-what { font-size: 15px; font-weight: 600; color: var(--text); }
.flag-calm, .flag-next { font-size: 14px; color: var(--text-2); margin-top: var(--s-1); }

/* ---------- MICRO-CONFERMA "salvato" ---------- */
.toast {
  position: fixed; left: 50%; bottom: var(--s-8);
  transform: translateX(-50%) translateY(8px);
  background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 600;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-soft), transform var(--t-soft);
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- SELECT & TEXTAREA ---------- */
select.input {
  appearance: none; -webkit-appearance: none;
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23566860' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
textarea.input {
  height: auto; min-height: 100px; padding: 12px var(--s-4);
  line-height: 1.5; resize: vertical;
}

/* ---------- GRIGLIA CAMPI ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.grid-2 .field + .field { margin-top: 0; }

/* ---------- ICONE LINEARI ---------- */
.ic { width: 15px; height: 15px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }

/* ---------- CARD CASA (dashboard) — foto grande + tessere bento ---------- */
.sg { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

a.house-card {
  display: block; padding: 0; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform var(--t-press), box-shadow var(--t-soft);
}
a.house-card:active { transform: scale(0.99); }
@media (hover: hover) {
  a.house-card:hover { box-shadow: var(--shadow-pop); }
}

/* Foto: gradiente petrolio + badge stato/segnali sovrapposti */
.dc-photo { position: relative; height: 150px; overflow: hidden; background: linear-gradient(150deg, #1C5346, var(--brand)); }
.dc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dc-motif { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.28; }
.dc-badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.94); color: var(--brand); font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 2px 8px -3px rgba(0,0,0,.28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dc-sdot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.dc-link { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 9px; background: rgba(6,18,15,.5); color: #fff; display: grid; place-items: center; cursor: pointer; }
.dc-link .ic { width: 15px; height: 15px; }
.dc-emptyhint { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #9DC3B8; font-size: 12.5px; font-weight: 500; }
.dc-emptyhint .ic { width: 24px; height: 24px; }
/* SEGNALI — pop ambra (attenzione); verde quando è tutto ok */
.dc-flags { position: absolute; bottom: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; background: #E8912A; color: #3A2408; font-size: 12.5px; font-weight: 800; padding: 5px 10px; border-radius: 999px; box-shadow: 0 6px 16px -6px rgba(0,0,0,.5); }
.dc-flags .ic { width: 13px; height: 13px; }
.dc-flags.clean { background: var(--accent); color: #fff; }

/* Corpo */
.dc-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 12px; }
.dc-title { font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-addr { display: flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 13px; margin-top: 4px; font-weight: 500; }
.dc-addr .ic { width: 13px; height: 13px; color: var(--text-3); flex: 0 0 auto; }
.dc-addr span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Percorso della casa: binario continuo che si riempie + spunte sui completati.
   Rail/fill inset 22px = centro del primo/ultimo nodo (allineamento a ogni larghezza). */
.dc-track { position: relative; display: flex; justify-content: space-between; }
.dc-rail { position: absolute; top: 13px; left: 22px; right: 22px; height: 3px; background: var(--border); border-radius: 3px; z-index: 0; }
.dc-fill { position: absolute; top: 13px; left: 22px; height: 3px; background: linear-gradient(90deg, var(--mark), var(--accent)); border-radius: 3px; z-index: 1; transition: width var(--t-soft); }
.dc-step { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 7px; width: 44px; }
.dc-node { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-card); border: 2px solid var(--border); color: var(--text-3); }
.dc-node .ic { width: 14px; height: 14px; }
.dc-step.done .dc-node { background: var(--accent); border-color: var(--accent); color: #fff; }
.dc-step.now .dc-node { width: 28px; height: 28px; background: #E8912A; border-color: #E8912A; color: #fff; box-shadow: 0 0 0 5px #FBEDD5; }
.dc-node .dc-dotc { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.dc-tx { font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--text-3); text-transform: uppercase; }
.dc-step.done .dc-tx { color: var(--accent); }
.dc-step.now .dc-tx { color: #8A5214; }

/* Prezzo: due colonne simmetriche con etichetta in alto */
.dc-prow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 15px; background: var(--bg-2); border-radius: 12px; }
.dc-lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 5px; }
.dc-price { font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; line-height: 1; }
.dc-price-empty { font-size: 16px; font-weight: 700; color: var(--text-2); }
.dc-offer { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); margin-top: 9px; background: var(--accent-light); padding: 3px 9px; border-radius: 999px; }
.dc-offer b { color: var(--accent); font-weight: 700; }
.dc-offer .dt { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.dc-mq { text-align: right; flex: 0 0 auto; }
.dc-mq-v { font-size: 15px; font-weight: 800; color: var(--text); }
.dc-bar { height: 5px; width: 80px; border-radius: 3px; background: var(--border); margin: 8px 0 0 auto; overflow: hidden; }
.dc-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--mark), var(--accent)); }

/* Chip meta: APE / anno / spese */
.dc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #3C5850; background: var(--bg-2); border: 1px solid var(--border); padding: 5px 9px; border-radius: 8px; }
.dc-chip.dc-ape { border: 0; font-weight: 700; }
.dc-chip .ic { width: 13px; height: 13px; }
/* Classe energetica come freccia (etichetta consumo), come nella scheda casa */
.dc-ape-arrow { display: inline-flex; align-items: center; height: 28px; padding: 0 13px 0 9px; color: #fff;
  font-weight: 800; font-size: 13px; letter-spacing: -.01em;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); }

/* Specifiche: riquadro unico a colonne — sempre su UNA riga, niente a-capo */
.dc-specs { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.dc-spec { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 3px; white-space: nowrap; }
.dc-spec + .dc-spec { border-left: 1px solid var(--border); }
.dc-spec .dc-sv { font-size: 14px; font-weight: 800; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dc-spec .dc-sv .ic { width: 14px; height: 14px; color: var(--accent); display: inline-block; vertical-align: -2px; margin-right: 3px; }
.dc-spec .dc-sl { font-size: 10px; font-weight: 600; color: var(--text-3); }

/* Dotazioni */
.dc-sep { border: 0; border-top: 1px solid var(--border); margin: 0; }
.dc-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-feat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-light); padding: 5px 9px; border-radius: 8px; }
.dc-feat .ic { width: 13px; height: 13px; flex: 0 0 auto; }

/* Chip caratteristiche (scheda casa — invariata) */
.feats { display: flex; flex-wrap: wrap; gap: 7px; margin-top: var(--s-3); }
.feat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; padding: 5px 9px;
  border-radius: 8px; background: var(--accent-light); color: var(--brand);
}
.feat .ic { width: 13px; height: 13px; }

/* ---------- RESPONSIVE: dashboard a griglia su desktop ---------- */
.screen-wide { max-width: 560px; }
.houses-grid { display: flex; flex-direction: column; gap: var(--s-3); }
@media (min-width: 720px) {
  .screen-wide { max-width: 960px; }
  .houses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--s-4); }
}
/* Schermi larghi: sfrutta lo spazio → 3 colonne, card meno stirate */
@media (min-width: 1080px) {
  .screen-wide { max-width: 1120px; }
}

/* ---------- DASHBOARD: hero cockpit (petrolio) ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  background: radial-gradient(120% 140% at 85% -20%, #17564A 0%, var(--brand) 46%, #0A2C27 100%);
  color: #ECF6F0;
  box-shadow: 0 24px 60px -30px rgba(10,44,39,.5);
  padding: 22px var(--s-4);
  margin-bottom: var(--s-6);
}
.hero-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-dim); margin: 0; }
.hero-hi { font-size: 27px; font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1.05; margin: 6px 0; }
.hero-sub { font-size: 15px; color: var(--brand-dim); line-height: 1.5; margin: 0; }
.hero-sub b { color: #fff; font-weight: 700; }
.hero-cta {
  display: none;  /* mobile: l'azione vive nella barra "Le mie case" */
  align-items: center; gap: 9px; margin-top: 16px; width: fit-content;
  background: var(--mark); color: #06231C; font-weight: 700; font-size: 15px;
  padding: 12px 18px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.4);
}
.hero-cta svg { width: 18px; height: 18px; flex: 0 0 auto; }
.hero-r { margin-top: 16px; }

/* Card "Prossima visita" dentro l'hero */
.hero-next {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); padding: 14px;
}
.hero-next:active { transform: scale(0.99); }
.hn-tile { flex: 0 0 auto; width: 60px; text-align: center; padding: 8px 0; line-height: 1; background: var(--mark); color: #06231C; border-radius: 11px; }
.hn-dw, .hn-mo { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.hn-dd { display: block; font-size: 24px; font-weight: 800; margin: 2px 0; }
.hn-body { display: flex; flex-direction: column; min-width: 0; }
.hn-k { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-dim); }
.hn-h { font-size: 16px; font-weight: 700; color: #fff; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hn-w { font-size: 13px; color: var(--brand-dim); }
.hn-go { margin-left: auto; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.hn-go .ic { width: 18px; height: 18px; }

@media (min-width: 720px) {
  .hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s-6); align-items: center; padding: 26px 30px; }
  .hero-hi { font-size: 32px; }
  .hero-cta { display: inline-flex; }
  .hero-r { margin-top: 0; }
  .hero--solo { grid-template-columns: 1fr; }
  .hero--solo .hero-r { display: none; }
}

/* ---------- DASHBOARD: barra titolo + filtri + azione ---------- */
.cases-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.cases-title { grid-column: 1; grid-row: 1; }
.add-pill    { grid-column: 2; grid-row: 1; }
.seg         { grid-column: 1 / -1; grid-row: 2; }

@media (min-width: 720px) {
  .cases-toolbar { display: flex; align-items: center; gap: var(--s-4); }
  .cases-title { flex: 0 0 auto; }
  .seg { margin-left: var(--s-2); }
  .add-pill.toolbar-add { display: none; }   /* su desktop l'azione è nel pannello di benvenuto */
}

/* Selettore a segmenti (filtri) */
.seg {
  display: inline-flex; background: var(--bg-2);
  border-radius: 13px; padding: 3px; gap: 2px;
  width: max-content; max-width: 100%;
  overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  padding: 8px 13px; border-radius: 10px; white-space: nowrap;
  transition: background var(--t-press), color var(--t-press);
}
.seg-btn .seg-n { font-variant-numeric: tabular-nums; opacity: .65; }
.seg-btn[aria-pressed="true"] {
  background: var(--bg-card); color: var(--accent);
  box-shadow: 0 1px 2px rgba(16,24,40,0.10);
}
.seg-btn[aria-pressed="true"] .seg-n { opacity: 1; }
.seg-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Pill "Aggiungi" — azione primaria della dashboard */
.add-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; padding: 0 18px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600;
  border-radius: 999px; white-space: nowrap;
  box-shadow: var(--shadow-btn);
  transition: transform var(--t-press), background var(--t-press);
}
.add-pill:hover { background: var(--accent-hover); }
.add-pill:active { transform: scale(0.97); }
.add-pill:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.add-pill svg { width: 18px; height: 18px; flex: 0 0 auto; }
.hide-mobile { display: none; }
@media (min-width: 720px) { .hide-mobile { display: inline; } }

/* Hero foto nella scheda casa */
.casa-hero {
  position: relative;
  width: 100%; aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-2); box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
}
.casa-hero.is-empty { box-shadow: none; }
.casa-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.casa-hero .ph { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); color: var(--text-3); }
.casa-hero .ph .ic { width: 32px; height: 32px; }
.casa-hero .ph span { font-size: 13px; }

/* Carica foto direttamente dalla scheda */
.casa-hero-add {
  width: 100%; height: 100%; border: 1px dashed var(--border);
  border-radius: var(--radius-lg); background: var(--bg-2); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: background var(--t-press);
}
.casa-hero-add:hover { background: var(--bg-card); }
.casa-hero-add:active { transform: scale(0.99); }
.casa-hero-add .ic { width: 34px; height: 34px; color: var(--accent); }
.casa-hero-edit:active { transform: scale(0.96); }
.casa-hero-edit .ic { width: 15px; height: 15px; }

/* ---------- SCHEDA CASA: colpo d'occhio + liste "grouped" (iOS) ---------- */
.hl { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.tile {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 6px; text-align: center;
  box-shadow: var(--shadow-card);
}
.tile .ic { width: 18px; height: 18px; color: var(--accent); margin: 0 auto 6px; display: block; }
.group-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 var(--s-2) var(--s-1); }
.grow { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: 14px var(--s-4); border-top: 1px solid var(--border); }
.grow:first-child { border-top: 0; }
.grow dt { color: var(--text-2); }
.grow dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- SCHEDA CASA — redesign (testata, prezzo, caratteristiche) ---------- */
.casa-top { margin-top: var(--s-3); }
.casa-head .h-page { line-height: 1.1; }
.casa-meta #casa-annuncio { display: flex; }
@media (min-width: 760px) {
}

/* Prezzo a card */
.pcards { display: flex; gap: var(--s-3); }
.pcard.req { background: var(--bg-2); }
.pcard.off { background: var(--brand); }
.pcard.is-nudge { background: var(--bg-card); border: 1px dashed var(--border); box-shadow: none; cursor: pointer; transition: background var(--t-press); }
.pcard.is-nudge:hover { background: var(--bg-2); }
.pcard.is-nudge:active { transform: scale(0.99); }
.pcard.req .pl { color: var(--text-3); }
.pcard.off .pl { color: var(--brand-dim); }
.pcard.is-nudge .pl { color: var(--text-3); }
.pcard .pn { font-size: 22px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.pcard.req .pn { color: var(--brand); }
.pcard.off .pn { color: #fff; }
.pcard .pn-nudge .ic { width: 16px; height: 16px; }
.pspese .ic { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }
.pspese .k { color: var(--text-2); flex: 1; }
.pspese b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Caratteristiche: lista con icone, 2 colonne su desktop */
.c-grid { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.crow:first-child { border-top: 0; }
.crow .ic { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }
.crow .k { color: var(--text-2); flex: 1; }
.crow .v { font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) {
  .crow:nth-child(2) { border-top: 0; }
}

/* ---------- LISTA CHIAVE/VALORE (scheda casa) ---------- */
.kv-list { margin: 0; }
.kv:first-child { border-top: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- BADGE "FAI UN'OFFERTA" (nudge, offerta vuota) ---------- */
.offer-nudge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600;
  padding: 5px 11px; border-radius: 9px;
  background: var(--accent-light); color: var(--accent);
  cursor: pointer; border: 0; -webkit-tap-highlight-color: transparent;
}
.offer-nudge .ic { width: 13px; height: 13px; }
.offer-nudge:active { transform: scale(0.97); }

/* ---------- BOTTOM-SHEET / MODAL ---------- */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,30,26,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  animation: scrim-in 200ms ease-out;
}
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  background: var(--bg-card);
  width: 100%; max-width: 480px;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px rgba(16,24,40,0.12);
  max-height: 92vh; overflow-y: auto;
  padding: 12px 22px 22px; position: relative;
  animation: sheet-up 280ms cubic-bezier(0.2,0.8,0.2,1);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grab { width: 38px; height: 5px; border-radius: 3px; background: #D7DFDA; margin: 0 auto 8px; }
.sheet-close {
  position: absolute; top: 14px; right: 14px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-2); color: var(--text-2); border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sheet-close .ic { width: 16px; height: 16px; }
.sheet-emblem {
  width: 52px; height: 52px; border-radius: 15px;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin: 2px auto 0;
}
.sheet-emblem .ic { width: 26px; height: 26px; }
.sheet-title { font-size: 20px; font-weight: 700; text-align: center; margin: 12px 0 0; }
.sheet-sub { font-size: 13.5px; line-height: 1.5; color: var(--text-2); text-align: center; margin: 7px auto 0; max-width: 32ch; }
.sheet-list { margin-top: 14px; }
.sheet-item { display: flex; align-items: flex-start; gap: 11px; padding: 10px 0; border-top: 1px solid var(--border); }
.sheet-item:first-child { border-top: 0; }
.sheet-item .tile { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.sheet-item .tile .ic { width: 17px; height: 17px; }
.sheet-item .si-t { font-size: 14px; font-weight: 600; line-height: 1.3; }
.sheet-item .si-s { font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.42; }
.sheet-calm { font-size: 12.5px; color: var(--text-2); background: var(--bg-2); border-radius: 12px; padding: 12px 14px; margin-top: 16px; line-height: 1.45; }
.sheet-calm b { color: var(--text); }
.sheet-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }

@media (min-width: 640px) {
  .sheet-scrim { align-items: center; padding: 24px; }
  .sheet { border-radius: 16px; max-height: 88vh; animation: sheet-fade 200ms ease-out; }
  .sheet-grab { display: none; }
}
@keyframes sheet-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- TOP BAR (app shell) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  height: calc(60px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--pad-screen) 0;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
}
.tb-logo { display: inline-flex; flex-direction: column; align-items: flex-start; text-decoration: none; color: var(--brand); line-height: 1; }
.tb-word b { font-weight: 400; }
/* Barra pagine interne: freccia indietro + titolo (verso il "genitore" logico) */
.tb-back { width: 38px; height: 38px; flex: 0 0 auto; border: 0; cursor: pointer; text-decoration: none;
  border-radius: 10px; background: var(--bg-2); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .16s cubic-bezier(.32,.72,0,1), background .16s ease; }
.tb-back:active { transform: scale(0.94); }
.tb-back:hover { background: var(--border); }
.tb-back .ic { width: 19px; height: 19px; }
.tb-title { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 750; color: var(--text);
  letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.tb-avatar.lg { width: 44px; height: 44px; }
.tb-avatar:active { transform: scale(0.96); }

/* Menu profilo */
.menu-scrim {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,30,26,0.4);
  display: flex; align-items: flex-end; justify-content: center;
  animation: scrim-in 200ms ease-out;
}
.profile-menu {
  background: var(--bg-card); width: 100%; max-width: 480px;
  border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(16,24,40,0.12);
  overflow: hidden; padding-bottom: var(--s-2);
  animation: sheet-up 280ms cubic-bezier(0.2,0.8,0.2,1);
}
.pm-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); }
.pm-id { flex: 1; min-width: 0; }
.pm-name { font-size: 15px; font-weight: 700; }
.pm-email { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-sec { font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-2); padding: 10px var(--s-4) 4px; border-top: 1px solid var(--border); }
.pm-item { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: 13px var(--s-4); font-size: 15px; font-weight: 500; color: var(--text); background: none; border: 0; cursor: pointer; text-decoration: none; text-align: left; }
.pm-item .ic { width: 18px; height: 18px; color: var(--text-2); flex: 0 0 auto; }
.pm-item:active:not(.soon) { background: var(--bg-2); }
.pm-item.active, .pm-item.active .ic { color: var(--accent); }
.pm-item.danger { color: var(--red); border-top: 1px solid var(--border); }
.pm-item.danger .ic { color: var(--red); }
.pm-item.soon { color: var(--text-3); cursor: default; }
.pm-item.soon .ic { color: var(--text-3); }
.pm-soon { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--bg-2); padding: 2px 8px; border-radius: var(--radius-sm); }

@media (min-width: 640px) {
  .menu-scrim { align-items: flex-start; justify-content: flex-end; background: rgba(10,30,26,0.12); }
  .profile-menu { position: fixed; top: 66px; right: 24px; width: 300px; border-radius: 16px; box-shadow: var(--shadow-pop); animation: sheet-fade 180ms ease-out; }
}

/* ============================================================
   MODALITÀ RACCOLTA (in visita)
   ============================================================ */
.collect-head { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.collect-head .h-page { margin: 0; }
.chip-visita {
  flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-light); padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}

/* Intro "annusa" — unica superficie petrolio della schermata */
.annusa { background: var(--brand); border-radius: var(--radius-lg); padding: 16px 18px; color: #fff; margin-top: var(--s-6); }
.annusa-t .ic { width: 18px; height: 18px; color: var(--mark); flex: 0 0 auto; }
/* Stacco tra la card "annusa" e la sezione stanze (non è .section + .section) */
.annusa + .section { margin-top: var(--s-8); }

/* Check "annusa": non segnalato (su petrolio) → segnalato (chip ambra del sistema) */
.annusa-check {
  display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 13px;
  padding: 12px 13px; border-radius: 12px; text-align: left; cursor: pointer;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(157,195,184,0.30);
  transition: background var(--t-press), border-color var(--t-press);
}
.annusa-box .ic { width: 15px; height: 15px; }
.annusa-check.on { background: var(--amber-bg); border-color: var(--amber); }
.annusa-check.on .annusa-ltxt { color: var(--amber); }
.annusa-check.on .annusa-box { background: var(--amber); border-color: var(--amber); color: #fff; }
.annusa-check.on .annusa-tag { display: inline; color: var(--amber); }
.annusa-check:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }

/* Sezione con azione a destra */
.rc-sec { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.rc-sec .h-section { margin: 0; }

/* Card stanza */
.room-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }
.room-ic .ic { width: 19px; height: 19px; }
.room-card.is-open .room-chev { transform: rotate(90deg); }

/* Punti-foto guidati */
.room-body { border-top: 1px solid var(--border); padding: 12px var(--s-4) var(--s-4); }

/* Galleria foto della stanza (in primo piano) */
.room-gallery { margin-bottom: var(--s-4); }
.gallery-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.gallery-strip::-webkit-scrollbar { display: none; }
.thumb {
  position: relative; width: 66px; height: 66px; border-radius: 11px; overflow: hidden; flex: 0 0 auto;
  background: var(--bg-2); border: 0; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--text-3);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.thumb-zoom .ic { width: 11px; height: 11px; }
.thumb-cover .ic { width: 11px; height: 11px; }
.gallery-add .ic { width: 18px; height: 18px; }
.gallery-add:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Checklist "cosa guardare" — risposta No / Sì per segnale */
.check-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px var(--s-4); margin: 0 calc(var(--s-4) * -1);
  border-top: 1px solid var(--bg-2);
}
.check-row:first-child { border-top: 0; }
.check-yn .yn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; cursor: pointer;
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  padding: 0 16px; min-height: 48px; min-width: 48px; border-radius: 8px;
  transition: background var(--t-press), color var(--t-press);
}
.check-yn .yn.no.on { background: var(--accent-light); color: var(--accent); box-shadow: 0 1px 2px rgba(16,24,40,0.08); }
.check-yn .yn.si.on { background: var(--amber-bg); color: var(--amber); box-shadow: 0 1px 2px rgba(16,24,40,0.08); }
.check-yn .yn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Card Impianti (raccolta): domande di fatto + chip risposta ---- */
.imp-q { margin-top: var(--s-4); }
.imp-domanda .ic { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; margin-top: 1px; }
.imp-chip:active { transform: scale(0.985); }
.imp-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.imp-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.imp-inf {
  width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid #9DB3AB; color: var(--text-2);
  font-size: 12px; font-weight: 700; font-style: normal; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.imp-chip.on .imp-inf { border-color: rgba(255,255,255,0.6); color: #fff; }
.check-txt .imp-inf { vertical-align: -3px; margin-left: 5px; }
.imp-shot .ic { width: 17px; height: 17px; }
.imp-shot:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Foglietto ⓘ riusabile (info-sheet.js) ---- */
.isheet-title { font-size: 17px; font-weight: 700; line-height: 1.3; margin: 6px 0 0; padding-right: 34px; }
.isheet-ok:active { transform: scale(0.985); }

/* Visore foto (grande + elimina) */
.photo-viewer {
  position: fixed; inset: 0; z-index: 120; padding: 20px;
  background: rgba(6,16,13,0.86);
  display: flex; align-items: center; justify-content: center;
  animation: scrim-in 180ms ease-out;
}
.pv-inner { width: 100%; max-width: 460px; background: #0E231C; border-radius: var(--radius-lg); overflow: hidden; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.pv-cap { color: #fff; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-close { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; border: 0; cursor: pointer; background: rgba(255,255,255,0.14); color: #fff; display: flex; align-items: center; justify-content: center; }
.pv-close .ic { width: 16px; height: 16px; }
.pv-img { background: #1B2C26; display: flex; align-items: center; justify-content: center; max-height: 66vh; color: #5E756C; }
.pv-img img { width: 100%; max-height: 66vh; object-fit: contain; display: block; }
.pv-act { padding: 12px 14px; }
.pv-cover { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; cursor: pointer; background: var(--mark); border: 0; color: var(--brand); font-size: 14px; font-weight: 700; padding: 12px; border-radius: 12px; }
.pv-cover .ic { width: 16px; height: 16px; }
.pv-cover:disabled { opacity: 0.6; cursor: default; }
.pv-iscover { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; color: var(--mark); font-size: 13.5px; font-weight: 600; padding: 10px; }
.pv-iscover .ic { width: 16px; height: 16px; }
.pv-del { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; cursor: pointer; background: transparent; border: 1px solid rgba(240,149,149,0.5); color: #F09595; font-size: 14px; font-weight: 600; padding: 12px; border-radius: 12px; }
.pv-del .ic { width: 16px; height: 16px; }
.pv-del:disabled { opacity: 0.5; cursor: not-allowed; }
.room-voice .ic { width: 16px; height: 16px; }
.room-del .ic { width: 15px; height: 15px; }

/* Note vocali */
.voice-sec { margin-top: 14px; }
.vn-play .ic { width: 17px; height: 17px; }
.vn-wave i { display: block; width: 3px; border-radius: 2px; background: var(--brand-dim); }
.vn-del .ic { width: 15px; height: 15px; }
@keyframes recpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.vrec-stop .ic { width: 15px; height: 15px; }
.vn-play:focus-visible, .vn-del:focus-visible, .vrec-stop:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Bottom-sheet: scelta tipo stanza */
.roomtype-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-4); }
.roomtype-btn:active { transform: scale(0.98); }
.roomtype-btn:hover { border-color: var(--accent); }

/* Desktop: raccolta in colonna comoda ma più larga */
@media (min-width: 720px) {
  .roomtype-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* ============================================================
   DOCUMENTI DA CHIEDERE (componente riutilizzabile)
   ============================================================ */
.doc-intro { font-size: 13px; color: var(--text-2); line-height: 1.5; margin: 0 0 var(--s-3); }
.doc-row:first-child { border-top: 0; }
.doc-seg { display: flex; background: var(--bg-2); border-radius: 11px; padding: 3px; gap: 2px; margin-top: 10px; }
.doc-seg-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ============================================================
   MODALITÀ ANALISI (a casa)
   ============================================================ */
.an-intro { font-size: 14px; color: var(--text-2); line-height: 1.55; margin: var(--s-3) 0 var(--s-6); }
.an-flag { margin-bottom: var(--s-3); }
.an-flag-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.an-flag-room { font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--amber); background: rgba(181,71,8,0.12); padding: 3px 9px; border-radius: var(--radius-sm); }
.an-flag-thumb { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; margin-left: auto; flex: 0 0 auto; background: var(--bg-2); }
.an-flag-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.an-flag-ask b { color: var(--amber); font-weight: 600; }
.an-lead { font-weight: 600; color: var(--text); }
.an-flag-do .ic { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; margin-top: 2px; }
.an-flag-do b { color: var(--accent); font-weight: 600; }
.an-flag-tec { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-light); padding: 5px 10px; border-radius: 999px; margin-top: 10px; }
.an-flag-tec .ic { width: 13px; height: 13px; }

.golden { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: var(--s-4); }
.golden-h { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.golden-h .ic { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; }
.gitem { display: flex; gap: 9px; font-size: 14px; line-height: 1.5; color: var(--text); padding: 8px 0; border-top: 1px solid var(--bg-2); }
.gitem:first-of-type { border-top: 0; }
.gdot { color: var(--accent); font-weight: 800; flex: 0 0 auto; }

/* ---------- UTILITY ---------- */
.hidden { display: none !important; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton di caricamento (senza gradienti; il pulse si azzera con reduced-motion) */
.skeleton { background: var(--bg-2); border-radius: var(--radius); animation: skpulse 1.2s ease-in-out infinite; }
.sk-card { height: 92px; }
.sk-card + .sk-card { margin-top: var(--s-3); }
@keyframes skpulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ============================================================
   STEP 7 — CONFRONTO
   ============================================================ */

/* Chip "Cambia case" come link */
.chip-link { text-decoration: none; cursor: pointer; transition: background var(--t-press); }
.chip-link:hover { background: #D9EBE1; }

/* --- Modalità selezione (dashboard) --- */
.cases-filters { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.cases-filters .seg { flex: 0 1 auto; min-width: 0; }

.cmp-toggle {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  height: 38px; padding: 0 14px;
  background: var(--bg-card); color: var(--accent);
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background var(--t-press);
}
.cmp-toggle:hover { background: var(--bg-2); }
.cmp-toggle:active { transform: scale(0.97); }
.cmp-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cmp-toggle .ic { width: 16px; height: 16px; }

.cases-toolbar.is-selecting { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.cases-toolbar.is-selecting .cases-title { flex: 0 0 auto; }
.cmp-pick-hint { flex: 1 1 140px; margin: 0; color: var(--text-2); font-size: 13px; }
.add-pill-ghost { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.add-pill-ghost:hover { background: var(--bg-2); }

/* Card selezionabile + spunta */
.house-card { position: relative; container-type: inline-size; container-name: house; }
.house-card.is-select { cursor: pointer; }
.hc-check {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.92); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: transparent;
  box-shadow: 0 1px 2px rgba(16,24,40,0.12);
}
.hc-check .ic { width: 16px; height: 16px; }
.house-card.is-selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.house-card.is-selected .hc-check { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Barra "Confronta" in basso */
#app.has-compare-bar { padding-bottom: 96px; }
.compare-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--pad-screen);
  padding-bottom: calc(var(--s-3) + env(safe-area-inset-bottom));
  background: var(--brand); color: #fff;
  box-shadow: 0 -6px 20px rgba(16,24,40,0.16);
}
.compare-bar .cb-count { font-size: 14px; font-weight: 600; }
.compare-bar .cb-hint { font-size: 13px; color: var(--brand-dim); }
.compare-bar .cb-go {
  display: inline-flex; align-items: center; gap: 4px;
  height: 42px; padding: 0 20px; border-radius: 999px;
  background: var(--mark); color: var(--brand); font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-btn);
}
.compare-bar .cb-go .ic { width: 16px; height: 16px; }

/* --- Tabella confronto --- */
.cmp-scrollhint { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; margin-bottom: var(--s-2); }
.cmp-scrollhint .ic { width: 15px; height: 15px; }
@media (min-width: 720px) { .cmp-scrollhint.hide-desktop { display: none; } }

.cmp-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); box-shadow: var(--shadow-card);
}
.cmp-table {
  border-collapse: separate; border-spacing: 0;
  width: 100%; min-width: calc(140px + var(--cmp-cols, 3) * 132px);
  table-layout: fixed; font-size: 13px; color: var(--text);
}
.cmp-table th, .cmp-table td { box-sizing: border-box; text-align: left; }

/* Colonna etichette (fissa a sinistra) */
.cmp-lab {
  position: sticky; left: 0; z-index: 2;
  width: 140px; padding: 0 var(--s-3);
  background: var(--bg-card); color: var(--text-2); font-weight: 400;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--bg-2);
}
.cmp-corner { z-index: 3; border-bottom: 1px solid var(--border); }

/* Celle valore */
.cmp-val { padding: 0 var(--s-3); border-left: 1px solid var(--bg-2); border-bottom: 1px solid var(--bg-2); font-variant-numeric: tabular-nums; }
.cmp-table tbody th, .cmp-table tbody td { height: 42px; }
.cmp-table tbody tr:last-child th, .cmp-table tbody tr:last-child td { border-bottom: 0; }

/* Intestazione colonna casa */
.cmp-th { vertical-align: bottom; padding: var(--s-3); border-bottom: 1px solid var(--border); }
.cmp-th-cover { display: block; width: 100%; height: 40px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-2); margin-bottom: 6px; }
.cmp-th-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp-th-cover.is-empty { display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.cmp-th-cover.is-empty .ic { width: 16px; height: 16px; }
.cmp-th-name { display: block; font-weight: 600; font-size: 12.5px; line-height: 1.2; color: var(--text); }
.cmp-th-stato { display: block; font-size: 12px; margin-top: 2px; }

/* Righe sezione */
.cmp-sec th, .cmp-sec td { background: #F1F5F3; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cmp-sec .cmp-lab { background: #F1F5F3; color: var(--brand); font-weight: 600; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; height: 30px; }
.cmp-sec-note { text-transform: none; letter-spacing: 0; color: var(--text-3); font-weight: 400; font-size: 12px; margin-left: 4px; }
.cmp-sec-fill { border-left: 1px solid var(--border); }

/* Contenuti cella */
.cmp-dash { color: var(--text-3); }
.cmp-unit { color: var(--text-3); font-weight: 400; font-size: 12px; }
.cmp-soft { color: var(--text-2); }
.cmp-note { color: var(--text-2); font-size: 12px; line-height: 1.35; white-space: normal; display: inline-block; padding: 6px 0; }
.cmp-new { display: inline-block; background: var(--brand); color: var(--mark); font-size: 12px; font-weight: 600; letter-spacing: .03em; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }
.cmp-best { display: inline-flex; align-items: center; gap: 4px; background: var(--green-bg); color: var(--green); font-weight: 600; border-radius: 6px; padding: 2px 7px; }
.cmp-best .ic { width: 13px; height: 13px; }
.cmp-has { color: var(--accent); display: inline-flex; }
.cmp-has .ic { width: 17px; height: 17px; }
.cmp-hasdiff { background: #EAF5EF; }
.cmp-flag { color: var(--amber); display: inline-flex; align-items: center; gap: 5px; }
.cmp-flag .ic { width: 14px; height: 14px; }
.cmp-ok { color: var(--text-2); }
.cmp-ape { display: inline-block; min-width: 22px; text-align: center; border-radius: 5px; padding: 2px 7px; font-weight: 600; font-size: 12px; }
.cmp-warn { display: inline-flex; align-items: center; gap: 5px; color: var(--amber); font-size: 12.5px; }
.cmp-warn .ic { width: 14px; height: 14px; }

/* ============================================================
   STEP 8 — APPUNTAMENTI
   ============================================================ */
.btn .ic { width: 18px; height: 18px; flex: 0 0 auto; }

.ap-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.ap-group { display: flex; flex-direction: column; gap: var(--s-3); }

.ap-item {
  display: flex; align-items: flex-start; gap: var(--s-3);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 14px; box-shadow: var(--shadow-card);
  cursor: pointer; transition: border-color var(--t-press), transform var(--t-press);
}
.ap-item:hover { border-color: var(--border); }
.ap-item:active { transform: scale(0.995); }
.ap-item.is-next { border-color: #BFE0D2; }
.ap-item.is-past { opacity: .62; }
.ap-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.ap-tile {
  flex: 0 0 auto; width: 56px; height: 62px; border-radius: 12px;
  background: var(--accent-light);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.ap-item.is-past .ap-tile { background: var(--bg-2); }
.ap-day { font-size: 22px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.ap-mon { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-top: 2px; }
.ap-item.is-past .ap-day { color: var(--text-2); }
.ap-item.is-past .ap-mon { color: var(--text-3); }
.ap-dow { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.ap-main { flex: 1; min-width: 0; }
.ap-time { font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.ap-item.is-past .ap-time { color: var(--text-3); }
.ap-next-tag { background: var(--brand); color: var(--mark); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; border-radius: 4px; padding: 1px 6px; margin-left: 8px; vertical-align: 1px; }

.ap-casa { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin-top: 3px; color: var(--text); text-decoration: none; }
.ap-casa .ic { width: 15px; height: 15px; color: var(--accent); flex: 0 0 auto; }
a.ap-casa:hover { text-decoration: underline; }
.ap-casa-none { color: var(--text-2); font-weight: 400; }
.ap-casa-none .ic { color: var(--text-3); }
.ap-note { font-size: 12.5px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }

.ap-del { border: 0; background: none; cursor: pointer; color: var(--text-3); padding: 4px; flex: 0 0 auto; border-radius: 8px; align-self: center; }
.ap-del .ic { width: 18px; height: 18px; display: block; }
.ap-del:hover { color: var(--red); background: var(--red-bg); }
.ap-item > .ic { color: var(--text-3); width: 20px; height: 20px; flex: 0 0 auto; align-self: center; }

/* ============================================================
   LINK ANNUNCIO (Immobiliare / Idealista / Subito…)
   ============================================================ */
.annuncio-btn {
  display: inline-flex; align-items: center; gap: 7px; margin-top: var(--s-3);
  background: var(--bg-card); color: var(--accent);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 15px; font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: background var(--t-press);
}
.annuncio-btn:hover { background: var(--bg-2); }
.annuncio-btn:active { transform: scale(0.98); }
.annuncio-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.annuncio-btn .ic { width: 16px; height: 16px; }

/* Tasto tondo sulla card in dashboard (in alto a destra nella testata) */
.hc-link {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255,255,255,0.94); border: 0;
  display: flex; align-items: center; justify-content: center; color: var(--brand);
  cursor: pointer; box-shadow: 0 1px 3px rgba(16,24,40,0.16);
  transition: background var(--t-press), transform var(--t-press);
}
.hc-link:hover { background: #fff; }
.hc-link:active { transform: scale(0.94); }
.hc-link .ic { width: 16px; height: 16px; }
.hc-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ============================================================
   MAPPA & DINTORNI (Leaflet) — posizione casa + servizi vicini
   ============================================================ */
.form-map, .poi-map {
  height: 240px; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg-2);
  /* contesto d'impilamento proprio: gli z-index alti di Leaflet (fino a ~1000)
     restano confinati qui e non coprono il menu isola in fondo (z-index 40). */
  position: relative; z-index: 0;
}
.poi-map { height: 230px; }
.map-actions { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-2); }
.map-actions .btn { width: auto; }
.geo-hint { margin: var(--s-2) 0 0; }

/* Pin personalizzati (divIcon) */
.leaflet-container .poi-di { background: none; border: 0; }
.poi-pin {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); color: var(--accent);
  box-shadow: 0 1px 3px rgba(16,24,40,0.28);
}
.poi-pin svg { width: 15px; height: 15px; }
.poi-pin-home {
  width: 36px; height: 36px; background: var(--brand);
  border-color: var(--brand); color: #fff;
  box-shadow: 0 3px 8px rgba(14,59,52,0.35);
}
.poi-pin-home svg { width: 19px; height: 19px; }

/* Filtri a chip */
.poi-chips { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-3); }
.poi-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-2);
  cursor: pointer; transition: background var(--t-press), color var(--t-press), border-color var(--t-press);
}
.poi-chip svg { width: 15px; height: 15px; }
.poi-chip:active { transform: scale(0.97); }
.poi-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.poi-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Lista "il più vicino di ogni tipo" */
.poi-list { margin-top: var(--s-3); }
.poi-row { display: flex; align-items: center; gap: var(--s-3); padding: 10px 0; border-bottom: 1px solid var(--bg-2); }
.poi-row:last-child { border-bottom: 0; }
.poi-ic {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.poi-ic svg { width: 17px; height: 17px; }
.poi-row-main { flex: 1; min-width: 0; }
.poi-row-label { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.poi-row-name { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poi-row-dist { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--brand); }

/* Il vecchio cancello stava qui: .activate-card e .activate-lock, la scatola
   bianca col lucchetto. Rimosse perché attiva.html ora usa le classi .tc- in
   fondo a questo file (linguaggio della landing). Nessun altro le usava. */

/* ---------- PANNELLO ADMIN (admin.html) ---------- */
.adm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: var(--s-4); }
.adm-tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.adm-tile-n { font-size: 26px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.adm-tile-l { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.adm-card { margin-top: var(--s-4); }
.adm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-3); }
.adm-title { font-size: 16px; font-weight: 700; color: var(--text); }
.adm-gen { display: flex; align-items: center; gap: 8px; }
.adm-num { width: 76px; }
.adm-gen .btn, .adm-gift .btn { width: auto; }
.adm-codes { display: flex; flex-direction: column; gap: 6px; }
.adm-code { display: flex; align-items: center; justify-content: space-between; background: var(--bg-2); border-radius: 8px; padding: 9px 12px; }
.adm-code-v { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; font-weight: 700; letter-spacing: 0.05em; color: var(--text); }
.adm-copy { border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px 6px; }
.adm-copy:active { transform: scale(0.96); }
.adm-gift { display: flex; gap: 8px; }
.adm-gift .input { flex: 1; }
.adm-list { margin-top: var(--s-3); }
.adm-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 9px 2px; border-bottom: 1px solid var(--bg-2); font-size: 13px; }
.adm-row:last-child { border-bottom: 0; }
/* Selettore del motivo dell'attivazione. Stessa forma del segmentato di auth
   (.au-seg), ma qui siamo in linguaggio d'app: raggi dell'app, non pillole. */
.adm-seg { display: flex; gap: 4px; background: var(--bg-2); border-radius: var(--radius);
  padding: 4px; margin-bottom: var(--s-3); }
.adm-seg button { flex: 1; border: 0; border-radius: var(--radius-sm); padding: 9px 6px;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  background: none; cursor: pointer; }
.adm-seg button.on { background: var(--bg-card); color: var(--accent); box-shadow: var(--el-1); }
/* Etichetta del motivo nella lista. L'ambra dei segnali non c'entra: qui e' solo
   una distinzione di categoria, quindi jade per l'acquisto e grigio per il regalo. */
.adm-note { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border-radius: var(--radius-sm); padding: 3px 7px; background: var(--bg-2); color: var(--text-3); }
.adm-note.is-buy { background: var(--accent-light); color: var(--accent); }
.adm-row-l { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.adm-row-l span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-remove { border: 0; background: none; color: var(--red); font-size: 12px; font-weight: 600; cursor: pointer; }

@media (min-width: 640px) { .adm-stats { grid-template-columns: repeat(4, 1fr); } }

/* ---------- CONTATTO IMMOBILE (chiamata diretta) ---------- */
.contact-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-card); }
.contact-av .ic { width: 24px; height: 24px; }
.contact-call:hover { background: var(--accent-hover); }
.contact-call:active { transform: scale(0.98); }
.contact-call .ic { width: 20px; height: 20px; }

/* ---------- PWA: pop-up "Aggiungi alla home" ---------- */
.pwa-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,30,26,0.45);
  display: flex; align-items: flex-end; justify-content: center; padding: var(--s-4);
}
.pwa-sheet {
  background: var(--bg-card); border-radius: 16px; padding: 24px 22px;
  width: 100%; max-width: 380px; box-shadow: var(--shadow-pop);
  text-align: center; animation: sheet-fade var(--t-soft);
}
.pwa-icon { margin-bottom: 12px; }
.pwa-icon img { border-radius: 14px; display: inline-block; }
.pwa-title { font-size: 19px; font-weight: 800; color: var(--brand); letter-spacing: -0.01em; }
.pwa-text { font-size: 14px; color: var(--text-2); line-height: 1.5; margin: 6px 0 18px; }
.pwa-steps { list-style: none; padding: 0; margin: 16px 0 0; text-align: left; }
.pwa-steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); padding: 6px 0; }
.pwa-step-n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--accent-light); color: var(--accent); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
@media (min-width: 560px) { .pwa-scrim { align-items: center; } }

/* ============================================================
   SCHEDA CASA — galleria (Shopify), azioni, foto visita, micro-animazioni
   ============================================================ */
/* Galleria: foto grande + miniature scrollabili */
.casa-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.casa-thumbs::-webkit-scrollbar { display: none; }
.casa-hero .hero-cover-badge .ic { width: 12px; height: 12px; }
.casa-hero .hero-zoom .ic { width: 15px; height: 15px; }
.thumb.is-active { box-shadow: 0 0 0 2.5px var(--accent), 0 0 0 4px var(--bg); }
@keyframes hero-fade { from { opacity: 0.35; } to { opacity: 1; } }

/* Azioni (Cosa fare) */
.azioni { display: flex; flex-direction: column; gap: 10px; }
.act-card:active { transform: scale(0.985); }
.act-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.act-ic .ic { width: 22px; height: 22px; }
.act-chev .ic { width: 20px; height: 20px; }
@keyframes act-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (hover: hover) {
  .act-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,24,40,0.06), 0 10px 24px rgba(16,24,40,0.08); }
  .act-primary:hover { background: var(--accent-hover); }
}

/* Foto della visita: una sola riga scrollabile, chip stanza sotto ogni foto */
.visita-strip { align-items: flex-start; }
.vphoto { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.vphoto .thumb { width: 74px; height: 74px; }
.vchip { max-width: 74px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-light); border-radius: 999px; padding: 2px 8px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   SCHEDA CASA — sistema 19/07/2026 (DESIGN.md riscritto)
   Foto 1:1 sfogliabile · testata · in breve · punti da controllare ·
   caratteristiche a tessere · prezzo · contatto · documenti · menu a isola.
   Namespace cx-  →  usato SOLO da casa.html + js/casa.js
   ============================================================ */
.cx-main { max-width: 560px; margin: 0 auto; padding: calc(58px + env(safe-area-inset-top, 0px)) 0 104px; min-height: 100vh; }
.cx-wrap { padding: 16px; }

/* entrata a cascata. NB: casa.js aggiunge .in con un setTimeout, non con
   requestAnimationFrame — in una scheda in secondo piano rAF è sospeso. */
.cx-reveal { opacity: 0; transform: translateY(14px); }
.cx-reveal.in { opacity: 1; transform: none;
  transition: opacity var(--m-settle) var(--e-out), transform var(--m-settle) var(--e-out); }

/* ---------- IL SEGNO — il quadrante della lente ---------- */
.cx-q { width: 10px; height: 10px; flex: 0 0 auto; background: var(--mark);
  border-radius: 0 100% 0 0; transform-origin: 0 100%; }
.cx-q.sm { width: 7px; height: 7px; }
.cx-q.amber { background: var(--amber-strong); }
@keyframes cxQTurn { from { transform: rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* la lente: solo per ciò che apre un esame ravvicinato */
.cx-lens { position: relative; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%;
  background: var(--accent-light); color: var(--accent); display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px rgba(15,110,86,.22); overflow: hidden; }
.cx-lens::after { content: ""; position: absolute; top: 0; right: 0; width: 50%; height: 50%;
  background: var(--mark); border-radius: 0 100% 0 0; opacity: .9; }
.cx-lens .ic { position: relative; z-index: 1; width: 18px; height: 18px; }
.cx-lens.amber { background: var(--amber-soft); color: var(--amber-ink); box-shadow: inset 0 0 0 1.5px rgba(232,145,42,.28); }
.cx-lens.amber::after { background: var(--amber-strong); }

/* ---------- INTESTAZIONE DI SEZIONE + FASCE ---------- */
.cx-sec { margin-top: 26px; }
.cx-sh { display: flex; align-items: flex-start; gap: 11px; margin: 0 2px 14px; }
.cx-sh > .cx-q { margin-top: 5px; }
.cx-sh-b { flex: 1; min-width: 0; }
.cx-sh-t { font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.cx-sh-s { font-size: 12.5px; color: var(--text-3); margin-top: 3px; line-height: 1.4; }
.cx-sh .cnt { flex: 0 0 auto; margin-top: 2px; font-size: 11.5px; font-weight: 800; color: var(--accent);
  background: var(--accent-light); padding: 4px 11px; border-radius: 999px; font-variant-numeric: tabular-nums; }
/* la fascia arriva ai bordi della colonna: a tutto schermo sul telefono */
.cx-band { margin: 26px calc(-1 * var(--s-4)) 0; padding: 24px var(--s-4) 26px; background: var(--band); }
.cx-band > .cx-sec:first-child { margin-top: 0; }

/* ---------- HEADER (sempre visibile e fisso) ---------- */
.cx-tb { position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: calc(58px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px);
  display: flex; align-items: center;
  background: var(--bg-card); border-bottom: 1px solid var(--hair); box-shadow: var(--el-1); }
.cx-tb .inner { max-width: 560px; margin: 0 auto; width: 100%; display: flex; align-items: center; gap: 10px; padding: 0 12px; }
.cx-tb-back { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; border: 0;
  box-shadow: inset 0 0 0 1px var(--border); background: var(--bg-card); display: grid; place-items: center;
  color: var(--text); cursor: pointer; }
.cx-tb-back .ic { width: 18px; height: 18px; }
.cx-tb-t { flex: 1; min-width: 0; font-size: 15px; font-weight: 800; letter-spacing: -.015em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-tb-cta { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px;
  border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; font-size: 13.5px;
  border: 0; cursor: pointer; text-decoration: none; font-family: inherit; }
.cx-tb-cta .ic { width: 16px; height: 16px; }

/* ---------- FOTO 1:1 SFOGLIABILE ---------- */
.cx-ph { position: relative; border-radius: 20px; overflow: hidden; background: var(--bg-2);
  box-shadow: var(--el-2), inset 0 0 0 1px var(--hair); }
.cx-ph-track { display: flex; aspect-ratio: 1 / 1; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cx-ph-track::-webkit-scrollbar { display: none; }
.cx-ph-slide { flex: 0 0 100%; scroll-snap-align: center; }
.cx-ph-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-ph-veil { position: absolute; top: 0; left: 0; right: 0; height: 96px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,18,15,.34), rgba(6,18,15,0)); }
.cx-ph-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex;
  justify-content: space-between; gap: 10px; padding: 12px; }
.cx-chipf { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: 999px; background: rgba(6,18,15,.5); color: #fff; font-size: 13.5px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 0; font-family: inherit;
  transition: background var(--m-state) ease-out, transform var(--m-press) ease-out; }
.cx-chipf:active { transform: scale(.96); }
@media (hover: hover) { .cx-chipf:hover { background: rgba(6,18,15,.68); } }
.cx-chipf .ic { width: 16px; height: 16px; }
.cx-ph-zoom { position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 40px; height: 40px;
  border: 0; border-radius: 12px; background: rgba(6,18,15,.5); color: #fff; display: grid;
  place-items: center; cursor: pointer; transition: transform var(--m-press) ease-out; }
.cx-ph-zoom:active { transform: scale(.93); }
.cx-ph-zoom .ic { width: 16px; height: 16px; }
.cx-ph-dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3; display: flex;
  justify-content: center; gap: 5px; pointer-events: none; }
.cx-ph-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.55);
  transition: width var(--m-enter) var(--e-out), background var(--m-enter) var(--e-out); }
.cx-ph-dot.on { width: 20px; background: #fff; }
/* stato vuoto: nessuna foto ancora */
.cx-ph-empty { aspect-ratio: 1 / 1; width: 100%; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; border: 0; cursor: pointer; font-family: inherit;
  background: linear-gradient(150deg, #1c5346, var(--brand)); color: #CFE6DC; }
.cx-ph-empty .ic { width: 32px; height: 32px; color: var(--mark); }
.cx-ph-empty .t { font-size: 15px; font-weight: 800; color: #fff; }
.cx-ph-empty .s { font-size: 12.5px; color: #9DC3B8; }

.cx-thumbs { display: flex; gap: 8px; padding: 12px 0 2px; overflow-x: auto; scrollbar-width: none; }
.cx-thumbs::-webkit-scrollbar { display: none; }
.cx-thumb { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 13px; overflow: hidden; position: relative;
  background: var(--bg-2); cursor: pointer; padding: 0; border: 0; box-shadow: inset 0 0 0 1px var(--hair);
  transition: transform var(--m-press) ease-out, box-shadow var(--m-state) var(--e-out); }
.cx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-thumb:active { transform: scale(.93); }
.cx-thumb.on { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px var(--accent-light); }
.cx-thumb.add { display: grid; place-items: center; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--border); }
.cx-thumb.add .ic { width: 19px; height: 19px; }
.cx-thumb .cov { position: absolute; top: 4px; right: 4px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--amber-strong); color: #fff; display: grid; place-items: center; box-shadow: var(--el-1); }
.cx-thumb .cov .ic { width: 9px; height: 9px; }

/* ---------- TESTATA ---------- */
.cx-hd { margin-top: 18px; }
.cx-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800;
  padding: 5px 13px 5px 10px; border-radius: 999px; margin-bottom: 10px; }
.cx-title { font-size: 30px; font-weight: 800; letter-spacing: -.032em; line-height: 1.08; margin: 0;
  text-wrap: balance; }
.cx-addr { display: flex; align-items: center; gap: 7px; font-size: 14.5px; color: var(--text-2); margin-top: 8px; }
.cx-addr .ic { width: 15px; height: 15px; flex: 0 0 auto; color: var(--accent); }

/* ---------- IN BREVE ---------- */
.cx-specs { display: flex; border-radius: 14px; background: var(--bg-card);
  box-shadow: var(--el-1), inset 0 0 0 1px var(--hair); overflow: hidden; }
.cx-spec { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 14px 4px 13px; position: relative; white-space: nowrap; }
.cx-spec + .cx-spec::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px;
  background: var(--hair); }
.cx-spec .ic { width: 15px; height: 15px; color: var(--accent); margin-bottom: 2px; }
.cx-spec .v { font-size: 19px; font-weight: 800; letter-spacing: -.028em; font-variant-numeric: tabular-nums; }
.cx-spec .l { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }

/* ---------- PUNTI DA CONTROLLARE ---------- */
.cx-pc { display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 14px;
  background: var(--bg-card); box-shadow: var(--el-1), inset 0 0 0 1px var(--hair);
  text-decoration: none; color: inherit; cursor: pointer; border: 0; width: 100%; font-family: inherit;
  text-align: left; transition: transform var(--m-press) ease-out, box-shadow var(--m-state) var(--e-out); }
.cx-pc.attn { box-shadow: var(--el-1), inset 0 0 0 1px var(--amber-line); }
.cx-pc:active { transform: scale(.99); }
@media (hover: hover) { .cx-pc:hover { box-shadow: var(--el-2), inset 0 0 0 1px var(--hair); } }
@media (hover: hover) { .cx-pc.attn:hover { box-shadow: var(--el-2), inset 0 0 0 1px var(--amber-line); } }
.cx-pc-b { flex: 1; min-width: 0; }
.cx-pc-t { display: block; font-size: 15.5px; font-weight: 800; }
.cx-pc-t.attn { color: var(--amber-ink); }
.cx-pc-t.ok { color: var(--accent); }
.cx-pc-s { display: block; font-size: 13px; color: var(--text-2); margin-top: 3px; }
.cx-pc .ch { color: var(--text-3); transition: transform var(--m-state) var(--e-out); }
.cx-pc .ch .ic { width: 20px; height: 20px; }
@media (hover: hover) { .cx-pc:hover .ch { transform: translateX(4px); } }

/* ---------- CARATTERISTICHE A TESSERE ----------
   Il valore è l'eroe, non l'icona. Colonne guidate dal CONTENITORE. */
.cx-ft { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.cx-ft-i { display: flex; flex-direction: column; gap: 9px; min-height: 88px; padding: 14px;
  border-radius: 14px; background: var(--bg-card); box-shadow: var(--el-1), inset 0 0 0 1px var(--hair);
  transition: transform var(--m-state) var(--e-out), box-shadow var(--m-state) var(--e-out); }
@media (hover: hover) { .cx-ft-i:hover { transform: translateY(-2px); box-shadow: var(--el-2), inset 0 0 0 1px var(--hair); } }
.cx-ft-h { display: flex; align-items: center; gap: 7px; color: var(--text-3); }
.cx-ft-h .ic { width: 15px; height: 15px; }
.cx-ft-l { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.cx-ft-v { font-size: 21px; font-weight: 800; letter-spacing: -.025em; line-height: 1; margin-top: auto;
  font-variant-numeric: tabular-nums; }
.cx-ft-v .u { font-size: .58em; font-weight: 700; color: var(--text-3); letter-spacing: 0; margin-left: 3px; }
.cx-ft-v.small { font-size: 18px; }
.cx-ft-v.off { color: var(--text-3); font-size: 19px; }
.cx-ft-i.is-off { background: #FAFCFB; }
.cx-ft-i.is-off .cx-ft-h { color: #A9B8B1; }

/* classe energetica: la freccia È l'icona (niente fulmine accanto) */
.cx-ape { display: inline-flex; align-items: center; height: 30px; padding: 0 16px 0 11px; color: #fff;
  font-weight: 800; font-size: 16px; letter-spacing: -.01em;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%); }

/* ---------- PREZZO ---------- */
.cx-pr { border-radius: 20px; padding: 18px; background: var(--bg-card);
  box-shadow: var(--el-2), inset 0 0 0 1px var(--hair); }
.cx-pl { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.cx-pn { font-size: 34px; font-weight: 800; letter-spacing: -.028em; line-height: 1; margin-top: 9px;
  font-variant-numeric: tabular-nums; }
.cx-pside { display: flex; gap: 8px; margin-top: 15px; flex-wrap: wrap; }
.cx-ppill { display: inline-flex; align-items: center; gap: 7px; background: var(--bg-2); border-radius: 999px;
  padding: 7px 13px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.cx-ppill .ic { width: 14px; height: 14px; color: var(--accent); }
.cx-ppill b { color: var(--text); font-variant-numeric: tabular-nums; }
.cx-pcta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 54px; margin-top: 10px; border-radius: 999px; background: var(--accent); color: #fff;
  border: 0; font-family: inherit; font-size: 16px; font-weight: 800; cursor: pointer; box-shadow: var(--el-2);
  transition: transform var(--m-press) ease-out, background var(--m-state) ease-out, box-shadow var(--m-state) var(--e-out); }
.cx-pcta:active { transform: scale(.985); }
@media (hover: hover) { .cx-pcta:hover { background: var(--accent-hover); box-shadow: var(--el-3); } }
.cx-pcta .ic { width: 20px; height: 20px; }
.cx-phint { font-size: 12.5px; color: var(--text-3); text-align: center; margin-top: 10px; }
.cx-poff { display: flex; align-items: center; gap: 13px; width: 100%; margin-top: 10px; padding: 15px;
  border-radius: 14px; background: var(--bg-card); box-shadow: var(--el-1), inset 0 0 0 1px var(--hair);
  font-family: inherit; text-align: left; color: inherit; cursor: pointer; border: 0;
  transition: transform var(--m-press) ease-out, box-shadow var(--m-state) var(--e-out); }
.cx-poff:active { transform: scale(.99); }
@media (hover: hover) { .cx-poff:hover { box-shadow: var(--el-2), inset 0 0 0 1px var(--hair); } }
.cx-poff-n { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.028em; color: var(--accent);
  margin-top: 5px; font-variant-numeric: tabular-nums; }
.cx-delta { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 800; padding: 6px 11px; border-radius: 999px; background: var(--green-bg); color: var(--green);
  font-variant-numeric: tabular-nums; }
.cx-delta.hi { background: var(--amber-soft); color: var(--amber-ink); }
.cx-delta .ic { width: 14px; height: 14px; }

/* ---------- CONTATTO ---------- */
.cx-ct { display: flex; align-items: center; gap: 13px; padding: 13px; border-radius: 14px;
  background: var(--bg-card); box-shadow: var(--el-1), inset 0 0 0 1px var(--hair); }
.cx-ct-av { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-light);
  color: var(--accent); display: grid; place-items: center; }
.cx-ct-av .ic { width: 21px; height: 21px; }
.cx-ct-b { flex: 1; min-width: 0; }
.cx-ct-n { font-size: 15px; font-weight: 800; line-height: 1.2; }
.cx-ct-m { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.cx-ct-role { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-light); border-radius: 6px; padding: 2px 7px; }
.cx-ct-num { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cx-ct-call { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 46px;
  padding: 0 18px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14.5px;
  font-weight: 800; text-decoration: none; box-shadow: var(--el-1);
  transition: transform var(--m-press) ease-out, background var(--m-state) ease-out; }
.cx-ct-call:active { transform: scale(.97); }
@media (hover: hover) { .cx-ct-call:hover { background: var(--accent-hover); } }
.cx-ct-call .ic { width: 17px; height: 17px; }

/* ---------- DOCUMENTI — barra a segmenti (quanti, non una percentuale) ---------- */
.cx-dseg { display: flex; gap: 4px; margin: 0 2px 14px; }
.cx-dseg i { flex: 1; height: 6px; border-radius: 999px; background: var(--track); transform-origin: left center; }
.cx-dseg i.on { background: var(--accent); }
.cx-dseg i.mid { background: var(--amber-soft); }
@keyframes cxSegFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.cx-dseg i.grow { animation: cxSegFill var(--m-enter) var(--e-out) both; animation-delay: 120ms; }

/* Documenti — chip di stato (condiviso scheda casa + Raccolta) */
.dchips { display: flex; flex-direction: column; gap: 8px; }
/* I nomi veri dei documenti sono lunghi (è una condizione permanente, non un caso):
   su schermo stretto il chip scende sotto invece di strizzare il testo in colonna. */
.dchip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 13px; padding: 11px 13px; position: relative; }
.dchip-ic { flex: 0 0 auto; align-self: flex-start; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.dchip-ic .ic { width: 16px; height: 16px; }
.dchip-ic.sN { background: var(--bg-2); color: var(--text-3); }
.dchip-ic.sA { background: #FBEDD5; color: #8A5214; }
.dchip-ic.sG { background: var(--accent); color: #fff; }
.dchip-b { flex: 1 1 200px; min-width: 0; }
.dchip-t { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.25; }
.dchip-h { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.dchip { flex: 0 0 auto; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; font-size: 12.5px; font-weight: 700; padding: 9px 13px; border-radius: 999px; cursor: pointer; border: 0; font-family: inherit; }
.dchip .ic { width: 13px; height: 13px; }
.dchip.sN { background: var(--bg-2); color: var(--text-2); }
.dchip.sA { background: #FBEDD5; color: #8A5214; }
.dchip.sG { background: var(--accent-light); color: var(--accent); }
.dchip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Ancorato SOTTO la riga, non a un'altezza fissa: col chip che va a capo su
   schermo stretto un `top` fisso ci finiva sopra. */
.dmenu { position: absolute; right: 13px; top: calc(100% - 6px); z-index: 6; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 34px -12px rgba(16,24,40,.28); padding: 5px; width: 178px; }
.dmenu.hidden { display: none; }
.dmi { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 44px; font-family: inherit; font-size: 13.5px; font-weight: 600; padding: 10px; border-radius: 8px; color: var(--text-2); background: none; border: 0; cursor: pointer; text-align: left; }
.dmi .ic { width: 15px; height: 15px; }
.dmi.on { background: var(--accent-light); color: var(--accent); font-weight: 800; }
@media (hover: hover) { .dmi:hover { background: var(--bg-2); } }

/* ---------- MENU A ISOLA ---------- */
.cx-isl { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(241,247,244,0), var(--bg) 38%); }
.cx-isl-in { max-width: 560px; margin: 0 auto; background: var(--bg-card); border-radius: 999px; padding: 8px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--el-3), inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255,255,255,.9);
  transition: border-radius var(--m-enter) var(--e-out); }
.cx-isl-bar { display: contents; }
.cx-isl-primary { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; border-radius: 999px; background: var(--accent); color: #fff; font-family: inherit;
  font-weight: 800; font-size: 16px; border: 0; cursor: pointer; box-shadow: var(--el-2); text-decoration: none;
  transition: transform var(--m-press) ease-out, background var(--m-state) ease-out;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-isl-primary:active { transform: scale(.98); }
@media (hover: hover) { .cx-isl-primary:hover { background: var(--accent-hover); } }
.cx-isl-primary .ic { width: 20px; height: 20px; }
.cx-isl-more { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: var(--bg-2);
  color: var(--brand); border: 0; display: grid; place-items: center; cursor: pointer;
  transition: transform var(--m-press) ease-out, background var(--m-state) ease-out; }
.cx-isl-more:active { transform: scale(.93); }
@media (hover: hover) { .cx-isl-more:hover { background: #DCE7E2; } }
/* pulsante Appuntamento nella barra isola (accanto ai tre puntini) */
.cx-isl-appt { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: var(--accent-light);
  color: var(--accent); border: 0; display: grid; place-items: center; cursor: pointer;
  transition: transform var(--m-press) ease-out, background var(--m-state) ease-out; }
.cx-isl-appt.hidden { display: none; }
.cx-isl-appt:active { transform: scale(.93); }
.cx-isl-appt .ic { width: 22px; height: 22px; }
@media (hover: hover) { .cx-isl-appt:hover { background: #D7EDE1; } }
.cx-isl-more .ic { width: 22px; height: 22px; }
.cx-isl-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(6,18,15,.48); opacity: 0;
  pointer-events: none; transition: opacity var(--m-enter) var(--e-out); }
.cx-isl-scrim.show { opacity: 1; pointer-events: auto; }
.cx-isl.open { background: none; }
.cx-isl.open .cx-isl-in { border-radius: 28px; flex-direction: column; align-items: stretch; padding: 15px; gap: 13px;
  max-height: calc(100dvh - 24px); overflow-y: auto; }  /* mai oltre lo schermo su viewport basse */
.cx-isl-panel { display: flex; flex-direction: column; gap: 13px; }
.cx-isl-head { display: flex; align-items: center; gap: 10px; }
.cx-isl-title { font-size: 16.5px; font-weight: 800; letter-spacing: -.015em; }
.cx-isl-x { margin-left: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg-2);
  color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.cx-isl-x .ic { width: 17px; height: 17px; }
.cx-isl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cx-isl-item { display: flex; flex-direction: column; justify-content: space-between; gap: 11px;
  min-height: 90px; padding: 14px; border-radius: 14px; background: var(--bg); border: 0;
  font-family: inherit; text-align: left; color: inherit; text-decoration: none; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--hair);
  transition: transform var(--m-press) ease-out, background var(--m-state) ease-out; }
.cx-isl-item:active { transform: scale(.97); }
@media (hover: hover) { .cx-isl-item:hover { background: var(--bg-2); } }
.cx-isl-item .ic { width: 22px; height: 22px; color: var(--accent); }
.cx-isl-t { display: block; font-size: 14px; font-weight: 800; line-height: 1.2; }
.cx-isl-s { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.cx-isl-item.now { background: linear-gradient(150deg, #17564A, var(--brand)); color: #fff; box-shadow: var(--el-2); }
.cx-isl-item.now .ic { color: var(--mark); }
.cx-isl-item.now .cx-isl-s { color: var(--brand-dim); }
@media (hover: hover) { .cx-isl-item.now:hover { background: linear-gradient(150deg, #1c6153, #10443b); } }
.cx-isl-now { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em; color: var(--mark); margin-bottom: 5px; }
.cx-isl-sep { border: 0; height: 1px; background: var(--hair); margin: 0; }
.cx-isl-row { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 12px 14px; border: 0;
  border-radius: 14px; background: var(--red-bg); box-shadow: inset 0 0 0 1px #F3D6D2; color: var(--red);
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; width: 100%;
  transition: transform var(--m-press) ease-out, background var(--m-state) ease-out; }
.cx-isl-row:active { transform: scale(.98); }
.cx-isl-row .ic { width: 18px; height: 18px; }

/* ---------- FOCUS — un solo trattamento su tutta la scheda ---------- */
.cx-chipf:focus-visible, .cx-ph-zoom:focus-visible, .cx-thumb:focus-visible, .cx-pc:focus-visible,
.cx-pcta:focus-visible, .cx-poff:focus-visible, .cx-ct-call:focus-visible, .cx-tb-back:focus-visible,
.cx-tb-cta:focus-visible, .cx-isl-primary:focus-visible, .cx-isl-more:focus-visible,
.cx-isl-x:focus-visible, .cx-isl-item:focus-visible, .cx-ph-empty:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 3px; }
.cx-isl-row:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { .cx-reveal { opacity: 1; transform: none; } }

/* ---------- MOVIMENTO RIDOTTO ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   SCHEDA CASA — redesign c3 (21/07): stato+pallini su foto,
   2 card prezzo/offerta, Punti chiudibile, righe comprimibili
   con colore-sezione, documenti con toggle mutuo.
   ============================================================ */

/* --- foto: back tondo, stato e "aggiungi" sovrapposti --- */
.cx-ph-back { position: absolute; left: 12px; top: 12px; z-index: 3; width: 40px; height: 40px; border: 0;
  border-radius: 50%; background: rgba(255,255,255,.92); color: var(--brand); display: grid; place-items: center;
  box-shadow: var(--el-1); cursor: pointer; text-decoration: none; transition: transform var(--m-press) ease-out; }
.cx-ph-back:active { transform: scale(.93); }
.cx-ph-back .ic { width: 20px; height: 20px; }
.cx-annlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px;
  font-weight: 700; color: var(--accent); text-decoration: none; }
.cx-annlink:active { opacity: .6; }
.cx-annlink .ic { width: 15px; height: 15px; }
.cx-ph-stato { position: absolute; top: 12px; right: 12px; z-index: 3; display: inline-flex;
  align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit; background: rgba(255,255,255,.94); color: var(--brand); font-size: 12.5px; font-weight: 700;
  box-shadow: 0 2px 8px -3px rgba(0,0,0,.28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cx-ph-stato:active { transform: scale(.96); }
.cx-ph-stato .cx-q { width: 8px; height: 8px; }
.cx-ph-stato .ic { width: 15px; height: 15px; opacity: .7; }

/* Foglio selettore stato (tocco sulla pillola) */
.cx-sheet-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(6,20,17,.42);
  display: flex; align-items: flex-end; justify-content: center; }
.cx-sheet { width: 100%; max-width: 460px; background: var(--bg-card); border-radius: 24px 24px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -12px 44px -12px rgba(6,20,17,.42); }
.cx-sheet-grab { display: block; width: 40px; height: 5px; border-radius: 99px; background: var(--border); margin: 0 auto 14px; }
.cx-sheet-t { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.cx-sheet-s { font-size: 12.5px; color: var(--text-2); margin: 2px 0 14px; }
.cx-sheet-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px; margin-bottom: 9px;
  border-radius: 15px; border: 1.5px solid transparent; background: var(--bg); cursor: pointer; font-family: inherit; text-align: left; }
.cx-sheet-opt.on { background: var(--accent-light); border-color: var(--accent); }
.cx-sheet-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.cx-sheet-ol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cx-sheet-ol .n { font-size: 14.5px; font-weight: 700; color: var(--text); }
.cx-sheet-ol .d { font-size: 11.5px; color: var(--text-2); }
.cx-sheet-ok { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.cx-sheet-ok .ic { width: 14px; height: 14px; }

/* Invito automatico a segnare "Visitata" */
.cx-sprompt { position: relative; display: flex; gap: 12px; align-items: flex-start; margin-top: 12px;
  border-radius: 16px; padding: 13px 14px; background: #EAF4EF; border: 1px solid #CFE6DC; }
.cx-sprompt-x { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border: 0; background: none;
  border-radius: 50%; color: var(--text-3); display: grid; place-items: center; cursor: pointer; }
.cx-sprompt-x .ic { width: 15px; height: 15px; }
.cx-sprompt-i { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.cx-sprompt-i .ic { width: 20px; height: 20px; }
.cx-sprompt-t { font-size: 14px; font-weight: 800; color: var(--brand); letter-spacing: -.01em; }
.cx-sprompt-s { font-size: 12.5px; color: var(--text-2); line-height: 1.45; margin: 2px 0 10px; }
.cx-sprompt-cta { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; }
.cx-sprompt-cta .ic { width: 15px; height: 15px; }
.cx-ph-stato .cx-q { width: 7px; height: 7px; }
.cx-ph-add { position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--accent);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--el-1);
  transition: transform var(--m-press) ease-out; }
.cx-ph-add:active { transform: scale(.93); }
.cx-ph-add .ic { width: 20px; height: 20px; }
/* con l'add presente, lo zoom si sposta a sinistra di esso */
.cx-ph-zoom.paired { right: 60px; }

/* --- 2 card prezzo/offerta --- */
.cx-pcards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cx-pcard { position: relative; overflow: hidden; min-width: 0; border: 0; background: var(--bg-card);
  border-radius: var(--radius-lg); box-shadow: var(--el-2); padding: 15px 14px; text-align: left; }
.cx-pcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.cx-pcard-l { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.cx-pcard-v { font-size: 23px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-top: 9px;
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.cx-pcard-v .u { font-size: 15px; color: var(--text-2); font-weight: 800; margin-left: 2px; }
.cx-pcard-sub { font-size: 12.5px; font-weight: 800; color: var(--text-2); margin-top: 8px; font-variant-numeric: tabular-nums; }
/* card offerta (cliccabile) */
button.cx-pcard { width: 100%; font-family: inherit; cursor: pointer;
  transition: transform var(--m-press) ease-out, box-shadow var(--m-state) ease-out; }
button.cx-pcard:active { transform: scale(.985); }
.cx-pcard.offer::before { background: var(--mark); }
.cx-pcard.offer .cx-pcard-l { color: var(--accent); }
.cx-pcard.offer .cx-pcard-v { color: var(--accent); }
.cx-pdelta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800;
  color: var(--accent); background: #D7EFE3; padding: 5px 9px; border-radius: 999px; margin-top: 9px; }
.cx-pdelta.hi { background: var(--amber-soft); color: var(--amber-ink); }
.cx-pdelta .ic { width: 13px; height: 13px; }
/* variante: nessuna offerta -> pulsante pieno */
.cx-pcard.cta { background: var(--accent); display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.cx-pcard.cta::before { display: none; }
.cx-pcard.cta .ct { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #fff; }
.cx-pcard.cta .ct .ic { width: 18px; height: 18px; }
.cx-pcard.cta .cs { font-size: 11.5px; color: rgba(255,255,255,.85); line-height: 1.35; }
@media (hover: hover) { .cx-pcard.cta:hover { background: var(--accent-hover); } }
.cx-cond { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 11px;
  font-size: 12.5px; color: var(--text-2); font-weight: 700; }
.cx-cond .ic { width: 15px; height: 15px; color: var(--accent); }
.cx-cond b { font-variant-numeric: tabular-nums; }

/* --- specs senza titolo: staccale dalla sezione precedente --- */
.cx-specs.cx-reveal { margin-top: 16px; }

/* --- Punti da controllare: zona ambra chiudibile --- */
.cx-punti { background: #FCF6EC; border-radius: 20px; padding: 15px 15px 18px; margin-top: 24px; }
.cx-punti:not(.open) { padding-bottom: 15px; }
.cx-punti-h { display: flex; align-items: flex-start; gap: 11px; width: 100%; background: none; border: 0;
  text-align: left; font-family: inherit; cursor: pointer; padding: 0; margin-bottom: 13px; }
.cx-punti:not(.open) .cx-punti-h { margin-bottom: 0; }
.cx-punti-h > .cx-q { margin-top: 6px; }
.cx-punti-hb { flex: 1; min-width: 0; }
.cx-punti-t { display: block; font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.cx-punti-s { display: block; font-size: 12.5px; color: #A98B5A; margin-top: 3px; }
.cx-punti-cnt { flex: 0 0 auto; margin-top: 1px; font-size: 12px; font-weight: 800; color: var(--amber-ink);
  background: var(--amber-soft); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.cx-punti-chev { flex: 0 0 auto; width: 28px; height: 28px; margin-top: -1px; border-radius: 50%;
  background: #F1E4CE; color: #8A5214; display: grid; place-items: center;
  transition: transform var(--m-state) var(--e-out); }
.cx-punti-chev .ic { width: 17px; height: 17px; }
.cx-punti.open .cx-punti-chev { transform: rotate(180deg); }
.cx-punti:not(.open) .cx-punti-body { display: none; }
.cx-plab { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: #A98B5A; margin: 6px 3px 9px; }
.cx-plab .n { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: #EBDBBF;
  color: #8A5214; display: inline-grid; place-items: center; font-size: 11px; }
.cx-plab.a { color: #8A5214; }
.cx-plab.a .n { background: var(--amber-soft); color: var(--amber-ink); }
/* la card segnale, dentro la zona calda */
.cx-punti .cx-pc { background: #FFFDF8; border-radius: 15px;
  box-shadow: 0 7px 20px -12px rgba(138,82,20,.35); margin-bottom: 4px; }
.cx-punti .cx-pc.attn { box-shadow: 0 7px 20px -12px rgba(138,82,20,.35), inset 0 0 0 1px var(--amber-line); }
.cx-punti .cx-pc-s { color: #9A8A6E; }
.cx-punti .cx-pc .ch { color: #C6A876; }
/* righe "da completare": slot tratteggiati */
.cx-todo { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.5);
  border: 1.5px dashed #E4CEA6; border-radius: 14px; padding: 12px 14px; margin-bottom: 8px;
  width: 100%; font-family: inherit; text-align: left; cursor: pointer; color: inherit; text-decoration: none;
  transition: transform var(--m-press) ease-out; }
.cx-todo:active { transform: scale(.99); }
.cx-todo-i { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; background: #F3EADA;
  color: #A98B5A; display: grid; place-items: center; }
.cx-todo-i .ic { width: 18px; height: 18px; }
.cx-todo-b { flex: 1; min-width: 0; }
.cx-todo-t { display: block; font-size: 13.5px; font-weight: 700; }
.cx-todo-s { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.cx-todo-add { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: var(--accent);
  color: #fff; display: grid; place-items: center; }
.cx-todo-add .ic { width: 18px; height: 18px; }

/* --- divisore "Dettagli" --- */
.cx-stacklab { display: flex; align-items: center; gap: 10px; margin: 26px 2px 12px;
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.cx-stacklab .ln { height: 1px; flex: 1; background: var(--border); }

/* --- righe comprimibili (accordion) con colore-sezione --- */
.cx-acc { margin-top: 11px; }
.cx-acc.cx-reveal { margin-top: 11px; }
.cx-acch { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--bg-card); border: 0;
  border-radius: 14px; box-shadow: var(--el-1); padding: 15px 16px; font-family: inherit; text-align: left;
  cursor: pointer; transition: box-shadow var(--m-state) ease-out; }
.cx-acc.open .cx-acch { border-radius: 14px 14px 0 0; box-shadow: none; }
.cx-acc-i { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; background: var(--accent-light);
  color: var(--accent); display: grid; place-items: center; transition: background var(--m-state) ease-out, color var(--m-state) ease-out; }
.cx-acc-i .ic { width: 18px; height: 18px; }
.cx-acc-b { flex: 1; min-width: 0; }
.cx-acc-t { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.cx-acc-s { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-acc-cnt { flex: 0 0 auto; font-size: 12px; font-weight: 800; color: var(--accent); background: var(--accent-light);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.cx-acc-chev { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; background: var(--bg-2);
  color: var(--text-2); display: grid; place-items: center; transition: transform var(--m-state) var(--e-out); }
.cx-acc-chev .ic { width: 17px; height: 17px; }
.cx-acc.open .cx-acch .cx-acc-chev { transform: rotate(180deg); }
.cx-accb { background: var(--bg-card); border-radius: 0 0 14px 14px; box-shadow: var(--el-1); padding: 4px 15px 16px; }
.cx-acc:not(.open) .cx-accb { display: none; }
/* colore-sezione (wayfinding): trovi la sezione dal colore, non solo dal testo */
.c-doc .cx-acc-i { background: #FBEDD5; color: #B57A1E; }
.c-doc .cx-acc-cnt { background: #FBEDD5; color: #8A5214; }
.c-intorno .cx-acc-i { background: #E3F0F8; color: #2C86B8; }
.c-intorno .cx-acc-cnt { background: #E3F0F8; color: #1E5F86; }
.c-foto .cx-acc-i { background: #ECEDFA; color: #5E6BB8; }
.c-foto .cx-acc-cnt { background: #ECEDFA; color: #454FA0; }
.cx-acc.open .cx-acc-i { color: #fff; }
.c-carat.cx-acc.open .cx-acc-i { background: var(--accent); }
.c-doc.cx-acc.open .cx-acc-i { background: #B57A1E; }
.c-intorno.cx-acc.open .cx-acc-i { background: #2C86B8; }
.c-foto.cx-acc.open .cx-acc-i { background: #5E6BB8; }
/* le tessere caratteristiche riempiono il body senza margine sopra */
.cx-accb .cx-ft { margin-top: 6px; }

/* --- Chi vende / Note: sezioni fisse con etichetta --- */
.cx-slab { display: flex; align-items: center; gap: 8px; margin: 24px 2px 9px;
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.cx-slab-i { color: var(--accent); display: inline-flex; }
.cx-slab-i .ic { width: 15px; height: 15px; }
.cx-slabcard { background: var(--bg-card); border-radius: 14px; box-shadow: var(--el-1); padding: 14px 15px; }
.cx-note { font-size: 13.5px; color: var(--text-2); line-height: 1.6; margin: 0; white-space: pre-wrap; }

/* --- Documenti: toggle mutuo + card informative --- */
.cx-mtoggle { display: flex; gap: 5px; background: var(--bg-2); border-radius: 12px; padding: 4px; margin: 6px 0 14px; }
.cx-mt { flex: 1; border: 0; border-radius: 9px; padding: 9px 6px; font-family: inherit; font-size: 13px;
  font-weight: 800; color: var(--text-2); background: none; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; transition: background var(--m-state) ease-out, color var(--m-state) ease-out; }
.cx-mt .ic { width: 15px; height: 15px; }
.cx-mt.on { background: var(--bg-card); color: var(--accent); box-shadow: var(--el-1); }
.cx-docs:not(.mut) .mut-only { display: none; }
.cx-dgl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-3); margin: 6px 0 9px; }
.cx-dinfo { display: flex; align-items: flex-start; gap: 11px; background: #EEF4FA; border-radius: 12px;
  padding: 12px 13px; margin-bottom: 8px; }
.cx-dinfo-i { width: 32px; height: 32px; border-radius: 9px; background: #DCEBF7; color: #2C86B8;
  display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.cx-dinfo-i .ic { width: 17px; height: 17px; }
.cx-dinfo-b { flex: 1; min-width: 0; }
.cx-dinfo-b b { display: block; font-size: 13.5px; font-weight: 700; }
.cx-dinfo-b small { display: block; font-size: 11.5px; color: var(--text-2); font-weight: 400; margin-top: 2px; line-height: 1.4; }
.cx-dmore { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 6px 12px; border: 0;
  border-radius: 999px; background: #DCEBF7; color: #1E5F86; font-family: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.cx-dmore .ic { width: 14px; height: 14px; transition: transform var(--m-state) var(--e-out); }
.cx-dinfo.open .cx-dmore .ic { transform: rotate(180deg); }
.cx-dexp { font-size: 12.5px; color: var(--text-2); line-height: 1.55; margin-top: 11px; padding-top: 11px;
  border-top: 1px solid #D5E3EF; display: none; }
.cx-dinfo.open .cx-dexp { display: block; }
.cx-dexp b { color: var(--text); font-weight: 700; }

/* focus coerente sui nuovi controlli */
.cx-punti-h:focus-visible, .cx-acch:focus-visible, .cx-todo:focus-visible, .cx-pcard:focus-visible,
.cx-mt:focus-visible, .cx-dmore:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ============================================================
   AUTH — accedi / registrati (redesign 21/07): pannello brand +
   form, toggle segmentato, campi con label sopra, codice
   obbligatorio in registrazione, stato "email inviata".
   Namespace au- per non collidere con le classi esistenti (card, brand, tab).
   ============================================================ */
.au { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.08fr .92fr; }
@media (max-width: 900px) { .au { grid-template-columns: 1fr; } }

/* pannello brand — HERO VERDE (Petrolio, coerente con l'onboarding): glow + grana,
   headline chiara, 3 punti numerati jade. (Form bianco a destra per leggibilità.) */
.au-brand { position: relative; overflow: hidden; padding: 54px 58px; color: #EDF4F0;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(163deg, #0E3B34 0%, #0A2E29 52%, #07201C 100%); }
.au-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(56% 42% at 82% 92%, rgba(72,195,155,.20), transparent 68%); }
.au-grain { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.au-brand > *:not(.au-glow):not(.au-grain) { position: relative; z-index: 1; }

.au-logo { height: 29px; width: auto; display: block; align-self: flex-start; }

.au-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mark); }
.au-kicker::before { content: ""; width: 22px; height: 1.5px; background: var(--mark); }
.au-h { font-size: clamp(33px, 3.6vw, 56px); line-height: 1.03; font-weight: 800; letter-spacing: -.033em;
  margin: 0; max-width: 13ch; color: #EDF4F0; }
.au-u { position: relative; white-space: nowrap; color: var(--mark); }
.au-u::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.1em; height: .16em;
  border-radius: 99px; background: var(--mark); opacity: .5; }
.au-lede { font-size: 15px; line-height: 1.55; color: #C4D8CE; max-width: 40ch; margin: 18px 0 0; }

.au-trail { margin: 34px 0 0; max-width: 440px; display: flex; flex-direction: column; gap: 19px; }
.au-step { display: flex; gap: 15px; align-items: flex-start;
  opacity: 0; transform: translateY(12px); animation: auRise .7s cubic-bezier(.32,.72,0,1) forwards;
  animation-delay: calc(.15s + var(--i) * .13s); }
.au-idx { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--mark); color: var(--mark); font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums; background: rgba(72,195,155,.08); }
.au-k { display: block; margin: 3px 0 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mark); }
.au-step h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 3px; color: #EDF4F0; }
.au-step p { font-size: 13.5px; line-height: 1.45; color: #C4D8CE; margin: 0; }

.au-foot { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #C4D8CE; }
.au-foot svg { width: 15px; height: 15px; color: var(--mark); flex: 0 0 auto; }

@keyframes auRise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .au-step { opacity: 1; transform: none; animation: none; }
}

@media (max-width: 900px) {
  .au-brand { padding: 32px 22px 26px; justify-content: flex-start; gap: 16px; }
  .au-trail, .au-foot { display: none; }
  .au-h { font-size: clamp(28px, 7.5vw, 36px); }
  .au-lede { margin-top: 12px; font-size: 14px; }
}

/* pannello form (chiaro, piatto — niente guscio di vetro) */
.au-panel { display: flex; align-items: center; justify-content: center; padding: 40px 34px;
  background: var(--bg-card); }
@media (max-width: 900px) { .au-panel { padding: 26px 20px 40px; align-items: flex-start; } }
.au-shell { width: 100%; max-width: 384px; }
.au-card { width: 100%; background: transparent; padding: 0; position: relative; }

.au-head { margin-bottom: 20px; }
.au-head h1 { font-size: 25px; font-weight: 800; letter-spacing: -.022em; line-height: 1.12; margin: 0; }
.au-head p { font-size: 13.5px; color: var(--text-2); margin: 7px 0 0; line-height: 1.45; }

.au-seg { display: flex; gap: 4px; background: var(--bg-2); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.au-seg button { flex: 1; border: 0; border-radius: 9px; padding: 10px 6px; font-family: inherit; font-size: 14px;
  font-weight: 800; color: var(--text-2); background: none; cursor: pointer; transition: background .18s ease, color .18s ease; }
.au-seg button.on { background: var(--bg-card); color: var(--accent); box-shadow: var(--el-1); }

.au-form { display: flex; flex-direction: column; }
.au-f { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.au-l { font-size: 12.5px; font-weight: 700; color: var(--text); letter-spacing: -.005em; display: flex; align-items: center; gap: 6px; }
.au-l svg { width: 14px; height: 14px; color: var(--accent); }
.au-i { width: 100%; height: 48px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg-card);
  padding: 0 14px; font-family: inherit; font-size: 15px; color: var(--text); transition: border-color .16s ease, box-shadow .16s ease; }
.au-i::placeholder { color: var(--text-3); }
.au-i:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }
.au-f.err .au-i { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-bg); }
.au-hint { font-size: 11.5px; color: var(--text-3); }
.au-pw { position: relative; }
.au-pw .au-i { padding-right: 74px; }
.au-pw-t { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: var(--bg-2);
  color: var(--text-2); font-family: inherit; font-size: 12px; font-weight: 800; padding: 7px 11px; border-radius: 8px; cursor: pointer; }
.au-pw-t:active { transform: translateY(-50%) scale(.95); }
.au-forgot { align-self: flex-end; font-size: 12.5px; font-weight: 700; color: var(--accent); text-decoration: none; margin: -4px 0 14px; }
.au-forgot:hover { text-decoration: underline; }

.au-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-2); line-height: 1.4; cursor: pointer; margin-bottom: 16px; }
.au-check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px;
  border: 1.5px solid var(--border); border-radius: 6px; background: var(--bg-card); cursor: pointer; position: relative; transition: all .15s ease; }
.au-check input:checked { background: var(--accent); border-color: var(--accent); }
.au-check input:checked::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.au-check a { color: var(--accent); font-weight: 700; }

.au-alert { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.45; border-radius: 12px;
  padding: 12px 13px; margin-bottom: 16px; font-weight: 600; }
.au-alert svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.au-alert.red { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px #F4CDC7; }
.au-alert.ok { background: var(--accent-light); color: var(--accent); box-shadow: inset 0 0 0 1px #CDE8DA; }

.au-sub { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 52px; border: 0;
  border-radius: 13px; background: var(--accent); color: #fff; font-family: inherit; font-size: 15.5px; font-weight: 800;
  cursor: pointer; box-shadow: var(--el-2); transition: background .18s ease, transform .1s ease; }
.au-sub:hover { background: var(--accent-hover); }
.au-sub:active { transform: scale(.985); }
.au-sub svg { width: 19px; height: 19px; }
.au-sub[disabled] { opacity: .85; cursor: default; }
.au-spin { width: 19px; height: 19px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%;
  animation: auSpin .7s linear infinite; display: none; }
.au-sub.loading .au-sub-lbl, .au-sub.loading .au-sub-arrow { display: none; }
.au-sub.loading .au-spin { display: block; }
@keyframes auSpin { to { transform: rotate(360deg); } }

/* CTA principale: freccia annidata in un cerchio, allineata a destra */
.au-cta { justify-content: space-between; padding: 0 8px 0 22px; box-shadow: 0 14px 30px -14px rgba(15,110,86,.55); }
.au-cta .au-sub-arrow { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.16);
  display: grid; place-items: center; transition: transform .5s cubic-bezier(.32,.72,0,1); }
.au-cta .au-sub-arrow svg { width: 17px; height: 17px; }
.au-cta:hover .au-sub-arrow { transform: translateX(3px); }
.au-cta.loading { justify-content: center; }

.au-trust { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 12px; color: var(--text-3); }
.au-trust svg { width: 15px; height: 15px; color: var(--accent); }

/* stato: email inviata */
.au-sent { text-align: center; }
.au-sent-ic { width: 66px; height: 66px; margin: 6px auto 18px; border-radius: 20px; background: var(--accent-light);
  color: var(--accent); display: grid; place-items: center; }
.au-sent-ic svg { width: 32px; height: 32px; }
.au-sent h1 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.au-sent p { font-size: 14px; color: var(--text-2); line-height: 1.55; margin: 10px 4px 0; }
.au-sent p b { color: var(--text); font-weight: 700; }
.au-sent .au-sub { margin-top: 22px; }
.au-sent-alt { margin-top: 14px; font-size: 13px; color: var(--text-3); }
.au-sent-alt a { color: var(--accent); font-weight: 700; text-decoration: none; cursor: pointer; }

.au-i:focus-visible, .au-seg button:focus-visible, .au-sub:focus-visible, .au-pw-t:focus-visible, .au-forgot:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .au-spin { animation: none; } }

/* ============================================================
   CANCELLO E BENVENUTO — token della LANDING, non dell'app
   ============================================================
   Regola di forma dichiarata: le superfici che VENDONO (email
   post-acquisto, cancello, benvenuto) parlano il linguaggio della
   landing Shopify; quelle che SONO il prodotto (registrazione,
   dashboard, scheda casa) parlano quello dell'app. Il passaggio di
   consegne avviene quando l'accesso e' attivo.
   Non e' un'incoerenza: e' un confine. Chi tocca queste classi
   pensando di "riallinearle" ai 12px dell'app rompe la continuita'
   con la pagina da cui l'utente arriva.
   I valori sono copiati da shopify-theme/sections/tracciacasa-landing.liquid
   e vanno tenuti uguali a quelli: petrolio piu' profondo del brand
   dell'app, interattivi a pillola, card a 18px, testo base 17px.
   ============================================================ */
.lp {
  --paper:#FFFFFF; --paper-2:#F3F8F5; --wash:#E9F1EC;
  --night:#0A342C; --night-2:#06211B;
  --lp-ink:#0A1C16; --lp-ink-2:#3E524B; --lp-ink-3:#556A62;
  --jade:#0F6E56; --jade-deep:#0B5844; --mint:#48C39B; --mint-bright:#78E6C1;
  --on:#EAF6F0; --on-dim:#A8CCBF; --on-line:rgba(233,245,239,.16);
  --lp-line:#DCE7E1;
  --r-card:18px; --r-media:14px; --r-pill:999px;
  --e2:0 2px 6px rgba(6,33,27,.08), 0 28px 56px -24px rgba(6,33,27,.30);
  --lp-ease:cubic-bezier(.16,1,.3,1);
  color: var(--lp-ink); font-size: 17px; line-height: 1.6;
  font-feature-settings: 'ss01','cv05';
}
/* L'impaginazione della schermata sta su main.lp e non su .lp: .lp e' il blocco
   di token, e i mockup lo riusano su contenitori che NON sono la pagina intera.
   Mettere qui display:flex e min-height:100dvh li spaccherebbe. */
main.lp {
  display: flex; align-items: flex-start; justify-content: center;
  min-height: 100dvh; padding: 28px 16px 48px;
}
/* ⚠️ Il reset sta dentro :where() di proposito, per avere punteggio ZERO.
   Con `.lp p, .lp ul, .lp li` valeva (0,1,1) e batteva OGNI regola .tc- a classe
   singola: erano morti i margini di tc-gate-lead, tc-anchor, tc-incl, tc-honest,
   tc-match, tc-or, tc-amount, tc-forever. La landing usa `.tc-lp *`, che a pari
   punteggio (0,1,0) funziona solo perché le sue regole sono scritte dopo. Qui non
   voglio dipendere dall'ordine delle righe: a punteggio zero vince chiunque. */
:where(.lp) :where(h1, h2) { letter-spacing: -.022em; line-height: 1.1; font-weight: 800; text-wrap: balance; margin: 0; }
:where(.lp) :where(p, ul, li) { margin: 0; padding: 0; }
:where(.lp) :where(ul) { list-style: none; }
.lp img { max-width: 100%; display: block; height: auto; }

/* pulsanti a pillola */
.tc-btn { display:inline-flex; align-items:center; justify-content:center; gap:9px; white-space:nowrap;
  font-family:inherit; font-weight:700; font-size:16px; letter-spacing:-.01em; line-height:1.2;
  padding:16px 26px; border-radius:var(--r-pill); border:1px solid transparent;
  text-decoration:none; cursor:pointer;
  transition:transform .18s var(--lp-ease), box-shadow .18s var(--lp-ease), background .18s var(--lp-ease); }
.tc-btn--jade { background:var(--jade); color:#fff; box-shadow:0 10px 26px -14px rgba(11,88,68,.9); }
.tc-btn--jade:hover:not(:disabled) { background:var(--jade-deep); color:#fff; transform:translateY(-2px); }
.tc-btn--jade:active:not(:disabled) { transform:translateY(0) scale(.985); }
.tc-btn--mint { background:var(--mint); color:#06211B;
  box-shadow:0 1px 0 rgba(255,255,255,.35) inset, 0 10px 26px -12px rgba(11,88,68,.7); }
.tc-btn--mint:hover { background:var(--mint-bright); color:#06211B; transform:translateY(-2px); }
.tc-btn--mint:active { transform:translateY(0) scale(.985); }
.tc-btn--lg { padding:18px 32px; font-size:17px; }
.tc-btn:disabled { opacity:.6; cursor:not-allowed; }
.tc-ico { width:1em; height:1em; flex:none; stroke:currentColor; fill:none; stroke-width:2;
  stroke-linecap:round; stroke-linejoin:round; }
.lp :focus-visible { outline:3px solid var(--jade); outline-offset:3px; }

/* la card del cancello */
.tc-gate { width:100%; max-width:480px; background:var(--paper); border:1px solid var(--lp-line);
  border-radius:var(--r-card); overflow:hidden; box-shadow:var(--e2); }
.tc-gate-top { background:linear-gradient(180deg,var(--night),var(--night-2));
  padding:18px 24px; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.tc-gate-top img { height:24px; width:auto; }
.tc-gate-top span { font-size:10.5px; font-weight:700; letter-spacing:.15em; text-transform:uppercase;
  color:var(--mint); }
.tc-gate-in { padding:26px 24px 22px; }
.tc-gate-in > h1 { font-size:27px; }
.tc-gate-lead { font-size:15.5px; color:var(--lp-ink-2); line-height:1.55; margin-top:9px; }

/* ancoraggio dei costi: le cifre della landing, impilate */
.tc-anchor { display:flex; flex-direction:column; gap:7px; margin-top:22px; list-style:none; }
.tc-anchor li { font-size:14px; color:var(--lp-ink-2); background:var(--paper-2);
  border-radius:var(--r-media); padding:11px 15px; }
.tc-anchor li.tc-us { background:var(--jade); color:#fff; font-weight:700;
  box-shadow:0 8px 20px -12px rgba(11,88,68,.9); }

.tc-tag { font-size:12.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--lp-ink-3); }
/* flex con baseline e non vertical-align: sotto i 420px il pedice spezzava la frase
   a meta' ("una volta, non un" / "abbonamento" su due righe staccate) */
.tc-amount { font-size:52px; font-weight:800; letter-spacing:-.045em; color:var(--jade); line-height:1;
  margin-top:6px; display:flex; align-items:baseline; flex-wrap:wrap; gap:0 9px; }
.tc-amount sub { font-size:14px; font-weight:600; color:var(--lp-ink-3); letter-spacing:0;
  line-height:1.4; bottom:0; vertical-align:baseline; }
.tc-buy { margin-top:24px; padding-top:22px; border-top:1px solid var(--lp-line); }
.tc-incl { display:grid; gap:11px; margin:22px 0 24px; list-style:none; }
.tc-incl li { display:flex; gap:11px; align-items:flex-start; font-size:15px;
  color:var(--lp-ink-2); line-height:1.45; }
.tc-incl .tc-ico { color:var(--jade); width:18px; height:18px; margin-top:3px; }
.tc-gate .tc-btn { width:100%; }
.tc-honest { margin-top:14px; font-size:13.5px; color:var(--lp-ink-3); line-height:1.5; }
.tc-match { display:flex; align-items:flex-start; gap:9px; margin-top:16px; padding:13px 15px;
  background:var(--wash); border-radius:var(--r-media); font-size:13.5px;
  color:var(--jade-deep); line-height:1.5; }
.tc-match .tc-ico { width:16px; height:16px; margin-top:3px; color:var(--jade); }
.tc-match b { color:var(--lp-ink); }

.tc-or { display:flex; align-items:center; gap:12px; margin:24px 0 2px; font-size:11px;
  font-weight:700; letter-spacing:.13em; text-transform:uppercase; color:var(--lp-ink-3); }
.tc-or::before, .tc-or::after { content:""; height:1px; flex:1; background:var(--lp-line); }

/* vie di riserva: <details> nativo, zero JS per aprirle, tastiera compresa */
.tc-alt { border-top:1px solid var(--lp-line); }
.tc-alt > summary { list-style:none; cursor:pointer; display:flex; align-items:center;
  justify-content:space-between; gap:10px; padding:16px 2px;
  font-size:15px; font-weight:700; color:var(--lp-ink); }
.tc-alt > summary::-webkit-details-marker { display:none; }
.tc-alt > summary:hover { color:var(--jade); }
.tc-alt > summary .tc-ico { width:18px; height:18px; color:var(--lp-ink-3);
  transition:transform .18s var(--lp-ease); }
.tc-alt[open] > summary { color:var(--jade); }
.tc-alt[open] > summary .tc-ico { transform:rotate(180deg); color:var(--jade); }
.tc-drawer { padding:0 2px 20px; }
.tc-drawer p { font-size:14px; color:var(--lp-ink-3); line-height:1.55; margin-bottom:16px; }
.tc-drawer p a { color:var(--jade); font-weight:700; }
.tc-f { display:flex; flex-direction:column; gap:7px; }
.tc-f label { font-size:12.5px; font-weight:700; color:var(--lp-ink); }
.tc-f input { width:100%; height:48px; border:1px solid var(--lp-line); border-radius:var(--r-media);
  background:var(--paper); padding:0 14px; font-size:16px; color:var(--lp-ink); font-family:inherit; }
.tc-f input::placeholder { color:#93A79E; }
.tc-f input:focus { outline:0; border-color:var(--jade); box-shadow:0 0 0 4px var(--wash); }
.tc-f input.is-error { border-color:#B42318; box-shadow:0 0 0 4px #FEF3F2; }
/* Coppia di campi IMPILATA, non affiancata, e non e' pigrizia: la card e' larga
   al massimo 480px, quindi due colonne fanno 210px l'una e un'email lunga scorre
   mentre la scrivi. Su mobile sarebbero 160px. Il nome dice "coppia" e non "due
   colonne" proprio per non far pensare a un affiancamento che non ci sta. */
.tc-pair { display:flex; flex-direction:column; gap:14px; }
.tc-drawer .tc-btn { margin-top:16px; }
.tc-msg { margin-top:14px; padding:12px 15px; border-radius:var(--r-media); font-size:13.5px; line-height:1.5; }
.tc-msg--err { background:#FEF3F2; color:#B42318; }
.tc-exit { text-align:center; margin-top:8px; }
.tc-exit button { background:none; border:0; cursor:pointer; font-size:14px; font-weight:700;
  color:var(--jade); padding:12px; font-family:inherit; }

/* benvenuto: la chiusura della landing, riusata come prima schermata dopo il pagamento */
.tc-done { width:100%; max-width:480px; border-radius:var(--r-card); overflow:hidden; box-shadow:var(--e2);
  background:radial-gradient(80% 90% at 50% 0%, rgba(72,195,155,.17), transparent 62%),
             linear-gradient(180deg,var(--night),var(--night-2));
  color:var(--on); text-align:center; padding:34px 26px 30px; }
.tc-done-mark { width:60px; height:60px; margin:0 auto 20px; border-radius:20px;
  background:rgba(233,245,239,.10); border:1px solid var(--on-line);
  display:grid; place-items:center; position:relative; }
.tc-done-mark .tc-ico { width:28px; height:28px; color:var(--mint); }
/* il quadrante del marchio: due lati dritti e un arco, una riga di CSS (DESIGN.md 1) */
.tc-done-mark::after { content:""; position:absolute; top:0; right:0; width:14px; height:14px;
  background:var(--mint); border-radius:0 100% 0 0; }
.tc-done h1 { color:#fff; font-size:28px; }
.tc-done > p { color:var(--on-dim); font-size:16px; line-height:1.55; margin:14px auto 26px; max-width:34ch; }
.tc-done .tc-btn { width:100%; }
.tc-forever { margin-top:16px; font-size:13.5px; color:var(--on-dim); line-height:1.5; }

@media (prefers-reduced-motion: reduce) {
  .tc-btn, .tc-alt > summary .tc-ico { transition: none; }
  .tc-btn--jade:hover:not(:disabled), .tc-btn--mint:hover { transform: none; }
}
