/* BacioVirtuale v1.0 — palette "ottanio & albicocca"
   --ink #16211F  --ottanio #0E6E66  --ottanio-scuro #0A4B46
   --albicocca #F2A65A  --carta #F6FAF8  --linea #DCE7E3 */

:root {
  --ink: #16211F;
  --ottanio: #0E6E66;
  --ottanio-scuro: #0A4B46;
  --albicocca: #F2A65A;
  --carta: #F6FAF8;
  --bianco: #FFFFFF;
  --linea: #DCE7E3;
  --muted: #5C6E69;
  --raggio: 14px;
  /* derivate semantiche (valori LIGHT; sovrascritte in dark mode più sotto) */
  --btn-text: #FFFFFF;
  --soft: #E6F2EE;          /* sfondi "miei": msg inviati, hover, match */
  --soft-border: #CBE5DD;
  --err-bg: #FCEBE8;  --err-border: #F2C4BB;
  --ok-bg: #E7F4EC;   --ok-border: #BFE4CC;
  --gold-bg: #FBF1D9; --gold-border: #ECD9A6; --gold-text: #8A6A1C;
  --poll-bar: #D9ECE6;
  --danger: #C9543C;  --danger-dark: #A8412C;
  /* rosso fisso (uguale in chiaro/scuro) per badge con testo bianco: contrasto ~5.9:1 (WCAG AA) */
  --soon-bg: #A8412C;
  --online: #2EBD6B;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--carta);
}
a { color: var(--ottanio); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; }
h1 { font-size: 1.9rem; font-weight: 800; margin: 0.6em 0 0.4em; }
h2 { font-size: 1.2rem; font-weight: 700; margin: 0 0 0.7em; }
.muted { color: var(--muted); font-size: 0.9em; }

/* ---- Topbar ---- */
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 10px 20px;
  background: var(--bianco);
  border-bottom: 1px solid var(--linea);
  position: sticky; top: 0; z-index: 50;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.25rem;
  color: var(--ink); display: flex; align-items: center; gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px;
  background: var(--ottanio); color: var(--btn-text);
  border-radius: 50% 50% 50% 6px; /* fumetto */
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.nav { display: flex; gap: 16px; flex: 1; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--ink); font-weight: 600; position: relative; padding: 4px 0; }
.nav a:hover { color: var(--ottanio); text-decoration: none; }
/* Menu "Scopri" — raccoglie le voci secondarie per non affollare la barra */
.nav-more { position: relative; }
.nav-more > summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; padding: 4px 0; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: ' ▾'; font-size: 0.7em; opacity: .7; }
.nav-more[open] > summary { color: var(--ottanio); }
.nav-more-panel { position: absolute; top: calc(100% + 10px); left: 0; background: var(--bianco); border: 1px solid var(--linea); border-radius: 14px; padding: 8px; box-shadow: 0 8px 24px rgba(22,33,31,.14); display: grid; grid-template-columns: repeat(2, minmax(148px, 1fr)); gap: 2px; z-index: 60; }
.nav-more-panel a { padding: 9px 12px; border-radius: 9px; white-space: nowrap; font-weight: 500; }
.nav-more-panel a:hover { background: var(--soft); text-decoration: none; }
.nav-more-panel a::after { content: none; }   /* niente sottolineatura animata di .nav a dentro il dropdown */
.topbar-user { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.link-quiet { color: var(--muted); font-size: 0.9em; }

.badge {
  background: var(--albicocca); color: #16211F;
  font-size: 0.72rem; font-weight: 700;
  border-radius: 99px; padding: 1px 7px;
  vertical-align: super;
}

/* ---- Layout ---- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 12px 20px 48px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }

.card {
  background: var(--bianco);
  border: 1px solid var(--linea);
  border-radius: var(--raggio);
  padding: 20px;
  margin-bottom: 20px;
}
.card-narrow { max-width: 560px; margin: 32px auto; }

.footer { text-align: center; color: var(--muted); padding: 24px; font-size: 0.85rem; }

/* ---- Hero (landing) ---- */
.hero { max-width: 760px; margin: 48px auto; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--ottanio); }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 560px; margin: 0 auto 24px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; }
.hero-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.hero-feats div { background: var(--bianco); border: 1px solid var(--linea); border-radius: var(--raggio); padding: 16px; }
.hero-feats strong { display: block; font-family: var(--font-display); margin-bottom: 4px; }
.hero-feats span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 680px) { .hero-feats { grid-template-columns: 1fr; } }

/* ---- Form ---- */
label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 0.92rem; }
input, select, textarea {
  display: block; width: 100%;
  margin-top: 4px; padding: 9px 12px;
  font: inherit; color: inherit;
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: 10px;
}
/* la regola sopra (display:block) annullerebbe l'attributo hidden: ripristinalo
   (altrimenti gli input file "nascosti" tipo il composer storie mostrano "Scegli file") */
input[hidden], select[hidden], textarea[hidden] { display: none; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--ottanio); outline-offset: 1px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

.btn {
  display: inline-block;
  background: var(--ottanio); color: var(--btn-text);
  border: 1px solid var(--ottanio);
  border-radius: 99px;
  padding: 8px 18px;
  font: inherit; font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--ottanio-scuro); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-ghost { background: transparent; color: var(--ottanio); }
.btn-ghost:hover { background: var(--soft); }
.btn-big { padding: 12px 28px; font-size: 1.05rem; }
.btn-sm { padding: 5px 13px; font-size: 0.85rem; }

.alert { background: var(--err-bg); border: 1px solid var(--err-border); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.alert-ok { background: var(--ok-bg); border-color: var(--ok-border); }

/* ---- Chips interessi ---- */
.chips { border: 1px solid var(--linea); border-radius: var(--raggio); padding: 12px 14px; margin: 0 0 16px; }
.chips legend { font-weight: 700; font-size: 0.9rem; padding: 0 6px; }
.chip { display: inline-block; margin: 3px 2px; }
.chip input { display: none; }
.chip span {
  display: inline-block; padding: 5px 13px;
  border: 1px solid var(--linea); border-radius: 99px;
  background: var(--carta); cursor: pointer; font-weight: 500; font-size: 0.88rem;
}
.chip input:checked + span { background: var(--ottanio); border-color: var(--ottanio); color: var(--btn-text); }
.chip-inline { font-weight: 500; }
.chips-static { margin-top: 6px; }
.chip-static {
  display: inline-block; padding: 4px 12px; margin: 2px;
  border: 1px solid var(--linea); border-radius: 99px;
  background: var(--bianco); font-size: 0.85rem; color: var(--ink);
}
.chip-active { background: var(--ottanio); border-color: var(--ottanio); color: var(--btn-text); }
a.chip-static:hover { text-decoration: none; border-color: var(--ottanio); }

/* ---- Avatar ---- */
.avatar {
  --ac: var(--ottanio);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ac); color: #fff;
  border-radius: 50%; font-weight: 700;
  flex-shrink: 0; user-select: none;
}
.avatar-group { width: 40px; height: 40px; font-size: 17px; background: var(--albicocca); color: #16211F; }
.dot-on {
  position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--online); border: 2px solid var(--bianco);
}

/* ---- Persone ---- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters input, .filters select { width: auto; margin-top: 0; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 12px; }
.people-grid-lg { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.person-card {
  background: var(--bianco); border: 1px solid var(--linea); border-radius: var(--raggio);
  padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center; color: var(--ink);
}
.person-card:hover { text-decoration: none; border-color: var(--ottanio); }
.person-card-top { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); }
.person-card-top:hover { text-decoration: none; }
.match { color: var(--ottanio-scuro); background: var(--soft); border-radius: 99px; padding: 2px 10px; font-size: 0.78rem; font-weight: 700; }
.match-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.match-chip { background: var(--soft); color: var(--ottanio-scuro); border-radius: 99px; padding: 2px 9px; font-size: 0.74rem; font-weight: 600; }
.match-more { opacity: 0.7; }

/* People: CTA roulette, chip filtri attivi, card arricchite, paginazione */
.roulette-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.filter-active { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.fchip { display: inline-flex; align-items: center; gap: 7px; background: var(--soft); border: 1px solid var(--linea); border-radius: 99px; padding: 3px 11px; font-size: 0.82rem; color: var(--ink); text-decoration: none; }
.fchip:hover { border-color: var(--ottanio); text-decoration: none; }
.fchip span { color: var(--muted); font-weight: 700; }
.fchip-reset { background: transparent; color: var(--muted); }
.people-count { margin: 0 0 12px; font-size: 0.88rem; }
.person-badges { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 3px 0 1px; }
.pbadge { font-size: 1rem; line-height: 1; }
.tag-new { background: var(--ottanio); color: var(--btn-text); border-radius: 99px; padding: 1px 9px; font-size: 0.72rem; font-weight: 700; }
.tag-bday { background: var(--gold-bg); border: 1px solid var(--gold-border); color: var(--ink); border-radius: 99px; padding: 1px 9px; font-size: 0.72rem; font-weight: 700; }
.person-bio { color: var(--muted); font-size: 0.86rem; line-height: 1.4; margin: 4px 0 2px; }
.mutual { color: var(--ottanio-scuro); font-size: 0.8rem; font-weight: 600; }
.pagenav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 24px; }

