:root {
  /* palette anni 2000 / Web 2.0 — chiara, lucida, "aqua" */
  --blue: #3b7fc4;
  --blue-dark: #2a5f9e;
  --blue-darker: #224f86;
  --blue-light: #79b0ec;

  --bg: #c3d6ec;
  --bg-soft: #eef3f9;
  --bg-panel: #ffffff;
  --bg-input: #ffffff;
  --border: #9fb6cf;
  --border-soft: #dde6f0;

  --text: #2b3038;
  --text-dim: #62707f;

  /* mappature usate inline nei template/handler (leggibili su chiaro) */
  --green: #2e8b3d;
  --green-dim: #4ca85c;
  --green-deep: #2e8b3d;
  --cyan: #1668c4;   /* accento "@utente" / autore */
  --amber: #c2780a;
  --red: #cc3333;

  --radius: 9px;
  --shadow: 0 2px 5px rgba(30,50,80,0.18), 0 1px 1px rgba(30,50,80,0.10);

  /* padding del pannello — riusato dal titolo per "sanguinare" ai bordi */
  --panel-px: 1.5rem;
  --panel-py: 1.25rem;

  --font: 'Segoe UI', Tahoma, Verdana, Geneva, 'Trebuchet MS', Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  background:
    /* puntinatura sottilissima stile pattern d'epoca */
    radial-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
    /* alone luminoso in alto */
    radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,0.55), transparent 60%),
    /* sfumatura di fondo azzurra */
    linear-gradient(180deg, #d7e4f3 0%, var(--bg) 360px, #b4cae4 100%);
  background-size: 4px 4px, 100% 100%, 100% 100%;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(59,127,196,0.18);
  overflow-x: hidden;
}

img, svg, canvas { max-width: 100%; }