/* Profilo: statistiche, interessi in comune, completezza */
.profile-stats { display: flex; flex-wrap: wrap; gap: 18px; margin: 10px 0 6px; }
.pstat { color: var(--muted); font-size: 0.9rem; }
.pstat b { color: var(--ink); font-weight: 800; font-size: 1.05rem; }
.chip-static.chip-common { background: var(--ottanio); border-color: var(--ottanio); color: var(--btn-text); }
.profile-common { font-size: 0.85rem; margin: 4px 0 0; color: var(--ottanio-scuro); font-weight: 600; }
.compl-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.compl-list li { font-size: 0.92rem; }
.compl-list li.done { color: var(--ottanio-scuro); }
.act-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.act-list li { font-size: 0.92rem; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.share-row input { flex: 1; min-width: 220px; }
.person-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.tag { font-size: 0.8rem; color: var(--muted); padding: 4px 10px; border: 1px dashed var(--linea); border-radius: 99px; }
.tag-ok { color: var(--ottanio-scuro); border-color: var(--ottanio); border-style: solid; }

.people-row { display: flex; flex-direction: column; gap: 8px; }
.person-mini { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.person-mini:last-child { border-bottom: 0; }
.person-mini-info { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
/* Inviti amici a un evento */
.ev-amici-vanno { background: var(--soft); border-radius: 10px; padding: 8px 12px; font-size: 0.9rem; margin: 0 0 12px; }
.invita-amici { margin-top: 16px; }
.invita-amici > summary { cursor: pointer; font-weight: 600; color: var(--ottanio); }
.invita-list { margin-top: 8px; max-height: 340px; overflow-y: auto; }

/* Galleria foto del profilo */
.galleria { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 6px; }
.galleria-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--soft); }
.galleria-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.galleria-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 0.78rem; line-height: 24px; }
.galleria-add { aspect-ratio: 1; border: 2px dashed var(--linea); border-radius: 10px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; color: var(--muted); }
.galleria-add span { display: flex; flex-direction: column; align-items: center; font-size: 1.5rem; line-height: 1.1; }
.galleria-add small { font-size: 0.62rem; }
.galleria-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(10,16,14,.95); display: flex; align-items: center; justify-content: center; }
.galleria-full { max-width: 90vw; max-height: 86vh; border-radius: 12px; }
.galleria-close { position: absolute; top: 14px; right: 18px; background: none; border: 0; color: #fff; font-size: 1.9rem; cursor: pointer; line-height: 1; }
.galleria-nav { background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; padding: 0 12px; opacity: .8; }
.galleria-nav:hover { opacity: 1; }

/* Hangout — bacheca proposte d'incontro */
.hangout-crea > summary { cursor: pointer; font-weight: 700; font-family: var(--font-display); }
.hangout-list { display: flex; flex-direction: column; gap: 14px; }
.hangout-card h2 { margin: 0 0 2px; font-size: 1.15rem; }
.hangout-head { display: flex; gap: 12px; align-items: flex-start; }
.hangout-meta { margin: 2px 0; }
.hangout-note { background: var(--soft); border-radius: 10px; padding: 8px 12px; margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.hangout-who { margin: 10px 0; font-size: 0.9rem; }
.hangout-avatars { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; margin-left: 6px; }
.hangout-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.hangout-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.hg-badge { font-size: 0.78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--ink); border: 1px solid var(--soft-border); }
.hg-badge.hg-soon { background: var(--soon-bg); color: #fff; border-color: var(--soon-bg); }
.hg-badge.hg-full { background: var(--soft-border); color: var(--muted); }
.hangout-bridge { background: linear-gradient(180deg, var(--soft), transparent); }
.hangout-safety { font-size: 0.85rem; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.hangout-refs { margin: 12px 0; padding-top: 8px; border-top: 1px solid var(--soft-border); }
.hangout-refs h3 { margin: 0 0 4px; }
.hangout-home-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hangout-home-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.hangout-home-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 10px; background: var(--soft); text-decoration: none; color: var(--ink); }
.hangout-home-item:hover { background: var(--soft-border); text-decoration: none; }
.hangout-home-item .muted { font-size: 0.82rem; }
.hangout-commenti { margin-top: 16px; border-top: 1px solid var(--linea); padding-top: 12px; }
.hangout-commenti h3 { margin: 0 0 10px; }
.hangout-commento-form { display: flex; gap: 8px; margin-top: 12px; }
.hangout-commento-form input { margin-top: 0; }

/* Mini-blog / bacheca */
.post-composer textarea { resize: vertical; }
.post-composer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.post-foto-btn { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--ottanio); font-weight: 600; width: auto; }
.post-composer-row select { width: auto; margin: 0; }
.post-composer-row .btn { margin-left: auto; }
.feed { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.post { background: var(--bianco); border: 1px solid var(--linea); border-radius: 14px; padding: 14px 16px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head-info { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.post-head-info .muted { font-size: 0.78rem; }
.post-del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 0.95rem; width: auto; padding: 4px; }
.post .post-body { margin: 10px 0; }
.post-img-wrap { display: block; margin: 10px 0; }
.post-img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 12px; display: block; }
.post-commenti { margin-top: 10px; border-top: 1px solid var(--linea); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.post-commento { display: flex; gap: 8px; align-items: flex-start; }
.post-commento-b { background: var(--soft); border-radius: 12px; padding: 6px 12px; font-size: 0.9rem; overflow-wrap: anywhere; }
.post-commento-t { font-size: 0.72rem; margin-left: 4px; }
.post-com-del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 0.7rem; padding: 0 4px; width: auto; }
.post-commento-form { display: flex; gap: 8px; margin-top: 4px; }
.post-commento-form input { margin: 0; }
.post-poll-add > summary { cursor: pointer; color: var(--ottanio); font-weight: 600; margin-top: 8px; }
.post-poll-add input { margin-top: 6px; }
.post-poll { margin: 10px 0; }

/* Prompt di profilo */
.prompt-list { display: flex; flex-direction: column; gap: 10px; }
.prompt-item { background: var(--soft); border-radius: 12px; padding: 10px 14px; }
.prompt-q { display: block; font-size: 0.78rem; color: var(--muted); }
.prompt-a { font-weight: 600; overflow-wrap: anywhere; }
.prompt-edit > summary { cursor: pointer; color: var(--ottanio); font-weight: 600; margin-top: 12px; }
/* Referenze */
.referenza { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.referenza:last-of-type { border-bottom: 0; }
.referenza-b p { margin: 4px 0; overflow-wrap: anywhere; }
.referenza-form { margin-top: 12px; }

/* Gruppi / community */
.gruppi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gruppo-card { display: flex; flex-direction: column; background: var(--bianco); border: 1px solid var(--linea); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); }
.gruppo-card:hover { border-color: var(--ottanio); text-decoration: none; }
.gruppo-img { height: 110px; background: var(--soft); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; }
.gruppo-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.gruppo-body .muted { font-size: 0.8rem; }
.gruppo-banner { height: 160px; background-size: cover; background-position: center; border-radius: 12px; margin-bottom: 6px; }
.gruppo-membri { display: flex; flex-wrap: wrap; gap: 6px; }

/* Regali virtuali */
.regalo-picker { display: inline-block; position: relative; }
.regalo-picker > summary { list-style: none; }
.regalo-picker > summary::-webkit-details-marker { display: none; }
.regalo-opts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-width: 240px; background: var(--bianco); border: 1px solid var(--linea); border-radius: 12px; padding: 8px; box-shadow: 0 6px 18px rgba(22,33,31,.14); position: absolute; z-index: 5; }
.regalo-opts button { font-size: 1.5rem; background: none; border: 0; cursor: pointer; width: auto; padding: 4px; border-radius: 8px; line-height: 1; }
.regalo-opts button:hover { background: var(--soft); }
.regali-ricevuti { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.regalo-badge { background: var(--soft); border-radius: 99px; padding: 2px 9px; font-size: 1.1rem; }
.regalo-badge small { font-size: 0.7rem; color: var(--muted); margin-left: 2px; }

/* Banner: CTA annuncio, slot sponsor, cover profilo */
.annuncio-cta { font-weight: 700; color: var(--ottanio); white-space: nowrap; }
.sponsor-slot { margin: 26px auto 0; max-width: 728px; text-align: center; }
.sponsor-label { display: block; font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.sponsor-slot img { max-width: 100%; border-radius: 10px; display: block; margin: 0 auto; }
.profile-cover { width: 100%; height: 160px; background-size: cover; background-position: center; border-radius: 12px; }
.profile-head.has-cover { flex-wrap: wrap; }

.profile-head { display: flex; gap: 20px; align-items: flex-start; }
@media (max-width: 560px) { .profile-head { flex-direction: column; align-items: center; text-align: center; } }

/* ---- Forum ---- */
.thread-row { padding: 10px 0; border-bottom: 1px solid var(--linea); display: flex; flex-direction: column; }
.thread-row:last-child { border-bottom: 0; }
.post { padding: 16px 20px; }
.post-author { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.pager { display: flex; gap: 6px; margin: 12px 0 20px; }
.pager a { padding: 4px 11px; border: 1px solid var(--linea); border-radius: 8px; }
.pager a.active { background: var(--ottanio); color: var(--btn-text); border-color: var(--ottanio); }

/* ---- Chat ---- */
.chat-layout {
  display: grid; grid-template-columns: 300px 1fr; gap: 16px;
  height: calc(100vh - 150px); min-height: 420px; margin-top: 14px;
}
.chat-list { background: var(--bianco); border: 1px solid var(--linea); border-radius: var(--raggio); padding: 14px; overflow-y: auto; }
.chat-list > h1 { margin: 2px 0 14px; font-size: 1.15rem; }
.chat-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--ink); }
.chat-item:hover, .chat-item.active { background: var(--carta); text-decoration: none; }
.chat-item .avatar, .chat-item .avatar-group { width: 38px; height: 38px; font-size: 16px; flex: 0 0 38px; }
.chat-item-info { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.chat-item-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-info .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-panel { background: var(--bianco); border: 1px solid var(--linea); border-radius: var(--raggio); display: flex; flex-direction: column; overflow: hidden; }
#chat { display: flex; flex-direction: column; height: 100%; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.chat-day { align-self: center; font-size: 0.75rem; color: var(--muted); background: var(--carta); border-radius: 99px; padding: 2px 12px; margin: 8px 0 4px; }
.msg {
  max-width: 72%; align-self: flex-start;
  background: var(--carta); border: 1px solid var(--linea);
  border-radius: 14px 14px 14px 4px;
  padding: 7px 12px; display: flex; flex-direction: column;
}
.msg.mine { align-self: flex-end; background: var(--soft); border-color: var(--soft-border); border-radius: 14px 14px 4px 14px; }
.msg-author { font-size: 0.78rem; font-weight: 700; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-time { font-size: 0.7rem; color: var(--muted); align-self: flex-end; }
.chat-form { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--linea); }
.chat-form input { flex: 1; margin: 0; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); }

@media (max-width: 760px) {
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 220px; }
  .chat-panel { height: 60vh; }
  /* con una chat aperta: vista a tutto schermo, nascondo la bottom-nav (stile app) */
  body:has(#chat) .bottom-nav { display: none; }
  body:has(#chat) { padding-bottom: 0; }
  body:has(#chat) .chat-list { max-height: 30vh; }
  body:has(#chat) .chat-panel { height: 64vh; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .chip span, .person-card { transition: background 0.15s, border-color 0.15s; }
}

/* ---- v1.1: moderazione, emoji, foto ---- */
.avatar-img { overflow: hidden; background: var(--linea); }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-dark); }
.card-danger { border-color: var(--err-border); }

.btn-flag {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1rem; padding: 4px 8px; border-radius: 8px;
}
.btn-flag:hover { background: var(--err-bg); color: var(--danger-dark); }

.report-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--linea);
  flex-wrap: wrap;
}
.report-row:last-child { border-bottom: 0; }
.report-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.report-actions form { display: inline; }

.btn-emoji { padding: 8px 10px; }
.emoji-panel {
  position: absolute; bottom: 56px; right: 8px;
  background: var(--bianco); border: 1px solid var(--linea);
  border-radius: var(--raggio); padding: 8px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px;
  box-shadow: 0 8px 24px rgba(22,33,31,0.12); z-index: 20;
}
.emoji-panel button {
  background: none; border: none; font-size: 1.05rem; line-height: 1;
  padding: 5px; cursor: pointer; border-radius: 8px;
}
.emoji-panel button:hover { background: var(--carta); }

/* ---- v1.2: domanda del giorno, eventi, reazioni, sondaggi ---- */
.daily-card { border-left: 4px solid var(--albicocca); }
.daily-eyebrow { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.daily-q { margin: 6px 0 12px; font-size: 1.35rem; }
.daily-input { display: flex; gap: 8px; }
.daily-input input { margin-top: 0; flex: 1; }
.daily-answers { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.daily-answer { display: flex; gap: 10px; align-items: flex-start; }
.daily-answer p { margin: 2px 0 4px; }

.roulette-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.roulette-card h2 { margin-bottom: 4px; }

.event-card { display: flex; gap: 18px; }
.event-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--carta); border: 1px solid var(--linea); border-radius: var(--raggio);
  min-width: 76px; padding: 10px; height: fit-content;
}
.event-day { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; line-height: 1; }
.event-month { text-transform: uppercase; font-size: 0.78rem; font-weight: 700; color: var(--ottanio); }
.event-time { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.event-body { flex: 1; }
.event-body h2 { margin-bottom: 2px; }
.event-rsvp { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 560px) { .event-card { flex-direction: column; } .event-date { flex-direction: row; gap: 8px; min-width: 0; } }

.reactions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 4px; position: relative; }
.reaction {
  background: var(--carta); border: 1px solid var(--linea); border-radius: 99px;
  padding: 1px 9px; font-size: 0.82rem; cursor: pointer;
}
.reaction.mine { background: var(--soft); border-color: var(--ottanio); }
.reaction-add { color: var(--muted); font-weight: 700; }
.react-picker {
  position: absolute; bottom: 26px; left: 0; z-index: 30;
  background: var(--bianco); border: 1px solid var(--linea); border-radius: 99px;
  padding: 4px 8px; box-shadow: 0 6px 18px rgba(22,33,31,0.14);
  display: flex; gap: 2px;
}
.react-picker button { background: none; border: none; font-size: 1.15rem; cursor: pointer; padding: 2px 4px; border-radius: 8px; }
.react-picker button:hover { background: var(--carta); }
.msg .reactions { margin-top: 2px; }
.msg-img { max-width: 100%; max-height: 280px; border-radius: 10px; display: block; margin: 2px 0; }
/* Icone della barra di scrittura: pulsanti coerenti e discreti */
.btn-img, .btn-vocale { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; flex-shrink: 0; border: 1px solid var(--linea); border-radius: 10px; background: var(--bianco); color: var(--ink); font-size: 1.15rem; line-height: 1; cursor: pointer; }
.btn-img:hover, .btn-vocale:hover { background: var(--carta); border-color: var(--ottanio); }
.chat-typing { min-height: 18px; padding: 0 16px 4px; font-size: 0.8rem; font-style: italic; }

.poll { display: flex; flex-direction: column; gap: 6px; }
.poll-opt {
  position: relative; overflow: hidden; text-align: left;
  background: var(--carta); border: 1px solid var(--linea); border-radius: 10px;
  padding: 8px 12px; cursor: pointer; font: inherit;
  display: flex; justify-content: space-between; gap: 8px;
}
.poll-opt.mine { border-color: var(--ottanio); }
.poll-opt:disabled { cursor: default; opacity: 0.8; }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: var(--poll-bar); z-index: 0; transition: width 0.3s; }
.poll-label, .poll-pct { position: relative; z-index: 1; }
.poll-pct { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.chat-poll-area { padding: 10px 14px; border-bottom: 1px solid var(--linea); display: flex; flex-direction: column; gap: 8px; }
.chat-poll-area .btn { align-self: flex-start; }
#poll-form { display: flex; flex-direction: column; gap: 6px; }
#poll-form input { margin-top: 0; }
.poll-details { margin-bottom: 14px; }
.poll-details summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

.badges { margin: 6px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.user-badge {
  font-size: 0.8rem; background: var(--gold-bg); border: 1px solid var(--gold-border);
  border-radius: 99px; padding: 3px 11px;
}

.premium-teaser { position: relative; overflow: hidden; }
.premium-blur { filter: blur(5px); pointer-events: none; user-select: none; }
.premium-msg {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  background: color-mix(in srgb, var(--carta) 80%, transparent); padding: 20px;
}
.premium-msg h2 { margin-bottom: 4px; }

/* ---- v1.3: Premium pack ---- */
.flair {
  font-size: 0.7em; font-weight: 600; color: var(--ottanio-scuro);
  background: linear-gradient(90deg, var(--soft), var(--gold-bg));
  border-radius: 99px; padding: 2px 12px; vertical-align: middle; white-space: nowrap;
}
.super-tag {
  font-size: 0.72rem; font-weight: 700; color: var(--gold-text);
  background: var(--gold-bg); border: 1px solid var(--gold-border); border-radius: 99px; padding: 1px 8px;
}
.super-msg { font-style: italic; color: var(--ottanio-scuro); font-size: 0.9rem; }
.event-featured { border-color: var(--albicocca); border-width: 2px; position: relative; }
.event-star { position: absolute; top: -12px; right: 14px; font-size: 1.3rem; }
.premium-hero { text-align: center; margin: 24px 0; }
.premium-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }
.premium-grid .card { margin-bottom: 0; }

/* honeypot: invisibile agli umani, visibile ai bot */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pricing { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 12px 0; align-items: flex-end; }
.pricing-save { background: var(--albicocca); color: #16211F; font-size: 0.72rem; border-radius: 99px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.pricing-best { display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; padding: 14px 10px 6px; border: 2px solid var(--ottanio); border-radius: 14px; background: var(--soft); }
.pricing-tag { position: absolute; top: -11px; background: var(--ottanio); color: var(--btn-text); font-size: 0.7rem; font-weight: 700; border-radius: 99px; padding: 2px 10px; }
.pricing-permese { font-size: 0.75rem; color: var(--ottanio-scuro); font-weight: 600; }

/* Premium: social proof, FOMO, comparativa, trust, regalo, FAQ, perk */
.social-proof { margin: 8px 0 0; font-size: 0.92rem; }
.fomo-card { display: flex; align-items: center; gap: 16px; border-left: 4px solid var(--ottanio); }
.fomo-num { font-size: 2.4rem; font-weight: 800; color: var(--ottanio); line-height: 1; min-width: 48px; text-align: center; }
table.compare { width: 100%; border-collapse: collapse; }
table.compare th, table.compare td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--linea); font-size: 0.92rem; }
table.compare thead th { font-size: 0.8rem; color: var(--muted); }
table.compare thead th:last-child { color: var(--ottanio-scuro); }
table.compare td.yes { color: var(--ottanio-scuro); font-weight: 600; }
table.compare tbody tr:last-child td { border-bottom: 0; }
.trust-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 10px; font-size: 0.82rem; color: var(--muted); }
.gift-form label { display: block; margin-bottom: 10px; }
.gift-form .pricing { justify-content: flex-start; }
.perk-links { display: flex; flex-wrap: wrap; gap: 8px; }
.faq-item { border-bottom: 1px solid var(--linea); padding: 8px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin: 8px 0 2px; color: var(--muted); font-size: 0.92rem; }

/* ==== Landing v2: il «ciao» che accade sullo schermo ==== */
.landing { overflow-x: clip; }

.hero2 {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px;
  align-items: center; max-width: 1020px; margin: 40px auto 24px; padding: 0 4px;
}
.hero2-text h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 800;
  letter-spacing: -0.02em; margin: 0 0 14px;
}
.hero2-text h1 em { font-style: normal; color: var(--ottanio); position: relative; white-space: nowrap; }
.hero2-text h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 0.34em;
  background: color-mix(in srgb, var(--albicocca) 45%, transparent);
  z-index: -1; border-radius: 3px;
  transform: scaleX(0); transform-origin: left;
  animation: sottolinea 0.5s 1.4s ease-out forwards;
}
@keyframes sottolinea { to { transform: scaleX(1); } }
.hero2-text > p { font-size: 1.12rem; color: var(--muted); max-width: 30em; }
.hero2-note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }
.hero2 .hero-cta { justify-content: flex-start; margin-bottom: 0; }

/* --- la chat demo: firma della pagina --- */
.hero2-demo { display: flex; justify-content: center; }
.demo-card {
  width: min(340px, 100%);
  background: var(--bianco); border: 1px solid var(--linea); border-radius: 22px;
  box-shadow: 0 18px 50px -18px rgba(10, 75, 70, 0.28);
  padding: 14px 14px 18px;
  transform: rotate(1.5deg);
}
.demo-head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 12px; border-bottom: 1px solid var(--linea); }
.demo-head div { display: flex; flex-direction: column; line-height: 1.2; }
.demo-match { font-size: 0.72rem; color: var(--ottanio-scuro); font-weight: 700; }
.demo-chat { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; min-height: 252px; }
.demo-msg {
  max-width: 82%; padding: 8px 13px; font-size: 0.92rem; line-height: 1.4;
  background: var(--carta); border: 1px solid var(--linea);
  border-radius: 15px 15px 15px 4px; align-self: flex-start;
  opacity: 0; transform: translateY(10px) scale(0.96);
  animation: bolla 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
}
.demo-msg.mine { background: var(--soft); border-color: var(--soft-border); border-radius: 15px 15px 4px 15px; align-self: flex-end; }
.demo-typing {
  align-self: flex-end; display: flex; gap: 4px; padding: 10px 14px;
  background: var(--soft); border: 1px solid var(--soft-border); border-radius: 15px 15px 4px 15px;
  opacity: 0; animation: bolla 0.3s forwards, scompari 0.3s forwards;
}
.demo-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ottanio);
  animation: puntini 1s infinite;
}
.demo-typing span:nth-child(2) { animation-delay: 0.15s; }
.demo-typing span:nth-child(3) { animation-delay: 0.3s; }
.demo-friend {
  align-self: center; font-size: 0.8rem; font-weight: 700; color: var(--ottanio-scuro);
  background: var(--gold-bg); border: 1px solid var(--gold-border); border-radius: 99px; padding: 5px 16px;
  opacity: 0; transform: scale(0.7);
  animation: festa 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4) forwards;
}
/* coreografia: una conversazione che si svolge in ~6 secondi */
.d1 { animation-delay: 0.5s; }
.d2 { animation-delay: 1.6s; }
.d3 { animation-delay: 2.8s; }
.d4 { animation-delay: 3.9s, 5.1s; }
.d5 { animation-delay: 5.2s; }
.d6 { animation-delay: 6.2s; }
@keyframes bolla { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes scompari { to { opacity: 0; height: 0; padding: 0; margin: -4px; border: 0; } }
@keyframes puntini { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
@keyframes festa { to { opacity: 1; transform: scale(1); } }

/* --- come funziona --- */
.steps { max-width: 1020px; margin: 56px auto; text-align: center; }
.steps h2 { font-size: 1.5rem; margin-bottom: 24px; }
.steps-row { display: flex; gap: 10px; align-items: stretch; justify-content: center; }
.step {
  flex: 1; max-width: 270px;
  background: var(--bianco); border: 1px solid var(--linea); border-radius: var(--raggio);
  padding: 22px 18px; display: flex; flex-direction: column; gap: 6px; text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}
.step:hover { transform: translateY(-3px); box-shadow: 0 10px 28px -14px rgba(10,75,70,0.25); }
.step-ico { font-size: 1.7rem; }
.step strong { font-family: var(--font-display); font-size: 1.05rem; }
.step span:last-child { color: var(--muted); font-size: 0.92rem; }
.step-arrow { align-self: center; color: var(--albicocca); font-size: 1.6rem; font-weight: 700; }

/* --- domanda del giorno in vetrina --- */
.landing-daily {
  max-width: 680px; margin: 48px auto; text-align: center;
  background: var(--bianco); border: 1px solid var(--linea);
  border-left: 4px solid var(--albicocca); border-radius: var(--raggio);
  padding: 28px 24px;
}
.landing-daily-q { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; margin: 8px 0 4px; }

/* --- CTA finale --- */
.landing-cta {
  text-align: center; margin: 64px auto 32px; padding: 44px 20px;
  background: linear-gradient(135deg, #0E6E66, #0A4B46);
  border-radius: 24px; max-width: 1020px; color: #fff;
}
.landing-cta h2 { color: #fff; font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 18px; }
.landing-cta .btn { background: #fff; color: var(--ottanio-scuro); border-color: #fff; }
.landing-cta .btn:hover { background: var(--carta); }

@media (max-width: 800px) {
  .hero2 { grid-template-columns: 1fr; gap: 28px; margin-top: 20px; text-align: center; }
  .hero2 .hero-cta { justify-content: center; }
  .hero2-text > p { margin-left: auto; margin-right: auto; }
  .demo-card { transform: none; }
  .steps-row { flex-direction: column; align-items: center; }
  .step { max-width: 420px; width: 100%; }
  .step-arrow { transform: rotate(90deg); }
}

@media (prefers-reduced-motion: reduce) {
  .demo-msg, .demo-friend { opacity: 1; transform: none; animation: none; }
  .demo-typing { display: none; }
  .hero2-text h1 em::after { transform: scaleX(1); animation: none; }
  .step:hover { transform: none; }
}

/* ==== Micro-interazioni v1.6.1 ==== */

/* I bottoni rispondono al tocco */
.btn { transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.btn:active { transform: scale(0.96); }

/* Messaggi nuovi entrano scivolando (solo quelli arrivati dopo il caricamento) */
.msg-new { animation: msg-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Reazioni: pop quando le tocchi */
.reaction { transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.reaction:active { transform: scale(0.9); }
.reaction-pop { animation: react-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.6); }
@keyframes react-pop {
  0% { transform: scale(0.8); }
  55% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.react-picker { animation: picker-in 0.18s ease-out; }
@keyframes picker-in { from { opacity: 0; transform: translateY(5px); } }

/* Card persone: si sollevano, l'avatar saluta */
.person-card { transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.person-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -14px rgba(10, 75, 70, 0.28); }
.person-card .avatar { transition: transform 0.18s; }
.person-card:hover .avatar { transform: scale(1.08) rotate(-3deg); }

/* Badge navbar: pulsano quando il numero sale */
.badge-pulse { animation: badge-pulse 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
@keyframes badge-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.badge { display: inline-block; transition: transform 0.15s; }

/* Nav: sottolineatura che scorre */
.nav a::after {
  content: ""; display: block; height: 2px; border-radius: 2px;
  background: var(--ottanio);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.18s ease-out;
}
.nav a:hover::after { transform: scaleX(1); }

/* Chip interessi: piccola molla alla selezione */
.chip input:checked + span { animation: chip-pick 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.5); }
@keyframes chip-pick { 0% { transform: scale(0.92); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* Input: il bordo si accende dolcemente */
input, select, textarea { transition: border-color 0.15s, background 0.15s; }
input:focus, select:focus, textarea:focus { border-color: var(--ottanio); background: var(--bianco); }

/* Invio messaggio: il campo "respira" quando svuotato */
.chat-sent { animation: chat-sent 0.25s ease-out; }
@keyframes chat-sent { 0% { background: var(--soft); } 100% { background: var(--carta); } }

/* Alert che entrano dall'alto */
.alert { animation: alert-in 0.3s ease-out; }
@keyframes alert-in { from { opacity: 0; transform: translateY(-6px); } }

/* Tutto spento per chi preferisce niente movimento */
@media (prefers-reduced-motion: reduce) {
  .msg-new, .reaction-pop, .badge-pulse, .alert,
  .chip input:checked + span, .react-picker, .chat-sent { animation: none; }
  .btn:active, .reaction:active, .person-card:hover,
  .person-card:hover .avatar { transform: none; }
  .person-card:hover { box-shadow: none; }
  .nav a::after { transition: none; }
}

/* ==== Empty states illustrati ==== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 28px 16px; gap: 4px;
}
.empty-state strong { font-family: var(--font-display); font-size: 1.1rem; }
.empty-state p { color: var(--muted); max-width: 34em; margin: 2px 0 12px; }
.empty-art { animation: galleggia 4s ease-in-out infinite; }
@keyframes galleggia { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.chat-empty .empty-state { margin: auto; }
@media (prefers-reduced-motion: reduce) { .empty-art { animation: none; } }

/* ==== Dark mode automatica (tema di sistema) ==== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="chiaro"]) {
    --ink: #E8EFEC;
    --carta: #101816;        /* sfondo pagina: verde-nero profondo */
    --bianco: #18221F;       /* card: un gradino più chiaro */
    --linea: #2A3835;
    --muted: #93A6A0;
    --ottanio: #39B0A5;      /* più luminoso: regge da link e da bottone */
    --ottanio-scuro: #A5E3DC;/* da testo-accento sul buio */
    --btn-text: #062B27;     /* testo scuro sui bottoni teal chiari */
    --soft: #1E2F2C;
    --soft-border: #2F4641;
    --err-bg: #3A211D;  --err-border: #6B3A30;
    --ok-bg: #1C2F25;   --ok-border: #2F5340;
    --gold-bg: #332B18; --gold-border: #5A4A26; --gold-text: #E5C374;
    --poll-bar: #24403B;
    --danger: #C9543C;  --danger-dark: #E0795F;
    --online: #2EBD6B;
  }
  /* ombre più discrete sul buio */
  .demo-card { box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.6); }
  .person-card:hover, .step:hover { box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.55); }
  .react-picker { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
  /* il flair su sfumatura chiara non funziona al buio */
  .flair { background: linear-gradient(90deg, var(--soft), var(--gold-bg)); color: var(--ottanio-scuro); }
  /* immagini leggermente attenuate, tornano piene all'interazione */
  .msg-img, .avatar-img img { filter: brightness(0.92); }
  .msg-img:hover, .avatar-img img:hover { filter: none; }
}

/* ==== Coriandoli (nuova amicizia) ==== */
.confetti-box {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden;
}
.confetti-box i {
  position: absolute; top: -20px; display: block; border-radius: 2px;
  animation-name: coriandolo; animation-timing-function: ease-in; animation-fill-mode: forwards;
}
@keyframes coriandolo {
  to { transform: translateY(105vh) translateX(var(--scivola, 0px)) rotate(var(--ruota, 540deg)); opacity: 0.9; }
}

/* ==== Skeleton loading chat ==== */
.skel-msg {
  width: 55%; height: 38px; border-radius: 15px 15px 15px 4px;
  align-self: flex-start;
  background: linear-gradient(90deg, var(--carta) 25%, var(--linea) 50%, var(--carta) 75%);
  background-size: 200% 100%;
  animation: skel-shine 1.3s infinite linear;
}
.skel-msg.mine { align-self: flex-end; border-radius: 15px 15px 4px 15px; }
.skel-msg.w60 { width: 60%; height: 52px; }
.skel-msg.w40 { width: 40%; height: 30px; }
@keyframes skel-shine { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .skel-msg { animation: none; background: var(--carta); }
  .confetti-box { display: none; }
}

/* ==== v1.8: referral, stats, verifica ==== */
.ref-box { display: flex; gap: 8px; margin: 14px 0; }
.ref-box input { flex: 1; margin-top: 0; font-size: 0.9rem; }
.verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 0.85em; height: 0.85em; font-size: 0.6em;
  background: var(--ottanio); color: var(--btn-text);
  border-radius: 50%; vertical-align: middle; font-weight: 800;
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; margin-bottom: 0; }
.stat-n { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--ottanio); }
.funnel-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.funnel-label { font-size: 0.9rem; }
.funnel-bar { background: var(--carta); border-radius: 99px; height: 14px; overflow: hidden; border: 1px solid var(--linea); }
.funnel-bar span { display: block; height: 100%; background: var(--ottanio); border-radius: 99px; transition: width 0.4s; }
.funnel-val { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.mini-chart { display: flex; gap: 4px; align-items: flex-end; height: 140px; }
.mini-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.mini-bar span { width: 100%; background: var(--ottanio); border-radius: 4px 4px 0 0; min-height: 3px; }
.mini-bar em { font-style: normal; font-size: 0.65rem; color: var(--muted); margin-top: 3px; }
@media (max-width: 560px) { .ref-box { flex-direction: column; } }

/* ==== v1.9: severità AI segnalazioni ==== */
.sev { display: inline-block; font-size: 0.7rem; font-weight: 800; border-radius: 99px; padding: 2px 9px; margin-right: 6px; cursor: help; }
.sev-alta  { background: var(--err-bg); color: var(--danger-dark); border: 1px solid var(--err-border); }
.sev-media { background: var(--gold-bg); color: var(--gold-text); border: 1px solid var(--gold-border); }
.sev-bassa { background: var(--soft); color: var(--ottanio-scuro); border: 1px solid var(--soft-border); }
.sev-min, .sev-na { background: var(--carta); color: var(--muted); border: 1px solid var(--linea); }

/* ==== v1.9: Tavoli ==== */
.tavolo-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); flex-wrap: wrap; }
.tavolo-row:last-child { border-bottom: 0; }
.tavolo-missione { color: var(--ottanio-scuro); font-size: 0.92rem; }
.tavolo-banner {
  background: var(--gold-bg); border: 1px solid var(--gold-border);
  border-radius: 10px; padding: 8px 14px; margin-bottom: 10px; font-size: 0.92rem;
}

/* ==== v1.9.1: onboarding ==== */
.onb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.onb-head h2 { margin: 0; flex: 1; }
.onb-progress { flex: 1; max-width: 160px; height: 8px; background: var(--carta); border: 1px solid var(--linea); border-radius: 99px; overflow: hidden; }
.onb-progress span { display: block; height: 100%; background: var(--ottanio); border-radius: 99px; transition: width 0.4s; }
.onb-step {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px; margin: 6px 0;
  border: 1px solid var(--linea); border-radius: 12px; text-decoration: none; color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}
.onb-step:hover { border-color: var(--ottanio); transform: translateX(3px); text-decoration: none; }
.onb-step.done { opacity: 0.6; }
.onb-step.done:hover { transform: none; border-color: var(--linea); }
.onb-check {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem;
  background: var(--carta); border: 2px solid var(--linea); color: var(--muted);
}
.onb-step.done .onb-check { background: var(--ottanio); border-color: var(--ottanio); color: var(--btn-text); }

/* ==== v1.10: preferenze e template email ==== */
.prefs-grid { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; padding-left: 18px; }
.tpl-box { border: 1px solid var(--linea); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.tpl-box summary { cursor: pointer; }
.tpl-box form { margin-top: 8px; }

/* skip link: visibile solo al focus da tastiera */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 10000; background: var(--ottanio); color: var(--btn-text); padding: 8px 16px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* elimina proprio messaggio: appare al passaggio */
.msg { position: relative; }
.msg-del {
  position: absolute; top: -8px; right: -8px; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--linea); background: var(--bianco);
  color: var(--muted); font-size: 11px; cursor: pointer; line-height: 1;
  opacity: 0; transition: opacity 0.15s, color 0.15s;
}
.msg:hover .msg-del, .msg-del:focus { opacity: 1; }
.msg-del:hover { color: var(--danger-dark); border-color: var(--danger); }
@media (hover: none) { .msg-del { opacity: 0.55; } } /* su touch sempre visibile */

/* azioni sui propri post forum */
.post-own-actions { display: flex; gap: 8px; margin-top: 4px; }
.post-own-actions a, .post-own-actions button { background: none; border: 0; cursor: pointer; font-size: 0.95rem; opacity: 0.5; text-decoration: none; padding: 0; }
.post-own-actions a:hover, .post-own-actions button:hover { opacity: 1; }

/* ==== v1.12: modifica msg, nascondi, tutto letto ==== */
.msg-edit {
  position: absolute; top: -8px; right: 16px; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--linea); background: var(--bianco);
  color: var(--muted); font-size: 11px; cursor: pointer; line-height: 1;
  opacity: 0; transition: opacity 0.15s, color 0.15s;
}
.msg:hover .msg-edit, .msg-edit:focus { opacity: 1; }
.msg-edit:hover { color: var(--ottanio); border-color: var(--ottanio); }
@media (hover: none) { .msg-edit { opacity: 0.55; } }
.msg-mod { font-size: 0.68rem; color: var(--muted); font-style: italic; }
.chat-hide { display: flex; margin: 0; flex-shrink: 0; }
.tutto-letto { margin-bottom: 8px; }
/* Pulsante-icona discreto (Nascondi nell'header, ecc.) */
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--muted); font-size: 1.05rem; line-height: 1; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-icon:hover { background: var(--carta); border-color: var(--linea); color: var(--ink); }

/* annuncio community */
.annuncio { background: var(--gold-bg); border: 1px solid var(--gold-border); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 0.95rem; }
.annuncio button { float: right; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 1rem; }

/* ==== Override manuale del tema (TENERE SINCRONIZZATO col blocco @media dark) ==== */
:root[data-theme="scuro"] {
  --ink: #E8EFEC;
  --carta: #101816;        /* sfondo pagina: verde-nero profondo */
  --bianco: #18221F;       /* card: un gradino più chiaro */
  --linea: #2A3835;
  --muted: #93A6A0;
  --ottanio: #39B0A5;      /* più luminoso: regge da link e da bottone */
  --ottanio-scuro: #A5E3DC;/* da testo-accento sul buio */
  --btn-text: #062B27;     /* testo scuro sui bottoni teal chiari */
  --soft: #1E2F2C;
  --soft-border: #2F4641;
  --err-bg: #3A211D;  --err-border: #6B3A30;
  --ok-bg: #1C2F25;   --ok-border: #2F5340;
  --gold-bg: #332B18; --gold-border: #5A4A26; --gold-text: #E5C374;
  --poll-bar: #24403B;
  --danger: #C9543C;  --danger-dark: #E0795F;
  --online: #2EBD6B;
}
/* tema chiaro forzato: vince sul media query annullandolo via specificità */
.menzione { color: var(--ottanio); font-weight: 700; text-decoration: none; }
.quiz-q { border: 1px solid var(--linea); border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
.quiz-q legend { font-weight: 700; padding: 0 6px; }
.quiz-aff { color: var(--ottanio-scuro); font-weight: 600; }

/* vocali (aspetto base unificato con .btn-img sopra) */
.btn-vocale.registrando { background: var(--danger); border-color: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
.msg audio { max-width: 240px; height: 36px; display: block; margin: 4px 0; }

/* ==== Registrazione: layout a 2 colonne + form progressivo ==== */
.reg-cols { margin-top: 28px; }
@media (min-width: 821px) { .reg-cols { grid-template-columns: 1.1fr 0.9fr; } }
.reg-cols .card { margin-bottom: 0; }

.reg-aside {
  background: linear-gradient(160deg, var(--ottanio), var(--ottanio-scuro));
  color: #fff; border-radius: var(--raggio); padding: 26px 24px;
  display: flex; flex-direction: column; gap: 16px; align-self: stretch;
}
.reg-aside h2 { color: #fff; margin: 0; font-size: 1.35rem; font-family: var(--font-display); }
.reg-aside ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 13px; }
.reg-aside li { display: flex; gap: 11px; align-items: flex-start; font-size: 0.96rem; line-height: 1.45; }
.reg-aside li b { font-weight: 700; }
.reg-aside .reg-emoji { font-size: 1.25rem; line-height: 1.2; flex: 0 0 auto; }
.reg-gift { background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.32); border-radius: 12px; padding: 11px 14px; font-size: 0.95rem; }
.reg-free { margin: auto 0 0; font-size: 0.88rem; opacity: 0.92; }
@media (max-width: 820px) { .reg-aside { order: 2; } .reg-cols .card { order: 1; } }

/* step progressivi (attivi solo con JS; senza JS resta un form unico) */
.reg-steptitle { font-size: 1.1rem; margin: 0 0 12px; }
.reg-stepbar { display: none; align-items: center; gap: 12px; margin: 2px 0 16px; }
.reg-form.js-steps .reg-stepbar { display: flex; }
.reg-stepbar .onb-progress { flex: 1; max-width: none; }
.reg-stepnum { font-size: 0.85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.reg-form.js-steps .reg-step { display: none; }
.reg-form.js-steps .reg-step.active { display: block; animation: alert-in 0.25s ease-out; }
.reg-form.js-steps .reg-steptitle { display: none; } /* il titolo passo è ridondante con la barra */
.reg-nav { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.reg-spacer { flex: 1; }
.reg-form:not(.js-steps) .reg-nav { display: none; } /* senza JS niente bottoni passo, solo il submit finale */
.reg-form:not(.js-steps) .reg-step[data-step="3"] .reg-nav { display: flex; }
.reg-form:not(.js-steps) .reg-step[data-step="3"] .reg-nav [data-act] { display: none; }

/* ==== Messaggi: header chat, lista, ricerca, nuova chat, rompighiaccio, spunte, pill ==== */
#chat { position: relative; }
.chat-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--linea); }
.chat-peer { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; flex: 1; }
.chat-peer .avatar, .chat-peer .avatar-group { width: 34px; height: 34px; font-size: 15px; flex: 0 0 34px; }
.chat-peer:hover { text-decoration: none; }
.chat-peer-info { display: flex; flex-direction: column; min-width: 0; }
.chat-peer-info strong { line-height: 1.15; }
.chat-peer-info .muted { font-size: 0.8rem; }
.chat-item-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; flex-shrink: 0; }
.chat-item-meta .badge { vertical-align: baseline; }
.chat-item-time { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.chat-item-prev { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-search { width: 100%; margin: 0 0 10px; }
.new-chat { margin-bottom: 10px; }
.new-chat > summary { cursor: pointer; display: inline-block; background: var(--ottanio); color: var(--btn-text); border-radius: 99px; padding: 6px 14px; font-size: 0.9rem; font-weight: 700; list-style: none; }
.new-chat > summary::-webkit-details-marker { display: none; }
.new-chat-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--linea); border-radius: 10px; margin-top: 8px; padding: 4px; }
.chat-friend { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.chat-friend:hover { background: var(--soft); text-decoration: none; }
.ice-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 12px; }
.ice-suggest .muted { font-size: 0.85rem; }
.ice-chip { background: var(--soft); border: 1px solid var(--linea); border-radius: 99px; padding: 5px 12px; font-size: 0.85rem; cursor: pointer; color: var(--ink); }
.ice-chip:hover { border-color: var(--ottanio); }
.msg-receipt { font-size: 0.72rem; color: var(--muted); margin-left: 4px; }
.msg-receipt.read { color: var(--ottanio); }
.chat-newpill { position: absolute; left: 50%; transform: translateX(-50%); bottom: 64px; background: var(--ottanio); color: var(--btn-text); border: none; border-radius: 99px; padding: 6px 16px; font-size: 0.85rem; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2); z-index: 5; }

/* Eventi: badge categoria */
.event-cat { display: inline-block; vertical-align: middle; font-size: 0.72rem; font-weight: 700; border-radius: 99px; padding: 2px 9px; background: var(--soft); color: var(--ottanio-scuro); }
.event-cat-pro { background: var(--gold-bg); color: var(--ink); border: 1px solid var(--gold-border); }

/* Stanze: card arricchite */
.room-card { border: 1px solid var(--linea); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.room-card-head { display: flex; align-items: center; gap: 10px; }
.room-card-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.room-card-info strong { line-height: 1.2; }
.room-cat { display: inline-block; font-size: 0.7rem; font-weight: 700; background: var(--soft); color: var(--ottanio-scuro); border-radius: 99px; padding: 1px 8px; vertical-align: middle; }
.room-stats { font-size: 0.8rem; }
.room-desc { margin: 8px 0 4px; font-size: 0.9rem; }
.room-avatars { display: flex; gap: 4px; margin: 6px 0; }
.room-last { font-size: 0.8rem; margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* Eventi: badge temporale, filtri rapidi, prossimi eventi, dettaglio */
.ev-when { display: inline-block; vertical-align: middle; font-size: 0.7rem; font-weight: 700; border-radius: 99px; padding: 1px 9px; background: var(--soft); color: var(--ottanio-scuro); }
.ev-today { background: var(--ottanio); color: var(--btn-text); }
.ev-soon { background: var(--gold-bg); color: var(--ink); border: 1px solid var(--gold-border); }
.ev-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.ev-prossimi-list { display: flex; flex-direction: column; gap: 6px; }
.ev-prossimo { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border: 1px solid var(--linea); border-radius: 10px; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.ev-prossimo:hover { border-color: var(--ottanio); text-decoration: none; }
.ev-prossimo-data { font-size: 0.8rem; font-weight: 700; color: var(--ottanio-scuro); white-space: nowrap; }
.ev-detail-meta { font-size: 1.05rem; }

/* Forum: vista categorie, calde, righe ricche, dettaglio discussione */
.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.cat-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 12px; background: var(--bianco); text-decoration: none; color: var(--ink); }
.cat-card:hover { border-color: var(--ottanio); text-decoration: none; }
.cat-card-on { border-color: var(--ottanio); background: var(--soft); }
.cat-card .muted { font-size: 0.72rem; }
.forum-hot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 12px; border: 1px solid var(--gold-border); background: var(--gold-bg); border-radius: 12px; font-size: 0.85rem; }
.forum-hot-label { font-weight: 700; white-space: nowrap; }
.forum-hot a { color: var(--ink); text-decoration: none; }
.forum-hot a:hover { text-decoration: underline; }
.forum-toolbar { align-items: center; gap: 6px; }

.th-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.th-row:last-child { border-bottom: 0; }
.th-unread { position: relative; }
.th-main { flex: 1; min-width: 0; }
.th-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.th-title a { text-decoration: none; }
.th-title a:hover { text-decoration: underline; }
.th-badge { font-size: 0.68rem; font-weight: 700; border-radius: 99px; padding: 1px 8px; background: var(--soft); color: var(--ottanio-scuro); }
.th-solved { background: var(--ottanio); color: var(--btn-text); }
.th-new { font-size: 0.68rem; font-weight: 700; color: var(--ottanio); }
.th-excerpt { font-size: 0.85rem; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-meta { font-size: 0.78rem; margin-top: 4px; }
.th-last { display: flex; flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; text-align: center; }
.th-last .muted { font-size: 0.7rem; white-space: nowrap; }

.thread-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.thread-head h1 { margin: 0; }
.thread-actions { display: flex; gap: 6px; }
.post-actions-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.post-solved { border: 1px solid var(--ottanio); box-shadow: 0 0 0 1px var(--ottanio) inset; }
.post-solved-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--btn-text); background: var(--ottanio); border-radius: 99px; padding: 2px 10px; margin-bottom: 8px; }

/* Quiz: progresso, % community, risultati affinità */
.quiz-wrap { max-width: 640px; margin: 0 auto; }
.quiz-progress { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.quiz-progress-bar { height: 100%; background: var(--ottanio); border-radius: 99px; transition: width .3s; }
.quiz-pct { color: var(--muted); font-weight: 600; font-size: 0.72rem; }
.quiz-tipo { font-size: 1.05rem; }
.affini-list { display: flex; flex-wrap: wrap; gap: 10px; }
.affine { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 78px; text-decoration: none; color: var(--ink); }
.affine:hover { text-decoration: none; }
.affine-nome { font-size: 0.78rem; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 78px; }
.affine-pct { font-weight: 800; color: var(--ottanio-scuro); }

/* Tavoli: scadenza, avanzamento coda, città attive, storico */
.tavolo-scad { display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--ottanio-scuro); margin-left: 6px; }
.tavolo-scad-soon { color: var(--gold-text); }
.tavolo-scad-late { color: var(--danger-dark); }
.coda-prog { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.coda-prog-bar { height: 100%; background: var(--ottanio); border-radius: 99px; transition: width .3s; }
.citta-attive { display: flex; flex-wrap: wrap; gap: 6px; }
.conclusi-list { display: flex; flex-direction: column; gap: 8px; }
.conclusi-item { display: flex; flex-direction: column; gap: 6px; }
.conclusi-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--linea); border-radius: 10px; text-decoration: none; color: var(--ink); }
.conclusi-row:hover { border-color: var(--ottanio); text-decoration: none; }
.conclusi-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 4px 2px; }
.conclusi-refs .muted { font-size: 0.82rem; width: 100%; }