::selection { background: var(--blue-light); color: #fff; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #d3dfee; box-shadow: inset 1px 0 2px rgba(0,0,0,0.12); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e8f0fa, #acc4e0 50%, #93b1d4 100%);
  border: 1px solid #7e9ec2;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #eef5fd, #9bb8d9); }
html { scrollbar-color: #aac4e2 #d3dfee; }

a { color: var(--blue-dark); text-decoration: none; transition: color 0.12s; }
a:hover { color: var(--blue); text-decoration: underline; }

/* ===== GLOBAL LOAD BAR (htmx) ===== */
#loadbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 10000; pointer-events: none; overflow: hidden;
  opacity: 0; transition: opacity 0.2s;
}
body.htmx-busy #loadbar { opacity: 1; }
.loadbar-fill {
  height: 100%; width: 40%;
  background: linear-gradient(90deg, transparent, var(--blue-light), #fff, var(--blue), transparent);
  animation: loadslide 0.9s var(--ease) infinite;
}
@keyframes loadslide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
.htmx-request.btn { opacity: 0.6; pointer-events: none; }

/* ===== LAYOUT ===== */
.container { max-width: 900px; margin: 0 auto; padding: 0 1rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ===== HEADER / NAV — barra blu lucida (title bar) ===== */
header {
  position: sticky; top: 0; z-index: 50;
  padding: calc(0.55rem + env(safe-area-inset-top, 0px)) 0 0.55rem;
  margin-bottom: 1.5rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 51%, rgba(255,255,255,0.10) 100%),
    linear-gradient(180deg, #5b96d8 0%, #3b7fc4 50%, #2f6cae 100%);
  border-bottom: 1px solid #234f84;
  box-shadow: 0 2px 6px rgba(20,40,70,0.35), inset 0 1px 0 rgba(255,255,255,0.5);
}

.nav-inner { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

.site-title {
  color: #8aa6c8; font-size: 1.35rem; font-weight: 700;
  letter-spacing: 0.03em; text-transform: lowercase; white-space: nowrap;
}
.site-title span { color: var(--blue); text-shadow: 0 1px 0 #fff; }
.site-title:hover { text-decoration: none; }
/* nel header (su blu) diventa bianca lucida */
header .site-title { color: rgba(255,255,255,0.6); text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
header .site-title span { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.4); }

/* ===== NAV BAR (desktop: barra orizzontale; mobile: tab bar in basso) ===== */
.nav-bar { display: flex; gap: 0.3rem; flex-wrap: wrap; align-items: center; }
.nav-actions { margin-left: auto; display: flex; gap: 0.4rem; align-items: center; }

.nav-item, .nav-act {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: #eaf2fc; font-size: 0.85rem; font-weight: 600;
  text-transform: capitalize; padding: 0.35rem 0.75rem; border-radius: 5px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
  background: none; border: none; cursor: pointer;
  transition: background 0.12s, box-shadow 0.12s;
}
.nav-item:hover, .nav-act:hover {
  background: rgba(255,255,255,0.22); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 1px rgba(0,0,0,0.15);
}
.nav-item.is-active, .nav-act.is-active {
  background: rgba(255,255,255,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -2px 0 rgba(255,255,255,0.7);
}

/* icone nascoste su desktop: lì comandano le etichette testuali */
.nav-ico { width: 20px; height: 20px; flex: none; display: none; }

/* avatar dentro la voce "profilo" */
.nav-avatar { display: inline-flex; }
.nav-avatar .avatar { width: 26px; height: 26px; font-size: 0.78rem; }
.nav-avatar .presence { width: 9px; height: 9px; }

/* link "installa app" (PWA): leggero accento per distinguerlo */
.nav-act.nav-install {
  background: rgba(255,255,255,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.nav-logout { display: inline-flex; }
.nav-logout-btn { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ===== PANELS — modulo con header a gradiente ===== */
.panel {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: var(--panel-py) var(--panel-px);
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,0.7);
  overflow: hidden;
}

/* il titolo sanguina fino ai bordi del pannello come una barra lucida */
.panel-title {
  margin: calc(var(--panel-py) * -1) calc(var(--panel-px) * -1) var(--panel-py);
  padding: 0.5rem var(--panel-px);
  color: #fff;
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--blue-darker);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0) 51%, rgba(255,255,255,0.08) 100%),
    linear-gradient(180deg, #5f99da 0%, #3b7fc4 50%, #2f6cae 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}

.back-link {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.74rem;
  color: var(--cyan);
  font-weight: 700;
}
.back-link:hover { text-decoration: underline; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1rem; }

label { display: block; color: #4c5a6a; font-size: 0.78rem; font-weight: 600; margin-bottom: 0.35rem; }

input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-family: var(--font); font-size: 0.9rem;
  padding: 0.5rem 0.7rem; outline: none;
  box-shadow: inset 0 2px 3px rgba(40,60,90,0.10);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: #9aa7b4; }
input:focus, textarea:focus, select:focus {
  border-color: var(--blue-light);
  box-shadow: inset 0 2px 3px rgba(40,60,90,0.06), 0 0 0 3px rgba(59,127,196,0.22);
}
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }

/* ===== BUTTONS — aqua glossy ===== */
.btn {
  position: relative;
  border: 1px solid #93a8bf;
  border-radius: 6px;
  color: #324050;
  font-family: var(--font); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.42rem 1.05rem; cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.25) 49%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.15) 100%),
    linear-gradient(180deg, #fbfdff 0%, #e3ebf4 50%, #d2dded 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(30,50,80,0.22);
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  transition: filter 0.12s, transform 0.04s, box-shadow 0.12s;
}
.btn:hover { filter: brightness(1.05); border-color: #7a93ad; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(30,50,80,0.3); filter: brightness(0.97); }
.btn:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }

.btn-cyan {
  border-color: #235f9f; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.65) 0%, rgba(255,255,255,0.18) 49%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.12) 100%),
    linear-gradient(180deg, #7ab4ee 0%, #3b85d6 50%, #2a6bbb 100%);
}
.btn-amber {
  border-color: #b9760d; color: #4f3500; text-shadow: 0 1px 0 rgba(255,255,255,0.35);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0.2) 49%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.15) 100%),
    linear-gradient(180deg, #ffd884 0%, #f2ab33 50%, #db8f16 100%);
}
.btn-red {
  border-color: #ad3030; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.16) 49%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.12) 100%),
    linear-gradient(180deg, #f08e8e 0%, #dd4f4f 50%, #c63a3a 100%);
}

.btn-sm { font-size: 0.72rem; padding: 0.28rem 0.7rem; }

/* ===== ALERTS ===== */
.alert {
  border: 1px solid; border-radius: 6px;
  padding: 0.55rem 0.8rem; font-size: 0.82rem; margin-bottom: 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  animation: alertin 0.2s var(--ease);
}
@keyframes alertin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.alert-error { border-color: #e0a9a9; background: linear-gradient(#fdeeee,#fbdede); color: #b22a2a; }
.alert-error::before { content: '⚠ '; }
.alert-ok { border-color: #aedab4; background: linear-gradient(#eef9f0,#e0f3e4); color: #2e7d32; }
.alert-ok::before { content: '✓ '; }

/* ===== PENSIERO CARD ===== */
.pensiero-card {
  position: relative;
  border: 1px solid #cdd9e7;
  border-left: 5px solid var(--blue-light);
  border-radius: 7px;
  padding: 0.6rem 0.7rem; margin-bottom: 0.55rem;
  background: linear-gradient(180deg, #ffffff, #f4f8fd);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(30,50,80,0.08);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
  animation: cardin 0.2s var(--ease);
}

/* ===== STATO "IN ATTESA" (clessidra in alto a destra) ===== */
.attesa-tip { position: absolute; top: 0.45rem; right: 0.5rem; z-index: 2; }
.attesa-tip > summary { list-style: none; }
.attesa-tip > summary::-webkit-details-marker { display: none; }
.attesa-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px;
  color: var(--amber); cursor: pointer;
  background: linear-gradient(180deg, #fff8e9, #fdeccb);
  border: 1px solid #ecc88a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  transition: transform 0.08s var(--ease), background 0.15s var(--ease);
}
.attesa-btn:hover { background: linear-gradient(180deg, #fffaf0, #fbe4b8); }
.attesa-btn:active { transform: scale(0.9); }
.attesa-tip[open] .attesa-btn { background: linear-gradient(180deg, #fbe4b8, #f7d595); }
.attesa-ico { width: 15px; height: 15px; }
.attesa-tooltip {
  position: absolute; top: calc(100% + 4px); right: 0;
  white-space: nowrap;
  font-size: 0.68rem; color: #4f3500; font-weight: 600;
  background: linear-gradient(180deg, #fff8e9, #fdeccb);
  border: 1px solid #ecc88a; border-radius: 6px;
  padding: 0.28rem 0.55rem;
  box-shadow: 0 3px 8px rgba(30,50,80,0.18), inset 0 1px 0 rgba(255,255,255,0.8);
  animation: alertin 0.15s var(--ease);
}
@keyframes cardin { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.pensiero-card:hover { border-left-color: var(--blue); box-shadow: 0 3px 10px rgba(30,50,80,0.15); }

.pensiero-meta {
  font-size: 0.79rem; color: var(--text-dim);
  margin-bottom: 0.35rem; display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
  padding-right: 1.8rem;
}
.pensiero-meta .author { color: var(--cyan); font-weight: 700; }
.pensiero-meta .subject { color: var(--amber); font-weight: 700; }
.pensiero-data { margin-left: auto; font-size: 0.64rem; color: var(--text-dim); opacity: 0.75; white-space: nowrap; }
.crown-badge { font-size: 0.85rem; line-height: 1; flex: 0 0 auto; }

/* ===== MENU AZIONI CARD (3 puntini in alto a destra, solo admin) ===== */
.card-menu { position: absolute; top: 0.4rem; right: 0.45rem; z-index: 4; }
.card-menu > summary { list-style: none; cursor: pointer; }
.card-menu > summary::-webkit-details-marker { display: none; }
.card-menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px; color: var(--text-dim);
  background: linear-gradient(180deg, #ffffff, #eef3f9);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  transition: background 0.12s, color 0.12s, transform 0.08s var(--ease);
}
.card-menu-btn:hover { background: linear-gradient(180deg, #f4f8fd, #e3ecf6); color: var(--blue); }
.card-menu-btn:active { transform: scale(0.92); }
.card-menu[open] .card-menu-btn { background: linear-gradient(180deg, #e3ecf6, #d4e2f1); color: var(--blue); }
.card-menu-pop {
  position: absolute; top: calc(100% + 4px); right: 0; min-width: 152px;
  display: flex; flex-direction: column; gap: 0.15rem;
  background: linear-gradient(180deg, #ffffff, #f4f8fd);
  border: 1px solid var(--border); border-radius: 7px; padding: 0.3rem;
  box-shadow: 0 6px 16px rgba(30,50,80,0.2), inset 0 1px 0 rgba(255,255,255,0.8);
  animation: alertin 0.12s var(--ease);
}
.card-menu-item {
  display: flex; align-items: center; gap: 0.45rem; width: 100%; text-align: left;
  cursor: pointer; font-family: inherit; font-size: 0.78rem; font-weight: 700;
  color: #3a4654; background: none; border: 1px solid transparent; border-radius: 5px;
  padding: 0.34rem 0.5rem; transition: background 0.12s, color 0.12s;
}
.card-menu-item:hover { background: rgba(54,121,209,0.1); color: var(--blue); }
.card-menu-item-danger { color: var(--red); }
.card-menu-item-danger:hover { background: rgba(214,69,69,0.1); color: #a01f1f; }
.card-menu-ico { font-size: 0.9rem; line-height: 1; width: 1.1em; text-align: center; flex: 0 0 auto; }

/* col menu admin presente sposto l'icona "in attesa" per non sovrapporla */
.card-menu ~ .attesa-tip { right: 2.55rem; }

/* ===== PENSIERO CORONATO (bordo dorato leggero) ===== */
.pensiero-crowned {
  border-color: #e6c34d; border-left-color: #e6c34d;
  background: linear-gradient(180deg, #fffdf6, #fdf6e3);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(230,195,77,0.35), 0 2px 8px rgba(200,160,40,0.16);
}
.pensiero-crowned:hover { border-left-color: #d9af2e; box-shadow: 0 3px 12px rgba(200,160,40,0.26); }

.pensiero-contenuto { line-height: 1.5; white-space: pre-wrap; word-break: break-word; font-size: 0.92rem; color: #333a43; }

.pensiero-footer { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.45rem; }
.pensiero-azioni { display: flex; gap: 0.5rem; align-items: center; }
.btn-curioso { padding-top: 0.12rem; padding-bottom: 0.12rem; }

.pensiero-share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; padding: 0.25rem; font-family: inherit;
  color: var(--text-dim); flex: 0 0 auto;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
              color 0.15s var(--ease), transform 0.08s var(--ease);
}
.pensiero-share-btn:hover { background: rgba(54,121,209,0.08); border-color: rgba(54,121,209,0.35); color: var(--cyan); }
.pensiero-share-btn:active { transform: scale(0.94); }
.share-ico { display: inline-flex; width: 14px; height: 14px; flex: 0 0 auto; }

.badge-direct {
  font-size: 0.64rem; color: #1f7a2c; font-weight: 700;
  background: linear-gradient(180deg, #f0fbf1, #d9f1de);
  border: 1px solid #a9d6b0;
  border-radius: 11px; padding: 0.12rem 0.6rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.badge-public {
  font-size: 0.64rem; color: #3a5a8a; font-weight: 700;
  background: linear-gradient(180deg, #f1f6fc, #dde9f6);
  border: 1px solid #aac3e0;
  border-radius: 11px; padding: 0.12rem 0.6rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

/* piccolo switch in linea per alternare versione personale / pubblica nella card */
.badge-toggle {
  border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 0.64rem; font-weight: 700;
  color: var(--text-dim); letter-spacing: 0.03em;
  padding: 0.12rem 0.2rem; border-radius: 6px;
  transition: color 0.12s, background 0.12s;
}
.badge-toggle:hover { color: var(--text); background: rgba(0,0,0,0.05); }

/* ===== Switch versione pubblica / personale (editor) ===== */
.versione-switch {
  display: inline-flex; gap: 0; margin-bottom: 0.85rem;
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
  background: var(--bg-input);
}
.versione-tab {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font); font-size: 0.78rem; font-weight: 700;
  color: #6b7886; padding: 0.34rem 0.95rem;
  transition: background 0.12s, color 0.12s;
}
.versione-tab + .versione-tab { border-left: 1px solid var(--border); }
.versione-tab.attiva {
  color: #fff;
  background: linear-gradient(180deg, #7ab4ee 0%, #3b85d6 50%, #2a6bbb 100%);
}
.versione-hint { color: var(--text-dim); font-weight: 400; }
.versione-errore { color: var(--red); font-size: 0.8rem; padding: 0.25rem 0 0.5rem; }

/* ===== DNA (il "like" dei pensieri) ===== */
.pensiero-reazioni { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }

.dna-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: none; border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; padding: 0.15rem 0.4rem; font-family: inherit;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
              transform 0.08s var(--ease);
}
.dna-btn:hover { background: rgba(233,30,99,0.08); }
.dna-btn:active { transform: scale(0.92); }
.dna-btn[disabled] { opacity: 0.6; cursor: default; }

.dna-ico { display: inline-flex; width: 15px; height: 15px; flex: 0 0 auto; }
/* spento: l'elica resta riconoscibile ma in sordina finché non lasci il tuo DNA */
.dna-btn .dna-ico { filter: grayscale(0.85) opacity(0.55); transition: filter 0.18s var(--ease); }
.dna-btn:hover .dna-ico { filter: grayscale(0.2) opacity(0.85); }
.dna-on .dna-ico { filter: none; }

.dna-on { background: rgba(233,30,99,0.1); border-color: rgba(233,30,99,0.35); }
.dna-on:hover { background: rgba(233,30,99,0.16); }

.dna-count {
  font-size: 0.72rem; font-weight: 700; color: var(--text-dim);
  letter-spacing: 0.02em; min-width: 0.6rem; text-align: left;
}
.dna-on .dna-count { color: #AD1457; }

/* ===== COMMENTI ===== */
.commenti-barra {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin-top: 0.45rem; padding-top: 0.4rem; border-top: 1px dashed var(--border-soft);
}
.commenti-barra .pensiero-commenti { flex: 1 1 auto; min-width: 0; }
.commenti-barra .pensiero-share-btn { margin-left: auto; }
/* quando i commenti sono espansi, nascondi il pulsante condividi
   così i commenti tornano a larghezza intera */
.commenti-barra:has(.commenti-thread) .pensiero-share-btn { display: none; }

.commenti-toggle {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.72rem; font-weight: 700;
  color: var(--blue-dark); letter-spacing: 0.02em; padding: 0.15rem 0;
}
.commenti-toggle:hover { color: var(--blue); }
.commenti-toggle:hover span { text-decoration: underline; }
.commenti-ico { width: 14px; height: 14px; flex: 0 0 auto; }

.commenti-thread { animation: cardin 0.18s var(--ease); }

/* lista in stile guestbook/forum: cornice, righe a zebra e separatori tratteggiati */
.commenti-lista {
  margin-bottom: 0.6rem; background: var(--bg-panel);
  border: 1px solid var(--border-soft); border-radius: 6px;
  box-shadow: inset 0 1px 0 #fff;
}

.commento {
  display: flex; gap: 0.55rem; align-items: flex-start;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px dashed #c8d6e8;
}
.commento:last-child { border-bottom: none; border-radius: 0 0 5px 5px; }
.commento:first-child { border-radius: 5px 5px 0 0; }
.commento:nth-child(even) { background: #eef4fb; } /* zebra striping */

.commento-av { flex: 0 0 auto; }
.commento-av .avatar {
  width: 28px; height: 28px; font-size: 0.74rem;
  border-radius: 5px; /* avatar squadrato retrò, non tondo */
}

.commento-body { flex: 1; min-width: 0; }
.commento-head {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; color: var(--text-dim); margin-bottom: 0.15rem;
}
.commento-autore { color: var(--cyan); font-weight: 700; }
.commento-data { color: var(--text-dim); }
.commento-del {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--red); font-size: 1rem; line-height: 1; padding: 0 0.2rem;
}
.commento-del:hover { color: #a01f1f; }
.commento-testo {
  font-size: 0.84rem; line-height: 1.5; color: #333a43;
  white-space: pre-wrap; word-break: break-word;
}

.commenti-vuoto {
  font-size: 0.76rem; color: var(--text-dim); margin-bottom: 0.6rem;
  padding: 0.5rem 0.6rem; background: var(--bg-panel);
  border: 1px dashed var(--border-soft); border-radius: 6px; text-align: center;
}

.commento-form { display: flex; gap: 0.5rem; align-items: flex-start; }
.commento-form textarea {
  flex: 1; resize: vertical; min-height: 2.2rem; font-size: 0.84rem;
}

/* ===== USER LIST ===== */
.user-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.5rem 0.5rem; border-bottom: 1px solid var(--border-soft);
  font-size: 0.88rem; border-radius: 5px; transition: background 0.12s;
}
.user-row:hover { background: linear-gradient(#eef5fd, #e2eefb); }
.user-row:last-child { border-bottom: none; }
.username { color: var(--cyan); font-weight: 600; white-space: nowrap; flex: 0 0 auto; }
.username::before { content: '@'; color: #9aa7b4; font-weight: 400; }

/* ===== NOTIFICATIONS ===== */
.notif-row {
  padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--border-soft);
  font-size: 0.84rem; display: flex; gap: 0.75rem; align-items: center;
  border-radius: 5px; transition: background 0.12s; margin-bottom: 0.35rem;
}
.notif-row:hover { background: #f3f8fd; }
.notif-row.unread { background: linear-gradient(#eaf3fc, #ddeefb); border-left: 4px solid var(--blue); }
.notif-type {
  color: #44546a; text-transform: uppercase; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.04em; min-width: 96px; text-align: center;
  background: linear-gradient(#f6f9fc, #e6edf5);
  border: 1px solid #cfdae7; border-radius: 5px; padding: 0.18rem 0.4rem;
  box-shadow: inset 0 1px 0 #fff;
}
/* colori bordo per tipo notifica */
.notif-type[data-type="new_thought"]    { border-color: #7cb9e8; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #7cb9e840; }
.notif-type[data-type="new_follower"]   { border-color: #5db87a; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #5db87a40; }
.notif-type[data-type="dna"]            { border-color: #e07b39; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #e07b3940; }
.notif-type[data-type="new_comment"]    { border-color: #9b7de8; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #9b7de840; }
.notif-type[data-type="curious_request"]  { border-color: #e8c23a; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #e8c23a40; }
.notif-type[data-type="curious_accepted"] { border-color: #3ab8e8; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #3ab8e840; }
/* @username in grassetto arancione nei messaggi notifica */
.notif-row .notif-mention { color: #e07b39; font-weight: 700; }
/* notifica cliccabile: l'intero messaggio porta al pensiero/profilo collegato */
.notif-clickable { cursor: pointer; }
.notif-link { color: inherit; display: inline-block; }
.notif-clickable:hover { background: #eaf3fc; }
.notif-clickable:hover .notif-link { text-decoration: underline; }

/* notification count badge on nav */
.nav-notif-item { position: relative; }
.notif-count-slot {
  position: absolute; top: 3px; right: 4px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red);
  color: #fff;
  font-size: 0.58rem; font-weight: 700; line-height: 1;
  min-width: 15px; height: 15px; border-radius: 8px;
  padding: 0 3px;
  border: 1.5px solid rgba(255,255,255,0.85);
  box-shadow: 0 1px 3px rgba(150,0,0,0.4);
  letter-spacing: 0;
}

/* ===== COMMENTI: CHIUDI + CARICA ALTRI ===== */
.commenti-header {
  display: flex; justify-content: flex-end;
  margin-bottom: 0.3rem;
}
.commenti-chiudi {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.68rem; font-weight: 700;
  color: var(--text-dim); letter-spacing: 0.02em; padding: 0;
}
.commenti-chiudi:hover { color: var(--red); text-decoration: underline; }

.commenti-piu-wrap {
  padding: 0.3rem 0.6rem;
  border-top: 1px dashed var(--border-soft);
}
.commenti-piu-btn {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.7rem; font-weight: 700;
  color: var(--blue-dark); letter-spacing: 0.02em; padding: 0;
}
.commenti-piu-btn:hover { color: var(--blue); text-decoration: underline; }

/* ===== USER TOOLTIP / MINI CARD ===== */
.user-tooltip-wrap {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
}

.user-tooltip { display: inline; }

.user-tooltip > summary {
  list-style: none;
  display: inline;
  cursor: pointer;
}
.user-tooltip > summary::-webkit-details-marker { display: none; }
.user-tooltip > summary::marker { display: none; content: ''; }

.user-tooltip-card {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 200;
  min-width: 175px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 4px 14px rgba(30,50,80,0.2);
  padding: 0.5rem 0.6rem;
  animation: cardin 0.15s var(--ease);
  /* prevent clip on right edge */
  max-width: calc(100vw - 2rem);
}

.user-mini-inner {
  display: flex; gap: 0.55rem; align-items: center;
  text-decoration: none; color: inherit;
}
.user-mini-inner:hover .user-mini-handle { text-decoration: underline; }
.user-mini-inner:hover .user-mini-icon svg { border-color: var(--cyan); }

.user-mini-icon svg {
  width: 40px; height: 40px;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
  display: block;
  flex: none;
  image-rendering: pixelated;
}
.user-mini-icon img {
  width: 40px; height: 40px;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
  display: block;
  flex: none;
  object-fit: cover;
}
.user-mini-inner:hover .user-mini-icon img { border-color: var(--cyan); }

.user-mini-name {
  font-weight: 700; font-size: 0.82rem; color: var(--text); line-height: 1.3;
}
.user-mini-handle {
  font-size: 0.72rem; color: var(--cyan); font-weight: 600;
}

/* ===== EMPTY STATE ===== */
.empty { color: var(--text-dim); font-size: 0.88rem; padding: 1.1rem 0; }
.empty-hint { font-size: 0.78rem; color: #8c99a8; }

/* ===== DIVIDER ===== */
.divider { border: none; border-top: 1px solid var(--border-soft); margin: 1.25rem 0; }

/* ===== OAUTH ===== */
.oauth-sep {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 1rem 0 0.85rem; color: var(--text-dim);
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.oauth-sep::before, .oauth-sep::after {
  content: ""; flex: 1; border-top: 1px solid var(--border-soft);
}
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  text-decoration: none;
}
.btn-google:hover { text-decoration: none; }
.btn-google .google-icon { flex: 0 0 auto; display: block; }

/* ===== VERSION EDITOR ===== */
.version-list { margin-top: 0.75rem; }
.version-item {
  border: 1px solid var(--border-soft); border-radius: 6px;
  padding: 0.75rem; margin-bottom: 0.5rem; display: flex; gap: 1rem; align-items: flex-start;
  background: linear-gradient(180deg, #fff, #f6f9fd);
}
.version-audience { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; min-width: 100px; }
.version-content { flex: 1; font-size: 0.86rem; line-height: 1.5; }

/* ===== FOOTER STATUS BAR ===== */
.statusbar {
  border-top: 1px solid #8fabca;
  background: linear-gradient(180deg, #e9f0f8, #cfddee);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  margin-top: 2rem; padding: 0.55rem 0; font-size: 0.7rem; color: var(--text-dim);
}
.statusbar .container { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.statusbar .ok { color: #2e8b3d; }
.statusbar .sep { color: #9fb3ca; }

/* ===== AUTH SCREENS ===== */
.auth-tagline { color: #5a6a7c; font-size: 0.74rem; font-weight: 600; margin-top: 0.4rem; letter-spacing: 0.08em; }

/* ===== AVATAR & PRESENCE ===== */
.avatar-wrap { position: relative; display: inline-flex; vertical-align: middle; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 1px 2px rgba(30,50,80,0.2);
  font-size: 1rem;
}
.avatar-fallback {
  color: #fff; font-weight: 700; text-transform: uppercase;
  text-shadow: 0 1px 1px rgba(0,0,0,0.28);
}
/* avatar generato (identicon) come immagine profilo di default */
.avatar-identicon { overflow: hidden; padding: 0; }
.avatar-identicon svg {
  width: 100%; height: 100%; display: block;
  border-radius: inherit;
  image-rendering: pixelated;
}
.presence {
  position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid #fff; box-sizing: border-box;
}
.presence-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.presence-online  { background: #2e8b3d; }
.presence-away    { background: #e0a93a; }
.presence-busy    { background: #cc3333; }
.presence-offline { background: #9aa7b4; }

/* dimensioni per contesto (controllate dal genitore) */
.avatar-lg .avatar { width: 76px; height: 76px; font-size: 2rem; }
.avatar-lg .presence { width: 18px; height: 18px; }
.avatar-sm .avatar, .avatar-lg-sm .avatar { width: 30px; height: 30px; font-size: 0.85rem; }
.avatar-sm .presence, .avatar-lg-sm .presence { width: 9px; height: 9px; }

/* ===== PROFILE HEADER ===== */
.profile-header { display: flex; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.profile-id { flex: 1; min-width: 200px; }
.profile-name { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.profile-handle { color: var(--cyan); font-size: 0.9rem; font-weight: 600; }
.profile-presence { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--text-dim); margin-top: 0.5rem; flex-wrap: wrap; }
.profile-status { font-style: italic; color: #55657a; }
.profile-bio { margin-top: 0.75rem; font-size: 0.88rem; color: #3a4654; white-space: pre-wrap; word-break: break-word; }
.profile-meta { margin-top: 0.75rem; display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.74rem; color: var(--text-dim); }
.profile-meta a { overflow-wrap: anywhere; word-break: break-word; }
.profile-stats { margin-top: 0.8rem; display: flex; gap: 1.5rem; font-size: 0.82rem; color: var(--text-dim); }
.profile-stats strong { color: var(--blue-dark); font-size: 1.05rem; }
.profile-actions { margin-left: auto; }
.user-row-name { color: var(--text-dim); font-size: 0.8rem; white-space: nowrap; }
.user-row-bio {
  color: var(--text-dim); font-size: 0.8rem;
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== NAV AVATAR ===== */
.nav-me { display: inline-flex; align-items: center; }
.nav-me:hover { text-decoration: none; }
.status-text { font-style: italic; }

/* ===== SETTINGS ===== */
.settings-grid { display: flex; gap: 2rem; flex-wrap: wrap; }
.settings-preview { text-align: center; min-width: 120px; }
.settings-preview-name { margin-top: 0.6rem; font-weight: 700; }
.settings-form { flex: 1; min-width: 260px; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-hint { font-size: 0.72rem; color: #8c99a8; margin-top: 0.3rem; }
input:disabled, textarea:disabled {
  background: #eef2f7; color: #8c99a8; cursor: not-allowed;
  box-shadow: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  html { font-size: 13.5px; }
  :root { --panel-px: 1rem; --panel-py: 1rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .container { padding: 0 0.85rem; }

  /* niente zoom automatico su iOS quando un campo prende il focus (≥16px) */
  input[type="text"], input[type="email"], input[type="password"],
  textarea, select { font-size: 16px; }

  /* aree di tocco più generose */
  .btn { min-height: 40px; }
  .btn-sm { min-height: 36px; }
  .btn-curioso { min-height: 30px; }

  /* ---- header compatto in alto ---- */
  .nav-inner { gap: 0.5rem; flex-wrap: nowrap; }
  .site-title { font-size: 1.15rem; flex: 1 1 auto; min-width: 0; }
  .nav-actions { margin-left: auto; gap: 0.15rem; flex: none; }
  .nav-act, .nav-logout-btn {
    padding: 0; width: 40px; height: 40px;
    justify-content: center; border-radius: 8px;
  }
  .nav-act .nav-lbl, .nav-logout-btn .nav-lbl { display: none; }
  .nav-act .nav-ico, .nav-logout-btn .nav-ico { display: block; width: 22px; height: 22px; }

  /* ---- la nav principale diventa una tab bar fissa in basso ---- */
  .nav-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; gap: 0; flex-wrap: nowrap;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    background:
      linear-gradient(180deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0) 40%),
      linear-gradient(180deg, #5b96d8 0%, #3b7fc4 55%, #2f6cae 100%);
    border-top: 1px solid #234f84;
    box-shadow: 0 -2px 8px rgba(20,40,70,0.35), inset 0 1px 0 rgba(255,255,255,0.45);
  }
  .nav-item {
    flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px;
    padding: 0.45rem 0.2rem 0.4rem; border-radius: 0;
    min-height: 56px; justify-content: center; text-transform: lowercase;
  }
  .nav-item:hover { background: transparent; box-shadow: none; }
  .nav-item.is-active {
    background: rgba(255,255,255,0.16);
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.85);
  }
  .nav-item .nav-ico { display: block; width: 23px; height: 23px; }
  .nav-item .nav-lbl {
    display: block; font-size: 0.62rem; font-weight: 600;
    line-height: 1; letter-spacing: 0; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .nav-avatar .avatar { width: 23px; height: 23px; font-size: 0.7rem; }

  /* spazio in fondo per non finire sotto la tab bar */
  body:has(.nav-bar) { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }

  /* ---- aggiustamenti componenti ---- */
  .profile-header { gap: 1rem; }
  .profile-id { min-width: 0; }
  .profile-actions { margin-left: 0; width: 100%; margin-top: 0.5rem; }
  .profile-actions .btn { width: 100%; }

  .form-row { flex-direction: column; gap: 0; }

  .notif-row { flex-wrap: wrap; }
  .notif-row .notif-type { min-width: 0; }
  .notif-actions { margin-left: 0 !important; width: 100%; margin-top: 0.4rem; }

  .statusbar .container { gap: 0.5rem; font-size: 0.66rem; justify-content: center; }
  .status-hide-sm { display: none; }
}

/* ===== "COME FUNZIONA?" — banner del feed + modal ===== */
.help-banner-text { color: var(--text); font-size: 0.9rem; margin: 0; }
.help-banner-link {
  border: none; background: none; padding: 0; cursor: pointer;
  color: var(--cyan); font: inherit; font-weight: 700; text-decoration: underline;
}
.help-banner-link:hover { filter: brightness(1.1); }

.nav-act.nav-help {
  background: rgba(255,255,255,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.help-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
/* l'attributo hidden deve avere la precedenza su display:flex, altrimenti
   il modal resta sempre visibile e non si riesce a chiuderlo */
.help-modal[hidden] { display: none; }
.help-backdrop {
  position: absolute; inset: 0;
  background: rgba(20,40,70,0.45);
  backdrop-filter: blur(2px);
}
.help-dialog {
  position: relative;
  width: 100%; max-width: 460px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(20,40,70,0.4), inset 0 0 0 1px rgba(255,255,255,0.7);
  overflow: hidden;
  animation: help-pop 0.16s var(--ease);
}
@keyframes help-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.help-dialog .panel-title {
  margin: 0 0 1rem; display: flex; align-items: center; justify-content: space-between;
}
.help-close {
  border: none; background: none; cursor: pointer;
  color: #fff; font-size: 1.3rem; line-height: 1; padding: 0 0.2rem;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.help-close:hover { filter: brightness(1.15); }
.help-body { padding: 0 var(--panel-px); color: var(--text); font-size: 0.92rem; }
.help-body p { margin: 0 0 0.7rem; }
.help-body ul { margin: 0 0 0.7rem; padding-left: 1.1rem; }
.help-body li { margin-bottom: 0.35rem; }
.help-actions {
  display: flex; justify-content: flex-end;
  padding: 0.9rem var(--panel-px) 1.1rem;
}
body.help-open { overflow: hidden; }

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

.hidden { display: none !important; }

/* ===== PANEL TITLE BAR (titolo + azioni) ===== */
.panel-title-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0;
  border: 1px solid rgba(255,255,255,0.45); border-radius: 6px;
  background: rgba(255,255,255,0.18);
  color: #fff; cursor: pointer; line-height: 1;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  transition: background 0.12s, transform 0.04s, border-color 0.12s;
}
.share-btn:hover { background: rgba(255,255,255,0.32); border-color: rgba(255,255,255,0.7); }
.share-btn:active { transform: translateY(1px); }
.share-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* ===== ADMIN BADGE (bollino dorato scintillante) ===== */
.title-with-badge { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.admin-badge {
  display: inline-flex; align-items: center; gap: 0.3em;
  padding: 0.1em 0.6em;
  font-size: 0.72em; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase; white-space: nowrap;
  color: #5a3d00; text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  border: 1px solid #b8860b; border-radius: 999px;
  background: linear-gradient(110deg, #b8860b 0%, #ffd700 25%, #fff6c0 45%, #ffd700 60%, #d4a017 80%, #b8860b 100%);
  background-size: 200% 100%;
  box-shadow: 0 1px 3px rgba(120,80,0,0.45), inset 0 1px 1px rgba(255,255,255,0.6);
  animation: badge-shine 2.6s linear infinite;
}
@keyframes badge-shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .admin-badge { animation: none; } }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(20,35,55,0.45);
  backdrop-filter: blur(2px);
  animation: alertin 0.15s var(--ease);
}
.modal {
  width: 100%; max-width: 420px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: var(--panel-py) var(--panel-px);
  box-shadow: 0 8px 30px rgba(20,35,55,0.4), inset 0 0 0 1px rgba(255,255,255,0.7);
}
.modal .panel-title-bar {
  margin: calc(var(--panel-py) * -1) calc(var(--panel-px) * -1) var(--panel-py);
}
.modal-body label { margin-bottom: 0.35rem; }
.share-link-row { display: flex; gap: 0.5rem; align-items: stretch; }
.share-link-row input { flex: 1; min-width: 0; }
.share-link-row .btn { white-space: nowrap; }
.share-targets {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem;
}
.share-targets .btn { flex: 1 1 auto; text-align: center; }
.share-targets .btn:hover { text-decoration: none; }

/* ===== INVITI OSPITE (visitatori non autenticati) ===== */
.nav-actions-guest { display: flex; gap: 0.4rem; align-items: center; }
.nav-actions-guest .btn:hover { text-decoration: none; }

.guest-cta { text-align: center; padding: 0.5rem 0; }
.guest-cta p { margin: 0 0 0.6rem; }
.guest-cta p:first-child { font-weight: 700; color: var(--blue-dark); }
.guest-cta-actions { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.85rem; }
.guest-cta-actions .btn:hover { text-decoration: none; }

.commento-guest { margin-top: 0.6rem; }
.commento-guest .btn:hover { text-decoration: none; }