/* Home: recap a colpo d'occhio, azioni rapide, social proof landing */
.home-recap { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.recap-item { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--linea); background: var(--bianco); text-decoration: none; color: var(--ink); font-size: 0.88rem; }
a.recap-item:hover { border-color: var(--ottanio); text-decoration: none; }
.recap-num { font-weight: 800; color: var(--ottanio-scuro); }
.recap-streak { background: var(--gold-bg); border-color: var(--gold-border); }
.recap-tavolo { background: var(--soft); border-color: var(--ottanio); font-weight: 600; }
.home-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: stretch; }
.home-action-main { flex: 1 1 280px; }
.home-action-main h2 { margin-top: 0; }
.home-action-side { display: flex; flex-direction: column; gap: 10px; flex: 1 1 240px; justify-content: center; }
.quick-action { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--linea); border-radius: 12px; text-decoration: none; color: var(--ink); }
.quick-action:hover { border-color: var(--ottanio); text-decoration: none; }
.quick-action .qa-ico { font-size: 1.6rem; }
.quick-action span span { display: block; }
.quick-action .muted { font-size: 0.8rem; }
.hero2-social { font-weight: 600; margin: 6px 0 0; color: var(--ottanio-scuro); }

/* CTA per gli ospiti su pagine pubbliche (evento/discussione) */
.guest-cta { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--ottanio); background: var(--soft); border-radius: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.guest-cta .btn { white-space: nowrap; }

/* Centro notifiche in-app (campanella in topbar) */
.notif-wrap { position: relative; display: flex; }
.notif-bell { background: none; border: 0; cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 4px; position: relative; color: var(--ink); }
.notif-bell .notif-badge { position: absolute; top: -2px; right: -3px; }
.notif-panel { position: absolute; top: calc(100% + 8px); right: 0; left: auto; width: min(330px, 92vw); max-height: 72vh; overflow-y: auto;
  background: var(--bianco); border: 1px solid var(--linea); border-radius: 14px; box-shadow: 0 10px 34px rgba(16, 33, 31, .18); z-index: 80; }
@media (max-width: 560px) {
  /* su mobile il pannello sta fisso in alto, ancorato ai due lati: sempre visibile */
  .notif-panel { position: fixed; top: 56px; right: 8px; left: 8px; width: auto; max-height: 76vh; }
}
.notif-head { font-weight: 700; padding: 12px 14px 8px; font-family: var(--font-display); }
.notif-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-top: 1px solid var(--linea); text-decoration: none; color: var(--ink); }
.notif-item:hover { background: var(--carta); text-decoration: none; }
.notif-unread { background: var(--soft); }
.notif-txt { font-size: 0.88rem; line-height: 1.3; overflow-wrap: anywhere; }
.notif-ico { font-size: 1.4rem; line-height: 1; flex: 0 0 auto; }
.notif-when { display: block; font-size: 0.72rem; margin-top: 2px; }
.notif-empty { padding: 18px 14px; text-align: center; }

/* Bottom-nav mobile (app-like) — nascosta su desktop */
.bottom-nav { display: none; }
@media (max-width: 760px) {
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--bianco); border-top: 1px solid var(--linea);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 12px rgba(16, 33, 31, .07);
  }
  .bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 7px 2px 6px; text-decoration: none; color: var(--muted); font-size: 0.66rem; font-weight: 600; }
  .bn-item:hover { text-decoration: none; }
  .bn-ico { position: relative; font-size: 1.35rem; line-height: 1; }
  .bn-badge { position: absolute; top: -5px; right: -11px; }
  .bn-on, .bn-on .bn-lab { color: var(--ottanio); }
  body { padding-bottom: 62px; }   /* lo spazio per la barra fissa */
  /* Topbar: nav su una riga scorrevole invece del wrap a capo */
  .topbar .nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 14px; scrollbar-width: none; }
  .topbar .nav::-webkit-scrollbar { display: none; }
  .topbar .nav a { white-space: nowrap; }
  /* "Scopri": sul mobile il dropdown veniva tagliato dalla nav scrollabile (overflow-x).
     Diventa un bottom-sheet fixed (esce dal clipping), sopra la bottom-nav (~62px). */
  .nav-more-panel {
    position: fixed; left: 0; right: 0; bottom: 62px; top: auto;
    margin: 0; border-radius: 16px 16px 0 0;
    grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px;
    max-height: 62vh; overflow-y: auto;
    box-shadow: 0 -8px 28px rgba(22,33,31,.20);
  }
  .nav-more-panel a { background: var(--soft); padding: 12px; white-space: normal; text-align: center; }
}

/* ==== Hardening responsive (rete di sicurezza, vale per entrambi i temi) ==== */
img, svg, video { max-width: 100%; }
/* Testo libero dell'utente (bio): spezza parole/URL lunghi così non sforano in larghezza su mobile */
.bio-text { overflow-wrap: anywhere; }
/* Tabelle larghe (es. storico pagamenti): scroll orizzontale locale invece di sballare l'intera pagina */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.funnel-row { grid-template-columns: 1fr 1.6fr auto; }
@media (max-width: 560px) {
  .wrap { padding: 12px 14px 40px; }
  table.compare th, table.compare td { padding: 7px 6px; font-size: 0.82rem; }
  .funnel-row { grid-template-columns: 1fr auto; gap: 4px 8px; }
  .home-actions { flex-direction: column; }
  .cat-cards { grid-template-columns: 1fr 1fr; }
  .affine { width: 70px; }
  h1 { font-size: 1.6rem; }
}
@media (max-width: 380px) {
  .cat-cards { grid-template-columns: 1fr; }
  .pricing { flex-direction: column; align-items: stretch; }
}

/* Referral potenziato: traguardi, condivisione, lista invitati */
.ref-progress-wrap { margin: 16px auto 0; max-width: 440px; }
.ref-progress { height: 12px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.ref-progress-bar { height: 100%; background: var(--ottanio); border-radius: 99px; transition: width .4s; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin: 16px 0 4px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px;
  border: 1px solid var(--linea); border-radius: 12px; background: var(--bianco); color: var(--ink); font-weight: 600;
  font-size: 0.9rem; cursor: pointer; text-decoration: none; }
.share-btn:hover { border-color: var(--ottanio); text-decoration: none; background: var(--carta); }
.ref-list { display: flex; flex-direction: column; gap: 6px; text-align: left; margin-top: 10px; }
.ref-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--linea); border-radius: 10px; }
.ref-row-info { display: flex; flex-direction: column; line-height: 1.25; }
.ref-row-info .muted { font-size: 0.8rem; }

/* Onboarding: card "completa l'ingresso" in home + pagina benvenuto.php */
.onboarding-card { position: relative; border: 1px solid var(--ottanio); background: linear-gradient(180deg, var(--soft), transparent); }
.ob-close { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 2px 6px; }
.ob-close:hover { color: var(--ink); }
.ob-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.ob-list li { padding: 8px 12px; border-radius: 10px; background: var(--bianco); border: 1px solid var(--linea); }
.ob-list li.ob-ok { color: var(--muted); background: transparent; border-style: dashed; }
.ob-mini { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.ob-mini li.ob-ok { color: var(--muted); }
.ob-step { position: relative; padding-left: 20px; }
.ob-badge { position: absolute; top: 16px; left: -14px; width: 28px; height: 28px; border-radius: 50%; background: var(--ottanio); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.ob-invita { border-color: var(--ottanio); }
.ob-citta-form { display: flex; gap: 8px; flex-wrap: wrap; }
.ob-citta-form input { flex: 1; min-width: 160px; margin-top: 0; }
.ob-cta-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.ob-finish { text-align: center; margin: 18px 0 4px; }
.btn-lg { padding: 12px 28px; font-size: 1.05rem; }
@media (max-width: 560px) { .ob-citta-form { flex-direction: column; } .ob-badge { left: -10px; } }

/* Stati "stasera" (micro-stato effimero in Home) */
.stasera-form { display: flex; gap: 8px; flex-wrap: wrap; }
.stasera-form input[name="stato"] { flex: 1; min-width: 200px; margin: 0; }
.stasera-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.stasera-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 12px; }
.stasera-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.stasera-info .muted { font-size: 0.78rem; }
.stasera-info a { text-decoration: none; }
.stasera-txt { margin: 3px 0 0; overflow-wrap: anywhere; }
/* "🟢 Sono libero ora" */
/* verde scuro fisso per testo bianco: ~4.8:1 WCAG AA (--online #2EBD6B su bianco era 2.44:1) */
.btn-ora { background: #15803D; border-color: #15803D; color: #fff; }
.btn-ora:hover { filter: brightness(0.95); }
.btn-ora:disabled { opacity: 0.7; }
.stasera-item.stasera-ora { border-color: var(--online); background: color-mix(in srgb, var(--online) 10%, transparent); }
.ora-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #15803D; color: #fff; vertical-align: middle; }
/* Guida "Come iniziare" */
.guida-passi { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.guida-passo { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--linea); }
.guida-passo:first-child { border-top: 0; padding-top: 4px; }
.guida-num { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.guida-passo h2 { margin: 0 0 4px; font-size: 1.12rem; }
.guida-passo p { margin: 0; }

/* Stato "stasera" mostrato sulle card persone */
.card-stasera { display: block; margin-top: 6px; font-size: 0.76rem; color: var(--ottanio-scuro); background: var(--soft); border: 1px solid var(--soft-border); border-radius: 8px; padding: 3px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Wizard "Completa il tuo profilo": item cliccabili */
.compl-list a.compl-link { color: var(--ink); text-decoration: none; display: inline-block; padding: 2px 0; }
.compl-list a.compl-link:hover { color: var(--ottanio); text-decoration: underline; }
.compl-list li.done { color: var(--muted); }

/* Mappa Esplora */
#mappa-esplora { height: calc(100vh - 250px); min-height: 360px; border-radius: 14px; overflow: hidden; border: 1px solid var(--linea); }
.map-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 10px; font-size: 0.85rem; color: var(--muted); }
.map-legend i.ml { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #fff; vertical-align: middle; margin-right: 3px; box-shadow: 0 0 0 1px var(--linea); }
.ml-ev { background: #0E6E66; }
.ml-st { background: #F2A65A; }
.ml-ha { background: #8A6FD1; }
.ml-pe { background: #9DB3AD; }

/* ✨ Match del giorno (Home) */
.match-giorno { border: 1px solid var(--ottanio); }
.mg-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mg-av { flex-shrink: 0; }
.mg-info { flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 2px; }
.mg-info > a { text-decoration: none; color: var(--ink); }
.mg-info > a:hover { color: var(--ottanio); }
.mg-int { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px; }
.mg-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* 🏆 Livelli & classifica */
.liv-mine { display: flex; align-items: center; gap: 16px; }
.liv-badge { width: 64px; height: 64px; border-radius: 50%; background: var(--ottanio); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; flex-shrink: 0; }
.liv-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.liv-bar { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; margin: 5px 0 2px; }
.liv-bar-fill { height: 100%; background: var(--albicocca); border-radius: 99px; transition: width .4s; }
.liv-rank { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.liv-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.liv-me { background: var(--soft); border: 1px solid var(--ottanio); }
.liv-pos { width: 34px; text-align: center; font-weight: 700; flex-shrink: 0; }
.liv-nome { text-decoration: none; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liv-lv { font-size: 0.78rem; flex-shrink: 0; }
.liv-xp { font-weight: 700; color: var(--ottanio-scuro); flex-shrink: 0; }
.recap-livello { background: var(--gold-bg); border-color: var(--gold-border); }

/* 📸 Storie 24h */
.storie-bar { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 4px; scrollbar-width: none; }
.storie-bar::-webkit-scrollbar { display: none; }
.storia-add, .storia-item { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 0 0 auto; width: 68px; padding: 0; }
.storia-ring { position: relative; display: inline-flex; padding: 2px; border-radius: 50%; border: 2px solid var(--linea); }
.storia-ring-on { border: 0; padding: 3px; background: linear-gradient(45deg, var(--ottanio), var(--albicocca)); }
.storia-ring-on .avatar { box-shadow: 0 0 0 2px var(--bianco); }
.storia-plus { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ottanio); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; border: 2px solid var(--bianco); }
.storia-testo-ico { width: 60px; height: 60px; border-radius: 50%; background: var(--soft); border: 1px solid var(--linea); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.storia-nome { font-size: 0.72rem; color: var(--muted); max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* i due tasti compositore ("La tua storia", "Testo") mostrano il testo per intero (anche su 2 righe), niente troncamento */
.storia-add .storia-nome { white-space: normal; overflow: visible; text-align: center; line-height: 1.15; }

.storie-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(10,16,14,.95); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.storie-bars { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 3; }
.storie-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); }
.storie-bars span.done, .storie-bars span.cur { background: #fff; }
.storie-close { position: absolute; top: 22px; right: 16px; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; z-index: 4; line-height: 1; }
.storie-content { max-width: 460px; width: 92vw; max-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.storie-content img { max-width: 100%; max-height: 78vh; border-radius: 14px; display: block; }
.storie-content.solo-testo { background: linear-gradient(135deg, var(--ottanio), var(--albicocca)); min-height: 52vh; border-radius: 18px; padding: 28px; }
.storie-cap { color: #fff; font-size: 1.3rem; font-weight: 700; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,.45); }
.storie-content.has-img .storie-cap { font-size: 1.02rem; font-weight: 600; margin-top: 12px; }
.storie-quando { position: absolute; bottom: 18px; color: rgba(255,255,255,.7); font-size: 0.8rem; z-index: 3; }
.storie-nav { position: absolute; top: 0; bottom: 0; width: 35%; background: none; border: 0; cursor: pointer; z-index: 2; }
.storie-prev { left: 0; }
.storie-next { right: 0; }

/* Picker baci a tema (#2) */
.bacio-picker { display:inline-block; position:relative; }
.bacio-picker > summary { list-style:none; }
.bacio-picker > summary::-webkit-details-marker { display:none; }
.bacio-opts { display:flex; flex-direction:column; gap:2px; margin-top:6px; min-width:215px; max-width:min(215px,92vw); right:0; background:var(--bianco); border:1px solid var(--linea); border-radius:12px; padding:6px; box-shadow:0 6px 18px rgba(22,33,31,.14); position:absolute; z-index:5; }
.bacio-opts button { display:flex; align-items:center; gap:10px; width:100%; background:none; border:0; cursor:pointer; padding:6px 8px; border-radius:8px; font-size:.95rem; text-align:left; }
.bacio-opts button:hover { background:var(--soft); }
.bacio-opts .bc-em { font-size:1.4rem; line-height:1; }
.bacio-opts .bc-cost { margin-left:auto; font-size:.78rem; color:var(--muted); white-space:nowrap; }

/* Scopri / swipe (#3) */
.swipe-wrap { max-width:460px; margin:0 auto; }
.swipe-card { text-align:center; padding:26px 20px; }
.swipe-ava { display:flex; justify-content:center; margin-bottom:10px; }
.swipe-name { margin:6px 0 2px; font-size:1.5rem; }
.swipe-city { margin:2px 0; color:var(--muted); }
.swipe-common { margin:8px 0; color:#0E6E66; font-weight:600; }
.swipe-bio { margin:12px 0 0; }
.swipe-actions { display:flex; gap:10px; align-items:center; justify-content:center; margin-top:16px; }
.swipe-actions form { margin:0; }
.btn.swipe-kiss { background:#E0457B; border-color:#E0457B; color:#fff; }
.btn.swipe-pass { background:var(--soft); }
.swipe-flash { text-align:center; background:#ffe6f0; border:1px solid #E0457B; border-radius:12px; padding:10px; margin:0 auto 14px; }

/* Streak di baci (#6) */
.streak-badge { display:inline-block; background:#fff0f5; color:#c2185b; border:1px solid #f3c6d8; border-radius:99px; padding:2px 8px; font-size:.82rem; font-weight:700; margin-right:4px; }

/* Bacio con messaggio/audio (#7) */
.bacio-msg { width:100%; margin-bottom:6px; padding:6px 8px; border:1px solid var(--linea); border-radius:8px; font-size:.85rem; box-sizing:border-box; }
.bacio-rec { display:flex; align-items:center; gap:8px; width:100%; background:none; border:0; cursor:pointer; padding:6px 8px; border-radius:8px; font-size:.95rem; text-align:left; color:#c2185b; }
.bacio-rec:hover { background:var(--soft); }
.bacio-rec.registrando { color:#fff; background:#E0457B; }
.bacio-dedica { display:block; font-size:.82rem; color:var(--muted); font-style:italic; }
.bacio-audio { display:block; margin-top:6px; max-width:220px; height:32px; }

/* ==== Toast: feedback non bloccante (sostituisce gli alert) ==== */
.toast-wrap {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 78px);
  z-index: 10000; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none; width: max-content; max-width: 92vw;
}
@media (min-width: 760px) { .toast-wrap { bottom: 28px; } }
.toast {
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 11px 18px; font-size: .95rem; font-weight: 600; line-height: 1.25;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); max-width: 92vw; text-align: center;
  animation: toast-in .28s cubic-bezier(.2,.8,.3,1);
}
.toast-ok { background: var(--ottanio); color: var(--btn-text); }
.toast-err { background: var(--danger); color: #fff; }
.toast-match { background: linear-gradient(95deg, #E0457B, #F2A65A); color: #fff; }
.toast.toast-out { animation: toast-out .26s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  .toast.toast-out { animation: none; opacity: 0; }
}

/* ==== Scopri: ingresso card + annulla ultimo «passa» ==== */
.swipe-card { animation: swipe-in .34s cubic-bezier(.2,.8,.3,1); }
@keyframes swipe-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.swipe-undo { text-align: center; margin: -4px 0 12px; }
.swipe-undo .btn { font-size: .85rem; padding: 5px 14px; }
@media (prefers-reduced-motion: reduce) { .swipe-card { animation: none; } }

/* ==== Consigli (sezione editoriale SEO) ==== */
.consigli-lista { display: flex; flex-direction: column; gap: 14px; }
.consiglio-card { display: block; text-decoration: none; color: inherit; transition: transform .18s, box-shadow .18s, border-color .18s; }
.consiglio-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(0,0,0,.3); border-color: var(--soft-border); text-decoration: none; }
.consiglio-card h2 { margin: 0 0 6px; font-size: 1.18rem; }
.consiglio-card p { margin: 0 0 8px; }
.consiglio-leggi { color: var(--ottanio); font-weight: 700; font-size: .92rem; }
.consiglio-corpo { line-height: 1.62; }
.consiglio-corpo h2 { font-size: 1.18rem; margin: 22px 0 6px; }
.consiglio-corpo p { margin: 0 0 12px; }
.consiglio-corpo ul { margin: 0 0 12px; padding-left: 1.2em; }
.consiglio-corpo li { margin-bottom: 6px; }
.consigli-altri { margin: 0; padding-left: 1.1em; }
.consigli-altri li { margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) { .consiglio-card:hover { transform: none; } }
