/* Zaguaro · nero, lime #CCFF00, bianco caldo #F1EFEA. Rosso solo per «modifiche richieste». Testo grande, poco rumore. */
:root {
  --bg: #0A0A0A; --bg2: #141414; --bg3: #1E1E1E; --line: #2A2A2A;
  --fg: #F1EFEA; --mute: #A3A099; --lime: #CCFF00; --red: #FF3B30; --amber: #FFC94D; --blue: #8FB8FF;
  --radius: 18px; --sans: 'Inter Tight', system-ui, -apple-system, sans-serif; --serif: 'Instrument Serif', Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; font-weight: 800; letter-spacing: .04em; font-size: 30px; }
sup { font-size: .45em; font-weight: 500; }
code { font: 14px ui-monospace, Menlo, monospace; }

/* ---------- Struttura ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); padding: 26px 14px; display: flex; flex-direction: column; gap: 6px; }
.brand { font-weight: 800; font-size: 24px; letter-spacing: .03em; padding: 0 12px 22px; display: block; text-decoration: none; color: var(--fg); }
.brand em { font: italic 400 17px var(--serif); color: var(--mute); letter-spacing: 0; display: block; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: var(--mute); font-weight: 600; font-size: 18px; position: relative; }
.nav a:hover { color: var(--fg); background: var(--bg2); }
.nav a.on { color: var(--bg); background: var(--lime); }
.nav .ni { width: 22px; text-align: center; }
.col { min-width: 0; }
.top { display: flex; align-items: center; gap: 10px; padding: 16px clamp(16px, 4vw, 48px) 0; }
.brand-m { display: none; font-weight: 800; letter-spacing: .03em; font-size: 20px; text-decoration: none; color: var(--fg); }
.bell { position: relative; text-decoration: none; font-size: 20px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.bell .pill-n { position: absolute; top: -6px; right: -6px; }
.burger { width: 44px; height: 44px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); cursor: pointer; font-size: 20px; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: 52px; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 8px; min-width: 220px; z-index: 30; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.menu-pop a { display: block; padding: 11px 12px; border-radius: 10px; text-decoration: none; font-weight: 550; }
.menu-pop a:hover { background: var(--bg3); }
.menu-who { padding: 8px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-who b { display: block; } .menu-who span { color: var(--mute); font-size: 14px; }
/* Larghezza per funzione (una sola regola per tutte le pagine): testo 880, standard 1180, viste operative 1440.
   Il contenuto è centrato nello spazio a destra della barra laterale; la testata segue la stessa larghezza. */
.col { --page: 1180px; }
.col.wide { --page: 1440px; } .col.narrow { --page: 880px; }
.top, .main { max-width: var(--page); margin-inline: auto; width: 100%; }
.main { padding: 20px clamp(16px, 4vw, 48px) 110px; }
.pill-n { background: var(--lime); color: var(--bg); border-radius: 99px; font-size: 12px; font-weight: 800; padding: 1px 8px; margin-left: auto; }
.nav a.on .pill-n { background: var(--bg); color: var(--lime); }

/* ---------- Testi ---------- */
h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.02; margin: 0 0 8px; font-weight: 750; letter-spacing: -.025em; }
h1 em, h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
h2 { font-size: 24px; margin: 34px 0 14px; font-weight: 700; letter-spacing: -.015em; }
h2 em { font-size: .85em; color: var(--mute); }
h3 { font-size: 18px; margin: 0 0 10px; font-weight: 700; }
h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); margin: 14px 0 8px; }
.sub, .lead { color: var(--mute); margin: 0 0 22px; font-size: 19px; }
.lead b { color: var(--fg); }
.head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.muted { color: var(--mute); } .small { font-size: 15px; } .center { text-align: center; }
.urg { color: var(--amber); } .ok { color: var(--lime); }
.err { color: var(--red); min-height: 22px; margin: 4px 0 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; } .grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Elementi ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--bg2); padding: 12px 18px; border-radius: 14px; cursor: pointer; text-decoration: none; font-weight: 650; white-space: nowrap; transition: transform .12s; }
.btn:hover { border-color: #4a4a4a; } .btn:active { transform: scale(.97); }
.btn.lime { background: var(--lime); color: var(--bg); border-color: var(--lime); }
.btn.red { background: transparent; color: var(--red); border-color: var(--red); }
.btn.ghost { background: transparent; }
.btn.wa { background: #25D366; color: #06240f; border-color: #25D366; }
.btn.small { padding: 7px 12px; font-size: 15px; border-radius: 11px; }
.btn.huge { padding: 18px 28px; font-size: 20px; border-radius: 18px; }
.btn:disabled { opacity: .45; cursor: default; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g5 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat b { display: block; font-size: 38px; font-weight: 750; letter-spacing: -.02em; }
.stat span { color: var(--mute); } .stat em { display: block; font-style: normal; margin-top: 4px; }
.empty { color: var(--mute); padding: 22px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty p { margin: 0; }
pre.scheda { white-space: pre-wrap; font: 14px/1.5 ui-monospace, Menlo, monospace; background: var(--bg); padding: 14px; border-radius: 12px; border: 1px solid var(--line); max-height: 520px; overflow: auto; }
.tag { font-size: 14px; color: var(--mute); border: 1px solid var(--line); border-radius: 8px; padding: 2px 9px; display: inline-flex; align-items: center; gap: 5px; }
.tag.hot { color: var(--amber); border-color: var(--amber); }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--c, var(--lime)); flex: none; }
.av { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c, var(--lime)); color: #0A0A0A; font-weight: 800; font-size: 14px; flex: none; }
.av[data-size="30"] { width: 30px; height: 30px; font-size: 11px; } .av[data-size="32"] { width: 32px; height: 32px; font-size: 12px; }
.av[data-size="34"] { width: 34px; height: 34px; } .av[data-size="38"] { width: 38px; height: 38px; }
.av[data-size="42"] { width: 42px; height: 42px; } .av[data-size="46"] { width: 46px; height: 46px; font-size: 16px; } .av[data-size="52"] { width: 52px; height: 52px; font-size: 18px; }
.emoji-av { font-size: 28px; width: 38px; text-align: center; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic .fill { fill: currentColor; stroke: none; }

/* Form */
label { display: block; font-size: 13px; color: var(--mute); margin: 0 0 6px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
input, select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none; font-size: 17px; }
input:focus, select:focus, textarea:focus { border-color: var(--lime); }
textarea { resize: vertical; }
.field { margin-bottom: 16px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 16px; color: var(--fg); text-transform: none; letter-spacing: 0; font-weight: 500; cursor: pointer; }
.check input { width: auto; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters > * { width: auto; min-width: 170px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { margin: 0; text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--fg); cursor: pointer; }
.seg input { display: none; }
.seg span { display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; }
.seg input:checked + span { background: var(--lime); color: var(--bg); border-color: var(--lime); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--mute); font-weight: 600; text-transform: capitalize; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Stati */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.st::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st.bozza { color: var(--mute); } .st.da_approvare { color: var(--amber); }
.st.modifiche_richieste { color: var(--red); border-color: var(--red); }
.st.approvato { color: var(--lime); } .st.pubblicato { color: var(--blue); }

/* ---------- Home «La tua giornata» ---------- */
.hero { display: flex; gap: 22px; align-items: center; margin-bottom: 18px; }
.hero .lead { margin-bottom: 14px; }
.duo { display: flex; align-items: flex-end; }
.duo .char + .char { margin-left: -14px; }
.char { animation: bob 3.2s ease-in-out infinite; transform-origin: bottom center; }
.char-samu { animation-delay: -1.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.char.mood-wow { animation: hop .9s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px) rotate(-3deg); } }
.prog { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.prog-bar { width: 220px; height: 12px; border-radius: 99px; background: var(--bg3); overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: var(--lime); border-radius: 99px; transition: width .6s; }
.now-card { margin-bottom: 14px; } .now-card h2 { margin: 0; }
[data-u="m0"] { margin: 0; }
.now-item { display: flex; gap: 12px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.now-item:last-child { border: 0; }
.now-item b { display: block; font-size: 18px; }
.now-item.p-alta b::after { content: ' ●'; color: var(--amber); font-size: 12px; vertical-align: 3px; }
.now-item.late .muted { color: var(--amber); }
.now-item i { color: var(--mute); }
.tick.big { width: 36px; height: 36px; border-width: 2.5px; flex: none; }
.tick.done { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--bg); font-weight: 800; }
.block-card { border-color: var(--amber); margin-bottom: 14px; }
.cold.risk { border-color: var(--amber); }
.agenda { margin-bottom: 18px; }
.agenda-bar { position: relative; height: 44px; margin-top: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.agenda-bar .hr { position: absolute; top: -2px; font-size: 11px; color: var(--mute); transform: translateX(-50%); }
.agenda-bar .brk { position: absolute; top: 16px; bottom: 4px; background: repeating-linear-gradient(45deg, #262626 0 6px, #1b1b1b 6px 12px); border-radius: 6px; font-size: 11px; color: var(--mute); display: grid; place-items: center; overflow: hidden; }
.agenda-bar .pin { position: absolute; top: 18px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--lime); border: 2px solid var(--bg); }
.agenda-bar .pin.p-alta { background: var(--amber); }
.agenda-bar .now { position: absolute; top: 12px; bottom: 0; width: 2px; background: var(--fg); }
.lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; margin-bottom: 8px; }
.lane { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.lane-h { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.lane-h b { display: block; font-size: 18px; } .lane-h .small { display: block; }
.lane-empty { display: flex; align-items: center; gap: 10px; color: var(--mute); padding: 14px 0; }
.bucket.late h4 { color: var(--amber); }
.todo { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; align-items: start; padding: 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 8px; border-left: 4px solid var(--line); transition: opacity .3s, transform .3s; }
.todo.p-alta { border-left-color: var(--amber); } .todo.p-normale { border-left-color: var(--lime); } .todo.p-bassa { border-left-color: #555; }
.todo.done { opacity: 0; transform: translateX(30px); }
.todo-t { text-decoration: none; font-weight: 650; grid-column: 2; }
.todo-m { grid-column: 2; color: var(--mute); font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tick { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--mute); background: none; cursor: pointer; color: transparent; font-weight: 800; }
.tick:hover:not(:disabled) { border-color: var(--lime); color: var(--lime); }
.auto { grid-row: span 2; width: 30px; text-align: center; color: var(--lime); }
.cold { padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; }
.list { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Clienti ---------- */
.client-card { text-decoration: none; display: block; border-top: 4px solid var(--c, var(--lime)); }
.client-card .n { font-size: 21px; font-weight: 700; }
.acc { padding: 10px 0; border-bottom: 1px solid var(--line); }

/* ---------- Anteprime social (card) ---------- */
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pv { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .15s, border-color .15s; }
.pv:hover { transform: translateY(-3px); border-color: #444; }
.pv-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px; font-size: 15px; }
.pv-media { position: relative; aspect-ratio: 4 / 5; background: var(--bg3); }
.pv-media img, .pv-media video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.pv-media.tall, .ph-media.tall, .sw-media.tall { aspect-ratio: 9 / 16; }
.pv-n { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); padding: 2px 8px; border-radius: 99px; font-size: 12px; }
.pv-empty { height: 100%; display: grid; place-items: center; color: var(--mute); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; }
.pv-empty.big { min-height: 300px; }
.pv-body { padding: 12px 14px 4px; }
.pv-title { font-weight: 700; }
.pv-cap { color: var(--mute); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pv-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 14px; font-size: 14px; color: var(--mute); margin-top: auto; }

/* ---------- Dettaglio contenuto (telefono) ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 420px) minmax(320px, 1fr); gap: 28px; align-items: start; }
.phone { background: #000; border: 1px solid var(--line); border-radius: 30px; overflow: hidden; max-width: 420px; }
.ph-head { display: flex; gap: 8px; align-items: center; padding: 12px 14px; font-size: 15px; }
.ph-media { position: relative; aspect-ratio: 4 / 5; background: var(--bg3); }
.ph-slide { position: absolute; inset: 0; display: none; } .ph-slide.on { display: block; }
.ph-slide img, .ph-slide video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.ph-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: #000; font-size: 22px; cursor: pointer; }
.ph-nav.prev { left: 8px; } .ph-nav.next { right: 8px; }
.ph-dots { position: absolute; bottom: 10px; width: 100%; display: flex; justify-content: center; gap: 5px; }
.ph-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.4); } .ph-dots i.on { background: #fff; }
.ph-acts { padding: 10px 14px 4px; font-size: 20px; }
.ph-cap { padding: 0 14px 6px; font-size: 15px; white-space: pre-wrap; }
.ph-when { padding: 0 14px 14px; color: var(--mute); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.mark { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; border: 3px solid var(--red); background: rgba(255,59,48,.25); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; pointer-events: none; }
.mark-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--red); color: var(--red); font-size: 12px; margin-right: 6px; }
.warn-card { border-color: var(--amber); }
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media figure { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.media img, .media video { width: 100%; aspect-ratio: 1; object-fit: contain; background: #000; display: block; }
.media figcaption { font-size: 12px; padding: 6px 8px; display: flex; gap: 6px; justify-content: space-between; color: var(--mute); }
.media figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop { border: 2px dashed var(--line); border-radius: 16px; padding: 22px; text-align: center; color: var(--mute); cursor: pointer; }
.drop.over { border-color: var(--lime); color: var(--lime); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button { background: none; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; cursor: pointer; color: var(--mute); font-size: 14px; }
.tabs button.on { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; font-size: 15px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--mute); }
.timeline li.modifiche_richieste::before { background: var(--red); } .timeline li.approvato::before { background: var(--lime); }
.timeline .note { margin-top: 2px; }
.thread { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.composer { display: flex; gap: 8px; align-items: flex-end; } .composer textarea { flex: 1; }

/* ---------- Chat stile WhatsApp ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 460px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-head b { display: block; } .chat-head span { display: block; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: radial-gradient(circle at 20% 0%, #151a08, transparent 50%), var(--bg); }
.chat-empty { margin: auto; text-align: center; color: var(--mute); max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bubble { max-width: min(78%, 520px); padding: 10px 13px; border-radius: 18px; background: var(--bg3); align-self: flex-start; font-size: 16px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { background: #2b3a00; align-self: flex-end; border-bottom-right-radius: 6px; }
.bubble.them { border-bottom-left-radius: 6px; }
.bubble.ai { border: 1px dashed var(--lime); }
.bubble.idea { box-shadow: inset 3px 0 0 var(--amber); }
.bubble.internal { border: 1px dashed var(--mute); background: #15160f; }
.bubble .who { font-size: 12px; color: var(--lime); font-weight: 700; margin-bottom: 2px; }
.bubble .t { font-size: 11px; color: var(--mute); text-align: right; margin-top: 4px; }
.bubble img, .bubble video { max-width: 100%; border-radius: 12px; display: block; margin-bottom: 4px; }
.bubble audio { width: 240px; max-width: 100%; }
.chat-quick { display: flex; gap: 8px; padding: 10px 12px 0; overflow-x: auto; }
.chat-quick button { flex: none; background: var(--bg3); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; cursor: pointer; font-size: 15px; }
.chat-in { display: flex; gap: 8px; align-items: flex-end; padding: 12px; }
.chat-in textarea { flex: 1; border-radius: 22px; padding: 12px 16px; max-height: 140px; }
.ic-btn { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--bg3); cursor: pointer; font-size: 18px; }
.ic-btn.send { background: var(--lime); color: var(--bg); border-color: var(--lime); }
#mic.rec { background: var(--red); border-color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.chat-row { padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; flex-wrap: nowrap; }

/* ---------- Cliente ---------- */
.c-hero { text-align: center; padding: 28px 10px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.c-greet { font: italic 400 24px/1.3 var(--serif); max-width: 560px; margin: 4px 0; }
.c-lead { font-size: 22px; margin: 8px 0 14px; }
.c-msg { display: flex; flex-direction: column; text-decoration: none; border-color: var(--lime); }
.c-next { padding: 14px 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; }
.c-tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; font-size: 26px; }
.c-tile b { font-size: 19px; } .c-tile span { font-size: 15px; color: var(--mute); }

/* Swipe */
.deck-wrap { max-width: 460px; margin: 0 auto; }
.deck-top { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.deck { position: relative; min-height: 560px; }
.sw-media.tall { max-height: 62vh; aspect-ratio: auto; height: 62vh; }
.sw-media.tall .sw-slide img, .sw-media.tall .sw-slide video { height: 100%; }
.sw-card { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; touch-action: none; user-select: none; transition: transform .25s ease, opacity .25s; cursor: grab; }
.sw-card.dragging { transition: none; cursor: grabbing; }
.sw-card.fly-right { transform: translateX(140%) rotate(18deg) !important; opacity: 0; }
.sw-card.fly-left { transform: translateX(-140%) rotate(-18deg) !important; opacity: 0; }
.sw-media { position: relative; aspect-ratio: 4 / 5; background: var(--bg3); }
.sw-slide { position: absolute; inset: 0; display: none; } .sw-slide.on { display: block; }
.sw-slide img, .sw-slide video { width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }
.stamp { position: absolute; top: 24px; padding: 6px 14px; border: 4px solid; border-radius: 10px; font-weight: 900; font-size: 24px; letter-spacing: .05em; opacity: 0; transition: opacity .1s; background: rgba(0,0,0,.4); }
.stamp.yes { left: 20px; color: var(--lime); transform: rotate(-12deg); }
.stamp.no { right: 20px; color: var(--red); transform: rotate(12deg); }
.stamp.note { left: 50%; top: auto; bottom: 24px; transform: translateX(-50%); color: var(--amber); }
.sw-card.hint-yes .stamp.yes, .sw-card.hint-no .stamp.no, .sw-card.hint-note .stamp.note { opacity: 1; }
.sw-info { padding: 14px 18px 18px; }
.sw-when { display: flex; gap: 6px; align-items: center; color: var(--lime); font-size: 17px; }
.sw-info h3 { font-size: 21px; margin: 8px 0 4px; }
.sw-cap { color: var(--mute); margin: 0; white-space: pre-wrap; max-height: 150px; overflow: auto; }
.deck-btns { display: flex; justify-content: center; gap: 22px; margin-top: 18px; }
.round { width: 70px; height: 70px; border-radius: 50%; border: 2px solid; background: var(--bg2); font-size: 28px; cursor: pointer; display: inline-grid; place-items: center; transition: transform .12s; }
.round:active { transform: scale(.9); }
.round.yes { color: var(--lime); border-color: var(--lime); } .round.no { color: var(--red); border-color: var(--red); }
.round.note { color: var(--amber); border-color: var(--amber); width: 56px; height: 56px; font-size: 22px; align-self: center; }
.deck-legend { display: flex; justify-content: space-between; color: var(--mute); font-size: 14px; margin-top: 10px; }
.deck-end { text-align: center; padding: 60px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
dialog.help .help-in { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.help-row { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; }
.help-row b { display: block; } .help-row span { color: var(--mute); font-size: 15px; }
.help-row .round { width: 52px; height: 52px; font-size: 20px; flex: none; }
.mark-area { position: relative; margin-bottom: 14px; }
.mark-area img { width: 100%; border-radius: 14px; display: block; cursor: crosshair; }

/* Festa */
.party { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; background: rgba(0,0,0,.35); animation: fadein .2s; transition: opacity .35s; }
.party.out { opacity: 0; }
.party-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 26px; padding: 22px 30px; text-align: center; animation: popin .35s cubic-bezier(.2, 1.6, .5, 1); }
.party-box p { margin: 8px 0 0; font-size: 22px; font-weight: 750; }
.party.sad .party-box p { color: var(--mute); }
.cf { position: absolute; top: -10px; width: 9px; height: 14px; background: var(--lime); animation: fall 1.4s ease-in forwards; }
.cf:nth-child(3n) { background: var(--fg); } .cf:nth-child(4n) { background: var(--amber); animation-duration: 1.7s; } .cf:nth-child(5n) { animation-delay: .15s; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); } }
@keyframes popin { from { transform: scale(.6); opacity: 0; } }
@keyframes fadein { from { opacity: 0; } }

/* Analitiche */
.bar-row { display: grid; grid-template-columns: 14px 170px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; }
.bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 12px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--c, var(--lime)); border-radius: 99px; }

/* Calendario */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal .dh { padding: 10px; font-size: 13px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; background: var(--bg2); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 128px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; position: relative; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: #0d0d0d; color: #555; }
.cal .day.today .num { background: var(--lime); color: var(--bg); }
.cal .num { font-size: 13px; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal .add { position: absolute; top: 6px; right: 8px; color: var(--mute); text-decoration: none; opacity: 0; }
.cal .day:hover .add { opacity: 1; }
.cal.week .day { min-height: 360px; }
.ev { display: flex; gap: 4px; align-items: center; font-size: 13px; text-decoration: none; padding: 5px 7px; border-radius: 8px; background: var(--bg3); border-left: 3px solid var(--c, var(--lime)); line-height: 1.25; overflow: hidden; }
.ev .ic { width: 13px; height: 13px; flex: none; }
.ev .h { color: var(--mute); }
.ev.modifiche_richieste { box-shadow: inset 0 0 0 1px var(--red); } .ev.bozza { opacity: .6; }
.ev.task { background: transparent; border: 1px dashed var(--line); border-left: 3px solid var(--c, var(--fg)); }
.ev.task.done { opacity: .45; text-decoration: line-through; }
.agenda-list { display: none; }

/* Notifiche, tabelle, sistema */
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.notif.unread { background: #141a05; }
.notif .when { color: var(--mute); font-size: 13px; white-space: nowrap; margin-left: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
td select { min-width: 110px; padding: 6px 10px; }
.table-wrap { overflow-x: auto; }
.code { font: 14px ui-monospace, Menlo, monospace; background: var(--bg); border: 1px solid var(--lime); border-radius: 12px; padding: 12px; word-break: break-all; }
.steps { margin: 6px 0 0; padding-left: 20px; color: var(--mute); font-size: 14px; }
details summary { cursor: pointer; padding: 6px 0; }
.outbox details { border-bottom: 1px solid var(--line); }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-pick button { font-size: 26px; width: 52px; height: 52px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); cursor: pointer; }
.emoji-pick button.on { border-color: var(--lime); background: #1b2205; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.2fr 1fr; }
.login .art { background: var(--lime); color: var(--bg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.login .art .w { font-size: clamp(52px, 8vw, 110px); font-weight: 800; letter-spacing: -.02em; line-height: .9; }
.login .art p { font: italic 400 clamp(24px, 2.8vw, 36px)/1.15 var(--serif); max-width: 520px; margin: 0; }
.login form { padding: 48px; display: flex; flex-direction: column; justify-content: center; max-width: 480px; width: 100%; margin: 0 auto; }

#toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 650; opacity: 0; pointer-events: none; transition: .2s; z-index: 70; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { background: var(--red); color: #fff; }
#toast.act { pointer-events: auto; display: flex; align-items: center; gap: 12px; }
#toast button { background: none; border: 0; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; padding: 6px 2px; min-height: 36px; }
/* To-do: al tocco la riga risponde subito («salvo…»), diventa «fatta» solo quando il server ha salvato */
[data-tid].saving { opacity: .55; pointer-events: none; }
[data-tid].saving .tick { border-color: var(--lime); border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.now-item.done, .done-row.done { opacity: .4; } .now-item.done b { text-decoration: line-through; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.linkish:hover { color: var(--lime); }
@media (hover: none) { .tick { color: var(--mute); } }
dialog { background: var(--bg2); color: var(--fg); border: 1px solid var(--line); border-radius: 22px; padding: 24px; max-width: 540px; width: calc(100vw - 32px); max-height: 90vh; }
dialog::backdrop { background: rgba(0,0,0,.72); }
dialog h2 { margin-top: 0; }

/* utilità (la CSP vieta gli attributi style) */
[data-u="mt8"] { margin-top: 8px; } [data-u="mt10"] { margin-top: 10px; } [data-u="mt12"] { margin-top: 12px; } [data-u="mt14"] { margin-top: 14px; }
[data-u="p0"] { padding: 0; } [data-u="mb6"] { margin-bottom: 6px; } [data-u="w260"] { max-width: 260px; }

.agenda-day { margin-bottom: 18px; }
.agenda-day h4 { margin: 0 0 8px; }
.agenda-day.today h4 { color: var(--lime); }
.ag-item { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; margin-bottom: 8px; }
.ag-item b { display: block; }
.ag-thumb { width: 48px; height: 60px; border-radius: 8px; background: var(--bg3) center/cover; flex: none; }
.agenda-list .ev.task { margin-bottom: 6px; padding: 8px 10px; font-size: 14px; }

/* ---------- Telefono ---------- */
@media (max-width: 860px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .filters { gap: 8px; }
  .filters > * { min-width: 0; flex: 1 1 45%; }
  .filters input[name="q"] { flex-basis: 100%; }
  .head .actions { width: 100%; }
  .head .actions .btn { flex: 1; }
  h1 { font-size: 32px; }
  .hero .duo .char { width: 52px; height: 52px; }
  .lanes { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; top: auto; height: auto; width: 100%; padding: 6px 6px max(8px, env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 20; background: rgba(10,10,10,.96); backdrop-filter: blur(10px); }
  .side .brand { display: none; }
  .nav { flex-direction: row; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 2px; font-size: 12px; padding: 8px 6px; flex: 1; }
  .nav .ni { font-size: 20px; }
  .nav .pill-n { position: absolute; top: 2px; right: 18%; margin: 0; }
  .brand-m { display: block; }
  .top { padding: 12px 16px 0; }
  .main { padding: 14px 16px 120px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .detail { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login .art { padding: 28px; }
  .login form { padding: 28px 16px; }
  .cal { display: none; }
  .agenda-list { display: grid; }
  .chat { height: calc(100vh - 210px); }
  .bar-row { grid-template-columns: 14px 1fr auto; } .bar-row .bar { grid-column: 1 / -1; }
  .pv-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pv-body, .pv-foot { padding-left: 10px; padding-right: 10px; }
  .deck { min-height: 0; }
  .round { width: 64px; height: 64px; }
}
@media (max-width: 420px) { .pv-grid { grid-template-columns: 1fr; } }

/* ---------- v0.10 · to-do per cliente, versioni dei file, ospiti, prossimi passi ---------- */
.todo-c { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 400; color: var(--fg); }
.todo-c:last-of-type { border-bottom: 0; }
.todo-c input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--lime); flex: none; }
.todo-c.late b { color: var(--amber); }
.todo-c.done { opacity: .45; text-decoration: line-through; }
#f-ctask input[type="date"], #f-ctask select { max-width: 160px; }
.ver { display: inline-block; background: var(--lime); color: var(--bg); font-size: 12px; font-weight: 800; border-radius: 6px; padding: 1px 6px; }
.ver.old { background: var(--bg3); color: var(--mute); }
.ver-up { color: var(--lime); text-decoration: none; font-weight: 600; }
.ver-note { margin: 4px 0 0; }
.vers { margin-top: 10px; } .vers summary { cursor: pointer; color: var(--mute); }
.media figcaption .row a { padding: 6px 8px; min-height: 36px; display: inline-flex; align-items: center; }
.g-step b { display: block; font-size: 20px; margin-bottom: 6px; }
.client-card { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.client-card.full { display: block; }
.roadmap h2 { margin: 24px 0 10px; font-size: 22px; } .roadmap h3 { margin: 18px 0 8px; } .roadmap h4 { margin: 14px 0 6px; }
.roadmap p, .roadmap li { font-size: 16px; } .roadmap ul, .roadmap ol { padding-left: 22px; }
.roadmap ul.checks { list-style: none; padding-left: 0; }
.roadmap ul.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; }
.roadmap .box { flex: none; width: 20px; height: 20px; border: 2px solid var(--mute); border-radius: 6px; font-size: 13px; line-height: 16px; text-align: center; color: var(--bg); margin-top: 3px; }
.roadmap li.done .box { background: var(--lime); border-color: var(--lime); } .roadmap li.done { color: var(--mute); }
.roadmap table { width: 100%; border-collapse: collapse; font-size: 15px; } .roadmap th, .roadmap td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.roadmap code { background: var(--bg3); padding: 1px 6px; border-radius: 6px; }
@media (max-width: 760px) {
  #f-ctask { flex-direction: column; align-items: stretch; } #f-ctask input[type="date"], #f-ctask select { max-width: none; }
  .media figcaption { flex-direction: column; align-items: flex-start; gap: 4px; }
}
.media { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.media figcaption { flex-wrap: wrap; } .media figcaption span.row { white-space: normal; gap: 2px; }

/* ---------- v0.11 · brief e materiali ---------- */
.mat-list { display: flex; flex-direction: column; gap: 10px; }
.mat { display: flex; gap: 14px; align-items: flex-start; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.mat-pv { flex: none; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--bg3); display: grid; place-items: center; }
.mat-pv img, .mat-pv video { width: 100%; height: 100%; object-fit: cover; }
.mat-ic { font-size: 34px; }
.mat-sum { margin: 6px 0 0; white-space: pre-wrap; }
.mat .tag.ok { color: var(--lime); border-color: var(--lime); }
.dot.big { width: 18px; height: 18px; }
@media (max-width: 760px) { .mat { flex-direction: column; } .mat-pv { width: 100%; height: 160px; } }

/* ---------- v0.12 · bozze dai brief ---------- */
.prop { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.prop.done { opacity: .4; }
.prop-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prop-k { font-size: 18px; width: 28px; text-align: center; }
.prop-h select { width: auto; padding: 4px 8px; font-size: 14px; }
.prop-t { font-weight: 700; font-size: 17px; }
.prop .row.small select, .prop .row.small input { width: auto; font-size: 14px; padding: 6px 8px; }
.prop-src { margin: 0; font-style: italic; }
.tag.red { color: var(--red); border-color: var(--red); } .tag.ok { color: var(--lime); border-color: var(--lime); }
@media (max-width: 760px) { .prop .row.small { flex-direction: column; align-items: stretch; } .prop .row.small select, .prop .row.small input { width: 100%; } }

/* Rete lenta: barra sottile in alto (dopo 400 ms di attesa) */
#netbar { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 90; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: linear-gradient(90deg, transparent, var(--lime), transparent); background-size: 40% 100%; background-repeat: no-repeat; }
#netbar.on { opacity: 1; animation: netbar 1s linear infinite; }
@keyframes netbar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.more-btn { width: 100%; margin-top: 2px; }
/* Telefono: la home mostra subito «Da fare ora» (prima servivano due schermate di saluto e bottoni) */
@media (max-width: 860px) {
  .hero { flex-direction: row; align-items: center; gap: 12px; margin-bottom: 12px; }
  .hero .duo .char { width: 38px; height: 38px; }
  .hero h1 { font-size: 26px; margin-bottom: 4px; }
  .hero .lead { display: none; }
  .hero .prog { margin-bottom: 10px; gap: 8px; } .hero .prog-bar { width: 120px; height: 8px; }
  .hero > div:last-child { min-width: 0; flex: 1; }
  .hero .row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .hero .row .btn { padding: 9px 4px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center; }
  /* «Da fare ora» e «Bloccanti»: il bottone va sotto il testo, il titolo usa tutta la riga */
  .now-item { flex-wrap: wrap; }
  .now-item .grow { flex: 1 1 calc(100% - 52px); min-width: 0; }
  .now-item > .btn, .now-item > .tag { margin-left: 48px; }
}

/* v0.15 · Testata fissa: campanella, chat e menù restano in alto mentre scorri; il logo riporta alla home */
.top { position: sticky; top: 0; z-index: 25; padding-bottom: 12px; background: rgba(10,10,10,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* Menù a tendina: freccia disegnata, centrata in verticale e staccata dal bordo (prima era quella del sistema, sul bordo) */
select { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23A9A9A0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px; }
td select, .prop-h select, .prop .row.small select { padding-right: 32px; background-position: right 10px center; }
.todo-c.waiting { opacity: .8; } .wait-note { color: var(--amber); margin-top: 4px; }
.todo-acts { display: block; margin-top: 6px; } .todo-acts select { width: auto; padding: 6px 32px 6px 10px; font-size: 14px; background-position: right 10px center; }
.trow { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); } .trow:last-child { border-bottom: 0; }
.trow .grow b { display: block; font-weight: 600; } .trow select { width: auto; max-width: 46%; padding: 6px 32px 6px 10px; font-size: 14px; background-position: right 10px center; }
.load-bar { height: 6px; border-radius: 9px; background: var(--bg3); margin: 8px 0 4px; overflow: hidden; } .load-bar i { display: block; height: 100%; background: var(--lime); }
.link-stat { text-decoration: none; color: inherit; font: inherit; text-align: left; cursor: pointer; width: 100%; } .link-stat:hover { border-color: var(--lime); }

/* v0.15 · Clienti: tre gruppi e card che rappresentano il cliente (colore, ultima immagine, numeri utili) */
.cgroup { margin-bottom: 26px; } .cgroup h2 { margin-bottom: 2px; } .cgroup .sub { margin-bottom: 12px; }
.cgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ccard { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, border-color .15s; }
.ccard:hover { transform: translateY(-2px); border-color: var(--c, var(--lime)); }
.ccard-top { position: relative; height: 128px; background-color: var(--c, var(--lime)); background-size: cover; background-position: center;
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--c, #CCFF00) 85%, #000) 0%, color-mix(in srgb, var(--c, #CCFF00) 35%, #000) 100%); }
.ccard-top[data-bg] { background-color: #111; }
.ccard-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.75)); }
.ccard-top .av { position: absolute; left: 16px; bottom: -24px; border: 3px solid var(--bg2); }
.ccard-b { padding: 32px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.ccard .n { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.ccard-n { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--mute); } .ccard-n b { color: var(--fg); font-size: 17px; } .ccard-n .hot b { color: var(--amber); }
.ccard .st-line { margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ccard.potenziale .ccard-top { height: 96px; } .ccard.archivio { opacity: .85; } .ccard.archivio .ccard-top { height: 72px; filter: grayscale(.8); }
.ccard .why { margin: 4px 0 0; color: var(--fg); }
.av[data-size="54"] { width: 54px; height: 54px; font-size: 18px; }
.av-logo { background: #fff; overflow: hidden; } .av-logo img { width: 78%; height: 78%; object-fit: contain; }

/* v0.15 · Archivio foto e video */
.arc-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.arc { margin: 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; border-top: 3px solid var(--c, var(--line)); }
.arc-pv { position: relative; display: block; aspect-ratio: 4 / 5; background: #000; }
.arc-pv img, .arc-pv video { width: 100%; height: 100%; object-fit: cover; display: block; }
.arc-play { position: absolute; right: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; font-size: 12px; }
.arc figcaption { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.arc figcaption b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
.arc .share { display: inline-flex; gap: 6px; align-items: center; margin: 0; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--fg); font-weight: 500; }
.arc .share input { width: 18px; height: 18px; accent-color: var(--lime); }
@media (max-width: 860px) { .arc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .nav a { padding: 8px 2px; font-size: 11px; } }
.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.trow > b { white-space: nowrap; }
.fee-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; } .fee-grid .fee-note { grid-column: span 2; }
@media (max-width: 760px) { .fee-grid .fee-note { grid-column: auto; } }
/* Approva a swipe anche col mouse: niente selezione di testo né trascinamento dell'immagine */
.sw-card { -webkit-user-select: none; user-select: none; touch-action: none; cursor: grab; } .sw-card.dragging { cursor: grabbing; }
.sw-card img, .sw-card video { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
.day a.num { text-decoration: none; color: inherit; display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; }
.day a.num:hover { background: var(--lime); color: var(--bg); }

/* v0.17 · Scenetta del cactus (8 s): Samu va al cactus, si punge e piange; za ride; piangono insieme; poi tornano felici */
.scene { position: relative; display: flex; align-items: flex-end; gap: 2px; cursor: pointer; flex: none; }
.scene .sc-za, .scene .sc-samu { position: relative; display: inline-block; }
.scene .sc-za .char, .scene .sc-samu .char { display: block; } .scene .sc-za .char + .char, .scene .sc-samu .char + .char { position: absolute; left: 0; bottom: 0; opacity: 0; }
.scene .cactus { margin-left: 6px; }
.scene .sc-ouch, .scene .sc-ah { position: absolute; top: -6px; font: 800 12px/1 var(--sans, system-ui); padding: 3px 6px; border-radius: 8px; opacity: 0; pointer-events: none; }
.scene .sc-ouch { right: 0; background: #fff; color: #111; } .scene .sc-ah { left: 0; background: var(--lime); color: #111; }
.scene.play .sc-samu { animation: sc-walk 8s ease-in-out both; }
.scene.play .sc-za { animation: sc-bounce 8s ease-in-out both; }
.scene.play .sc-samu .char:nth-child(1) { animation: sc-ok 8s both; } .scene.play .sc-samu .char:nth-child(3) { animation: sc-samu-sad 8s both; }
.scene.play .sc-za .char:nth-child(1) { animation: sc-za-ok 8s both; } .scene.play .sc-za .char:nth-child(2) { animation: sc-za-laugh 8s both; } .scene.play .sc-za .char:nth-child(3) { animation: sc-za-sad 8s both; }
.scene.play .sc-ouch { animation: sc-ouch 8s both; } .scene.play .sc-ah { animation: sc-ah 8s both; }
@keyframes sc-walk { 0%, 5% { transform: none; } 22%, 70% { transform: translateX(18px); } 88%, 100% { transform: translateX(-6px); } }
@keyframes sc-bounce { 0%, 30% { transform: none; } 33% { transform: translateY(-6px); } 36% { transform: none; } 39% { transform: translateY(-6px); } 42%, 80% { transform: none; } 88%, 100% { transform: translateX(6px); } }
@keyframes sc-ok { 0%, 24% { opacity: 1; } 25%, 80% { opacity: 0; } 82%, 100% { opacity: 1; } }
@keyframes sc-samu-sad { 0%, 24% { opacity: 0; } 25%, 80% { opacity: 1; } 82%, 100% { opacity: 0; } }
@keyframes sc-za-ok { 0%, 28% { opacity: 1; } 29%, 80% { opacity: 0; } 82%, 100% { opacity: 1; } }
@keyframes sc-za-laugh { 0%, 28% { opacity: 0; } 29%, 46% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes sc-za-sad { 0%, 46% { opacity: 0; } 47%, 80% { opacity: 1; } 82%, 100% { opacity: 0; } }
@keyframes sc-ouch { 0%, 23% { opacity: 0; transform: translateY(4px); } 25%, 40% { opacity: 1; transform: none; } 44%, 100% { opacity: 0; } }
@keyframes sc-ah { 0%, 29% { opacity: 0; } 31%, 45% { opacity: 1; } 47%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scene.play * { animation: none !important; } }
@media (max-width: 860px) { .scene .char { width: 40px; height: 40px; } .scene .cactus { width: 26px; height: 44px; } }
.day button.num { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; min-width: 28px; height: 28px; border-radius: 8px; } .day button.num:hover { background: var(--lime); color: var(--bg); }
/* v0.18.2 · Vocali: barra di registrazione e trascrizione sotto il vocale */
.recbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg2); }
.recbar .rdot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: pulse 1s infinite; flex: none; }
.recbar .rtime { font-variant-numeric: tabular-nums; min-width: 44px; }
.recbar .rlevel { flex: 1; height: 8px; border-radius: 9px; background: var(--bg3); overflow: hidden; } .recbar .rlevel i { display: block; height: 100%; width: 0; background: var(--lime); transition: width .08s; }
.bubble .tr { margin-top: 6px; font-size: 14px; color: var(--mute); } .bubble .tr summary { cursor: pointer; } .bubble .tr p { margin: 4px 0 0; color: var(--fg); white-space: pre-wrap; }
.bubble.me .tr p { color: inherit; }
/* v0.18.3 · Nuovo contenuto: scegli foto e video dall'Archivio */
dialog.wide-dlg { max-width: 860px; }
.arc-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); max-height: 56vh; overflow: auto; }
.arc-opt { position: relative; padding: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; text-align: left; color: var(--fg); }
.arc-opt img, .arc-opt video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; pointer-events: none; }
.arc-opt span:last-child { display: block; padding: 6px 8px; font-size: 12px; background: var(--bg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arc-opt.on { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(204,255,0,.35); } .arc-opt.on::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); color: var(--bg); display: grid; place-items: center; font-weight: 800; }
/* Logo: la ® resta in alto anche mentre la pagina carica (iPhone la metteva in basso) */
sup { font-size: .45em; font-weight: 500; line-height: 0; vertical-align: top; position: relative; top: .35em; }
.boot sup { top: .25em; }
/* loghi e PNG trasparenti: fondo chiaro, immagine intera (prima erano neri su nero) */
.arc-opt, .arc-pv { background: #E9E7E1; } .arc-opt img, .arc-pv img { object-fit: contain; }
.arc-opt video, .arc-pv video { object-fit: cover; background: #000; }
/* v0.18.4 · Notifiche: le non lette si distinguono subito (fondo lime tenue, barra a sinistra, pallino, testo pieno) */
.notif { border-left: 4px solid transparent; }
.notif.unread { background: rgba(204,255,0,.09); border-left-color: var(--lime); font-weight: 650; color: var(--fg); }
.notif.unread > span:first-child::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); margin-right: 8px; vertical-align: 2px; }
.notif:not(.unread) { color: var(--mute); }

/* ===== v0.19 · Icone a tratto ===== */
.ico { display: block; flex: none; }
.nav .ni { display: grid; place-items: center; width: 24px; height: 24px; }
.bell, .burger { display: grid; place-items: center; color: var(--fg); }
.bell .ico, .burger .ico { opacity: .92; }

/* ===== v0.19 · Chat a tutto schermo, stile WhatsApp ===== */
.chat-mode .col { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.chat-mode .main { flex: 1; min-height: 0; max-width: none; padding: 0; display: flex; }
.chat-mode .top { max-width: none; }
.chat-mode .chat { flex: 1; height: auto; min-height: 0; border: 0; border-radius: 0; background: var(--bg); }
.chat-head { padding: 10px 14px; gap: 10px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.chat-head .grow { min-width: 0; } .chat-head .grow b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head #chat-people { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-back { display: grid; place-items: center; color: var(--fg); margin-left: -4px; }
.chat-hlink { font-size: 14px; color: var(--mute); text-decoration: none; } .chat-hlink:hover { color: var(--lime); }
.zg-av { background: var(--lime); color: #0A0A0A; }
.chat-body { padding: 10px 12px 14px; gap: 2px; background: var(--bg); }
.chat-body .bubble { max-width: min(80%, 560px); padding: 6px 10px 5px; border-radius: 12px; font-size: 16px; line-height: 1.35; margin-top: 2px; }
.chat-body .bubble + .bubble.them, .chat-body .bubble.them + .bubble.me, .chat-body .bubble.me + .bubble.them { margin-top: 8px; }
.chat-body .bubble.me { background: #24300A; border-bottom-right-radius: 4px; }
.chat-body .bubble.them { background: var(--bg3); border-bottom-left-radius: 4px; }
.chat-body .bubble .who { font-size: 13px; margin-bottom: 1px; }
.chat-body .bubble .txt { white-space: pre-wrap; word-wrap: break-word; }
.chat-body .bubble .t { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; margin-top: 2px; line-height: 1.2; }
.chat-body .bubble img, .chat-body .bubble video { border-radius: 8px; margin: 2px 0 2px; max-height: 360px; }
.st-ic { color: var(--mute); letter-spacing: -2px; } .st-ic.read { color: #53bdeb; } .st-ic.err { color: var(--red); letter-spacing: 0; font-weight: 700; }
.bubble.pending { opacity: .75; } .bubble.failed { opacity: 1; box-shadow: inset 0 0 0 1px var(--red); }
.day-sep { display: flex; justify-content: center; margin: 10px 0 6px; } .day-sep span { background: var(--bg2); color: var(--mute); font-size: 12px; padding: 3px 10px; border-radius: 8px; text-transform: capitalize; }
.chat-body .bubble.idea { box-shadow: inset 3px 0 0 var(--amber); }
/* vocale: elemento audio a sé, niente riquadro grande */
.voice { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 2px 0; }
.voice .v-play { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--lime); color: #0A0A0A; display: grid; place-items: center; cursor: pointer; flex: none; }
.voice .v-bar { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); cursor: pointer; position: relative; } .voice .v-bar i { display: block; height: 100%; width: 0; background: var(--lime); border-radius: 4px; }
.voice .v-t { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.voice.err .v-play { background: var(--bg3); color: var(--mute); }
/* composer: in basso, il campo cresce, microfono o invia */
.chat-in { padding: 8px 10px; gap: 8px; background: var(--bg2); border-top: 1px solid var(--line); align-items: flex-end; }
.chat-in textarea { font-size: 16px; line-height: 1.35; min-height: 44px; padding: 11px 16px; resize: none; overflow-y: auto; border-radius: 22px; background: var(--bg); }
.chat-in .ic-btn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--fg); }
.chat-in .ic-btn.send, .recbar .ic-btn.send { background: var(--lime); color: #0A0A0A; }
.recbar { padding: 8px 10px; gap: 10px; background: var(--bg2); border-top: 1px solid var(--line); }
.recbar .ic-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--bg3); color: var(--fg); cursor: pointer; flex: none; }
.recbar .ic-btn.stop { background: var(--red); border-color: var(--red); color: #fff; }
.recbar .voice { flex: 1; min-width: 0; }
.chat-empty { margin: auto; text-align: center; color: var(--mute); max-width: 340px; }
@media (max-width: 860px) {
  .chat-mode .col { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .chat-mode .top { display: none; }
  .chat-body .bubble { max-width: 86%; }
}
.chat-head .zg-av { display: grid; place-items: center; width: 40px; height: 40px; font-size: 14px; border-radius: 50%; flex: none; }
/* foto e video in chat: bordo sottile come su WhatsApp, non un riquadro */
.chat-body .bubble:has(> a > img), .chat-body .bubble:has(> video) { padding: 3px 3px 4px; }
.chat-body .bubble:has(> a > img) .t, .chat-body .bubble:has(> video) .t { padding: 0 6px; }
.chat-body .bubble { white-space: normal; } .chat-body .bubble .txt { white-space: pre-wrap; }
.pk-btn { width: 100%; margin-bottom: 6px; background: var(--fg); color: var(--bg); } .center { text-align: center; }

/* ===== v0.19 · Firma, cinque, figure intere ===== */
/* Firma di caricamento: la luce la percorre, cresce e si spegne. Quando arriverà il logo definitivo si sostituisce il testo in data-sig. */
.boot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 100vh; min-height: 100dvh; width: 100%; text-align: center; }
.sig { font-weight: 800; font-size: 34px; letter-spacing: .04em; color: #3a3a3a; background: linear-gradient(100deg, #3a3a3a 0%, #3a3a3a 35%, #F1EFEA 48%, #CCFF00 52%, #3a3a3a 65%, #3a3a3a 100%);
  background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: sig 2.2s ease-in-out infinite; }
.sig sup { -webkit-text-fill-color: #CCFF00; }
@keyframes sig { 0% { background-position: 100% 0; filter: brightness(.8); } 55% { filter: brightness(1.25); } 100% { background-position: 0 0; filter: brightness(.8); } }
.fig { display: block; overflow: visible; }
.hf { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hf-stage { display: flex; align-items: flex-end; position: relative; }
.hf-l, .hf-r { display: block; animation: hf-in .9s cubic-bezier(.2,.9,.3,1.2) both; }
.hf-l { --from: -40px; } .hf-r { --from: 40px; margin-left: -18px; }
.hf-spark { position: absolute; left: 50%; top: 14%; transform: translate(-50%, 0) scale(0); color: #CCFF00; font-size: 26px; animation: hf-spark .5s .75s ease-out both; }
@keyframes hf-in { from { transform: translateX(var(--from)); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hf-spark { 0% { transform: translate(-50%, 0) scale(0); opacity: 0; } 60% { transform: translate(-50%, -6px) scale(1.4); opacity: 1; } 100% { transform: translate(-50%, -10px) scale(1); opacity: 0; } }
.hf-t { margin: 0; font-weight: 650; text-align: center; }
.party .party-box .hf { margin-bottom: 4px; }
/* trascina giù per aggiornare */
.ptr { position: fixed; top: 0; left: 50%; transform: translate(-50%, -100px); opacity: 0; z-index: 80; pointer-events: none; background: var(--bg2); border: 1px solid var(--line); border-radius: 0 0 22px 22px; padding: 8px 18px 6px; transition: opacity .15s; }
.ptr .hf-l, .ptr .hf-r { animation: none; } .ptr .hf-l { transform: translateX(calc((1 - var(--k, 0)) * -24px)); } .ptr .hf-r { transform: translateX(calc((1 - var(--k, 0)) * 24px)); }
.ptr .hf-spark { animation: none; } .ptr.ready .hf-spark { transform: translate(-50%, -4px) scale(1); }
.ptr.go { transform: translate(-50%, 0) !important; opacity: 1 !important; transition: transform .2s; } .ptr.go .hf-spark { animation: hf-spark .5s ease-out both; }
@media (prefers-reduced-motion: reduce) { .sig, .hf-l, .hf-r, .hf-spark, .ptr.go .hf-spark { animation: none !important; } .hf-spark { transform: translate(-50%, 0) scale(1); } }
.pg-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; } .pg-row figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; } .pg-row figure > div { display: flex; } .pg-row figcaption { font-size: 13px; color: var(--mute); } .pg-row figure .fig + .fig { margin-left: -14px; }
.pg-row figure { flex-direction: column; } .pg-row figure:has(.fig + .fig) { flex-direction: row; flex-wrap: wrap; justify-content: center; } .pg-row figure:has(.fig + .fig) figcaption { width: 100%; text-align: center; }

/* ===== v0.19 · Tutorial e assistenza ===== */
.side-help { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; color: var(--mute); text-decoration: none; font-weight: 600; font-size: 15px; }
.side-help:hover, .side-help.on { color: var(--fg); background: var(--bg2); }
@media (max-width: 860px) { .side-help { display: none; } }
.tour-figs { display: flex; align-items: flex-end; flex: none; } .tour-figs .fig + .fig { margin-left: -16px; }
.tour-txt h2 { margin: 2px 0 6px; } .tour-txt p { margin: 0 0 10px; }
.tour-dots { display: flex; gap: 6px; margin-bottom: 12px; } .tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); } .tour-dots i.on { background: var(--lime); width: 18px; border-radius: 6px; }
.nav a.tour-hl { box-shadow: 0 0 0 2px var(--lime); color: var(--fg); animation: pulse 1.2s infinite; }
.qa-box { margin-bottom: 14px; } .qa-box.ok { border-color: rgba(204,255,0,.35); } .qa-box.bad { border-color: var(--amber); }
.qa-f { padding: 6px 0; border-top: 1px solid var(--line); } .qa-f.bad { color: var(--fg); } .qa-f ul { margin: 4px 0 0; padding-left: 20px; color: var(--amber); }
/* v0.20 · menù ☰ a gruppi */
.menu-pop .mg { border-top: 1px solid var(--line); } .menu-pop .mg summary { list-style: none; cursor: pointer; padding: 11px 12px; font-weight: 650; display: flex; justify-content: space-between; border-radius: 10px; }
.menu-pop .mg summary::-webkit-details-marker { display: none; } .menu-pop .mg summary::after { content: '›'; color: var(--mute); transition: transform .15s; } .menu-pop .mg[open] summary::after { transform: rotate(90deg); }
.menu-pop .mg summary:hover { background: var(--bg3); } .menu-pop .mg a { padding-left: 24px; font-weight: 500; color: var(--mute); } .menu-pop .mg a:hover { color: var(--fg); }
.menu-pop .menu-out { border-top: 1px solid var(--line); margin-top: 4px; color: var(--mute); }

/* ---------- v0.21 · Trascina e lascia (#68) ---------- */
.draggable { cursor: grab; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; opacity: .92; box-shadow: 0 18px 40px rgba(0,0,0,.55); border-radius: 12px; background: var(--bg2); transition: none; }
.drag-src { opacity: .35; }
body.dragging, body.dragging * { cursor: grabbing !important; }
[data-drop].drop-on { outline: 2px dashed var(--lime); outline-offset: -2px; background: rgba(204,255,0,.07); }
.drop-hints { display: none; gap: 6px; margin: 4px 0 8px; }
body.dragging .drop-hints { display: flex; }
.drop-hints span { flex: 1; text-align: center; font-size: 13px; padding: 8px 4px; border: 1px dashed var(--line); border-radius: 10px; color: var(--mute); }
.lanes-tip { margin: 6px 0 10px; }
.drop-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; }
.drop-bar .dz { font-size: 13px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 999px; color: var(--mute); }
.drop-bar .dz.day { border-color: rgba(204,255,0,.35); }
body:not(.dragging) .drop-bar .dz { opacity: .7; }
.ev.saving, .dv-item.saving { opacity: .5; pointer-events: none; }

/* ---------- v0.21 · Calendario Mese / Settimana / Giorno (#67) ---------- */
.cal-head .actions { flex-wrap: wrap; }
.segbar { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.segbar a { padding: 6px 12px; border-radius: 9px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--mute); }
.segbar a.on { background: var(--lime); color: var(--bg); }
.cal .add { opacity: .35; background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.cal .day:hover .add, .cal .add:focus-visible { opacity: 1; color: var(--lime); }
.cal .day a.num { text-decoration: none; }
.agenda-day h4 a { text-decoration: none; }
.dayview { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dv-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.dv-slot { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: start; min-height: 44px; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.dv-slot:last-child { border-bottom: 0; }
.dv-slot:not(.has) { opacity: .65; }
.dv-h { font-size: 13px; color: var(--mute); padding-top: 6px; font-variant-numeric: tabular-nums; }
.dv-items { display: grid; gap: 6px; min-width: 0; }
.dv-item { display: flex; gap: 10px; align-items: center; padding: 8px; background: var(--bg2); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--lime)); border-radius: 12px; text-decoration: none; min-width: 0; }
.dv-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-item .grow { min-width: 0; }
.dv-item.bozza { opacity: .7; } .dv-item.modifiche_richieste { box-shadow: inset 0 0 0 1px var(--red); }
.dv-add { color: var(--mute); text-decoration: none; font-size: 20px; padding: 2px 8px; opacity: 0; }
.dv-slot:hover .dv-add { opacity: 1; color: var(--lime); }
@media (pointer: coarse) { .dv-add, .cal .add { opacity: .8; } }
.fab { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 40; background: var(--lime); color: var(--bg); border: 0; border-radius: 999px; padding: 14px 20px; font-weight: 800; font-size: 16px; box-shadow: 0 10px 28px rgba(0,0,0,.5); cursor: pointer; }
@media (min-width: 861px) { .fab { bottom: 28px; right: 28px; } }
@media (max-width: 860px) { .dv-slot { grid-template-columns: 48px 1fr auto; padding: 6px 8px; } }

/* ---------- v0.21 · Tutorial interattivo (#65): riquadro al centro, il punto spiegato illuminato ---------- */
.tour { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: none; transition: background .25s; }
.tour.lit { background: transparent; }
.tour[data-pos="low"] { align-items: flex-end; padding-bottom: 12vh; } .tour[data-pos="high"] { align-items: flex-start; padding-top: 10vh; }
.tour-box { pointer-events: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 24px; padding: 18px 20px; width: min(600px, 100%); display: flex; gap: 14px; align-items: center; box-shadow: 0 30px 80px rgba(0,0,0,.6); transition: opacity .2s, transform .25s; }
.tour.moving .tour-box { opacity: .5; transform: scale(.98); }
.tour-spot { position: fixed; z-index: 94; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0,0,0,.62), 0 0 0 2px var(--lime), 0 0 24px 4px rgba(204,255,0,.35); opacity: 0; transition: left .35s cubic-bezier(.3,.7,.2,1), top .35s cubic-bezier(.3,.7,.2,1), width .35s, height .35s, opacity .2s; }
.tour-spot.on { opacity: 1; animation: spotpulse 1.6s ease-in-out infinite; }
@keyframes spotpulse { 50% { box-shadow: 0 0 0 9999px rgba(0,0,0,.62), 0 0 0 3px var(--lime), 0 0 34px 8px rgba(204,255,0,.45); } }
.tour-anim { width: 190px; height: auto; display: block; }
@media (max-width: 600px) { .tour-box { flex-direction: column; align-items: stretch; } .tour-figs { justify-content: center; } .tour-anim { width: 150px; margin: 0 auto; } }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; animation: none; } }

/* ---------- v0.21 · Archivio a cartelle + invio rapido (#64) ---------- */
.big-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; margin-bottom: 18px; border-color: rgba(204,255,0,.35); background: rgba(204,255,0,.03); position: relative; }
.big-drop b { color: var(--fg); font-size: 18px; } .big-drop .drop-ic { font-size: 26px; color: var(--lime); }
.big-drop.busy { pointer-events: none; opacity: .8; }
.up-prog { position: absolute; left: 16px; right: 16px; bottom: 10px; height: 6px; background: var(--bg3); border-radius: 4px; overflow: hidden; } .up-prog i { display: block; height: 100%; width: 0; background: var(--lime); transition: width .2s; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 0 0 18px; }
.album { text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.album-cv { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); display: grid; place-items: center; margin-bottom: 6px; transition: transform .15s; }
.album-cv img, .album-cv video { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-ic { font-size: 34px; opacity: .55; }
.album:hover .album-cv { transform: translateY(-2px); border-color: var(--mute); }
.album.on .album-cv { box-shadow: 0 0 0 2px var(--lime); }
@media (max-width: 860px) { .albums { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .album b { font-size: 14px; } }

/* ---------- v0.21 · Privacy (#66) ---------- */
.legal h2 { font-size: 20px; margin: 26px 0 6px; } .legal ul { padding-left: 20px; } .legal li { margin: 4px 0; } .legal p, .legal li { color: #d9d6cf; }
.legal-page { max-width: 760px; margin: 0 auto; padding: 32px 16px 60px; }
.warn-note { border-color: var(--amber); color: var(--amber); margin: 10px 0 4px; }
.big-drop, .big-drop * { text-transform: none; letter-spacing: normal; }
.big-drop b { font-size: 18px; } .big-drop .muted { font-weight: 400; }
.cal .ev { display: block; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.cal .ev .ic { display: inline-block; vertical-align: -2px; margin-right: 3px; }
.cal .day { min-width: 0; }
.drag-ghost { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 120px; }

/* ---------- v0.22 · Parte bassa della home in ordine ---------- */
.hb { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 18px; align-items: start; }
@media (max-width: 960px) { .hb { grid-template-columns: 1fr; } }
.hb .card, .hb.card { padding: 16px 18px; }
.hb-day h4, .hb-grp h4 { margin: 14px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); font-weight: 700; }
.hb-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; text-decoration: none; min-width: 0; }
.hb-row:hover, .hb-line a:hover { background: var(--bg3); }
.hb-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hb-t b, .hb-line b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-tag { flex: none; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.hb-tag.warn { color: var(--amber); border-color: rgba(255,201,77,.4); } .hb-tag.hot { color: var(--red); border-color: rgba(255,59,48,.45); }
.hb-tag.info { color: var(--blue); border-color: rgba(143,184,255,.4); } .hb-tag.ok { color: var(--lime); border-color: rgba(204,255,0,.3); }
.hb-line { display: flex; align-items: center; gap: 6px; }
.hb-line a { flex: 1; display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 10px; text-decoration: none; min-width: 0; }
.hb-line a .muted { margin-left: auto; white-space: nowrap; padding-left: 8px; }
.hb-more { display: block; margin-top: 10px; }
.hb-done { margin-top: 16px; padding: 14px 18px; } .hb-done summary { cursor: pointer; list-style: none; } .hb-done summary::-webkit-details-marker { display: none; }
.hb-done summary::after { content: ' ▾'; color: var(--mute); } .hb-done[open] summary { margin-bottom: 10px; }

/* ---------- v0.22 · Team e accessi (#69) ---------- */
.tm-p { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 12px; text-decoration: none; }
.tm-p:hover { background: var(--bg3); } .tm-p.off { opacity: .5; }
.tm-p .grow { display: flex; flex-direction: column; min-width: 0; } .tm-p b { font-weight: 600; }
.tm-n { text-align: right; } @media (max-width: 600px) { .tm-n { display: none; } }
.tm-sub { margin: 14px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); }
.tm-list { display: flex; flex-direction: column; } .tm-h { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.tm-h:last-child { border-bottom: 0; } .tm-when { width: 110px; flex: none; }
#tm-who { width: auto; }

/* ---------- v0.22 · Caroselli che scorrono al passaggio del mouse (#70) ---------- */
[data-slides] { position: relative; }
.arc-n { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.sl-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 4px; z-index: 2; pointer-events: none; }
.sl-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); transition: width .2s, background .2s; }
.sl-dots i.on { background: #fff; width: 14px; border-radius: 4px; }
[data-slides] img { transition: opacity .15s; }
.hb > * { min-width: 0; } .hb-line { min-width: 0; } .hb-line a b { min-width: 0; } .hb-line a .muted { flex: none; } .hb-line a .dot { flex: none; }

/* ---------- v0.22 · Personaggi 3D ---------- */
.a3d { display: block; height: auto; max-width: 100%; -webkit-user-drag: none; user-select: none; }
.boot .a3d { margin-top: 6px; }
.party-box .a3d { margin: 0 auto 4px; }
.oops { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tour-anim.one { width: 104px; }
.p3d-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.p3d-grid figure { margin: 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; text-align: center; }
.p3d-grid figure.wide { grid-column: span 2; }
.p3d-grid figcaption { font-size: 13px; color: var(--mute); margin-top: 4px; }
.tm-p { align-items: flex-start; } .tm-p > .btn { flex: none; }
.tm-proj { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.tm-proj .chip.small { font-size: 13px; padding: 3px 8px; display: inline-flex; gap: 6px; align-items: center; }
.tm-proj .x { background: none; border: 0; color: var(--mute); cursor: pointer; padding: 0 0 0 2px; font-size: 12px; } .tm-proj .x:hover { color: var(--red); }
.tm-add { width: auto; font-size: 13px; padding: 3px 26px 3px 8px; min-height: 0; }
.tm-tabs { margin-right: 6px; }
#dlg-reset .dlg-in { padding: 6px; } #reset-link { width: 100%; font-size: 13px; }

/* ---------- v0.23 · Home con i personaggi 3D, numeri del giorno (#76), chat nella home del cliente (#75) ---------- */
.hero3d { align-items: center; gap: 26px; background: radial-gradient(120% 140% at 0% 0%, rgba(204,255,0,.10), transparent 55%), var(--bg2); border: 1px solid var(--line); border-radius: 24px; padding: 18px 24px; }
.hero3d .hero-art { flex: none; width: 250px; } .hero3d .hero-art .a3d { width: 100%; }
.hero3d h1 { margin: 0 0 4px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 16px; }
.hs { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); text-decoration: none; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.hs b { font-size: 30px; line-height: 1; font-weight: 800; } .hs span { font-size: 13px; color: var(--mute); }
.hs.hot b { color: var(--lime); } .hs:hover { border-color: var(--mute); }
@media (max-width: 860px) { .hero3d { flex-direction: column; align-items: stretch; padding: 14px; } .hero3d .hero-art { width: 200px; margin: 0 auto; } .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.c-hero .a3d { width: min(260px, 70vw); }
.c-chat { display: block; text-decoration: none; margin-top: 14px; padding: 16px; }
.cc-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.cc-b { max-width: 80%; padding: 8px 12px; border-radius: 16px; font-size: 15px; line-height: 1.35; position: relative; }
.cc-b.them { background: var(--bg3); align-self: flex-start; border-bottom-left-radius: 6px; }
.cc-b.me { background: rgba(204,255,0,.14); align-self: flex-end; border-bottom-right-radius: 6px; }
.cc-t { display: block; font-size: 11px; color: var(--mute); margin-top: 2px; text-align: right; }
.cc-input { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; color: var(--mute); background: var(--bg); }
.cc-mic { width: 34px; height: 34px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; font-size: 16px; }
.c-chat:hover .cc-input { border-color: var(--lime); }
.c-next-line { display: flex; gap: 6px; align-items: center; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; font-size: 15px; color: var(--mute); }
.c-next-line b { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-reset { align-self: flex-start; margin-top: 4px; color: var(--mute); } .tm-reset:hover { color: var(--lime); }
.verified { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--lime); color: var(--bg); font-size: 11px; font-weight: 900; vertical-align: 2px; margin-left: 2px; }
.chat-head .grow > b { display: flex; align-items: center; gap: 5px; } .chat-head .verified { vertical-align: 0; margin: 0; }
.chat-sec { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); margin: 18px 0 6px; }

/* v0.25 · schede clienti: solo il logo, niente foto di sfondo (#93 Samu) */
.ccard-logo { height: 132px; display: grid; place-items: center; background: #F4F2EC; border-bottom: 1px solid var(--line); padding: 18px; }
.ccard-logo img { max-width: 70%; max-height: 92px; object-fit: contain; display: block; }
.ccard-mono { font-size: 40px; font-weight: 800; letter-spacing: .02em; color: var(--c, #111); }
.ccard .ccard-b { padding-top: 16px; }

/* v0.25 · «Da fare ora» come una to-do (#90 Samu) */
.now-tasks { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.nt { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--line); }
.nt.p-alta { border-left-color: var(--lime); } .nt.late { border-left-color: var(--amber); }
.nt .tick { grid-row: span 2; }
.nt-t { font-size: 17px; font-weight: 650; text-align: left; line-height: 1.3; }
.nt-m { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--mute); }
.nt-c { display: inline-flex; align-items: center; gap: 5px; } .nt-c::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--lime)); }
.nt-hot { color: var(--lime); font-weight: 700; }
.nt.saving { opacity: .55; pointer-events: none; } .nt.done .nt-t { text-decoration: line-through; opacity: .5; }

/* v0.25 · Notifiche a tendina (#89) */
.top { position: relative; }
.np { position: absolute; right: clamp(16px, 4vw, 48px); top: 66px; z-index: 60; width: min(420px, calc(100vw - 24px)); max-height: min(70vh, 620px); display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.6); overflow: hidden; animation: npIn .16s ease-out; }
@keyframes npIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.np-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.np-n { font-size: 12px; font-weight: 700; background: var(--lime); color: var(--bg); padding: 2px 8px; border-radius: 999px; }
.np-list { overflow-y: auto; padding: 6px; }
.np-i { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 14px; text-decoration: none; position: relative; }
.np-i:hover { background: var(--bg3); }
.np-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg3); font-size: 15px; font-weight: 800; }
.np-i.ok .np-ic { background: rgba(204,255,0,.16); color: var(--lime); } .np-i.hot .np-ic { background: rgba(255,59,48,.16); color: var(--red); }
.np-i.warn .np-ic { background: rgba(255,201,77,.16); color: var(--amber); } .np-i.info .np-ic { background: rgba(143,184,255,.14); color: var(--blue); }
.np-b { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.np-k { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); font-weight: 700; }
.np-i.hot .np-k { color: var(--red); } .np-i.ok .np-k { color: var(--lime); }
.np-t { font-size: 14px; line-height: 1.35; color: var(--mute); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.np-i.unread .np-t { color: var(--fg); font-weight: 600; }
.np-w { font-size: 12px; color: var(--mute); }
.np-dot { position: absolute; right: 12px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.np-f { display: block; text-align: center; padding: 11px; border-top: 1px solid var(--line); text-decoration: none; color: var(--mute); } .np-f:hover { color: var(--fg); }
.np-empty, .np-load { padding: 18px; text-align: center; }
@media (max-width: 600px) { .np { right: 12px; left: 12px; width: auto; top: 62px; } }
.ccard-logo.on-dark { background: #161616; }

/* ---------- v0.26 · telefono lato cliente: bottoni sempre a vista, testo chiuso, prossima uscita leggibile ---------- */
.chip:first-child { text-transform: none; }
.sw-cap { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-height: none; }
.sw-more { background: none; border: 0; color: var(--lime); font: inherit; font-weight: 600; padding: 6px 0 0; cursor: pointer; }
.cap-full { white-space: pre-wrap; max-height: 60vh; overflow: auto; color: var(--fg); }
.c-next-line { gap: 12px; }
.c-next-line .nl-ic { font-size: 22px; flex: none; }
.c-next-line .nl-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.c-next-line .nl-tx small { color: var(--mute); font-size: 13px; }
.c-next-line .nl-tx b { display: block; }
.c-next-line .nl-go { flex: none; color: var(--lime); font-size: 18px; }
.c-decide-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.c-decide-btns .btn { min-height: 54px; font-size: 17px; justify-content: center; }
@media (max-width: 860px) {
  .deck-wrap { display: flex; flex-direction: column; }
  .deck-top { margin-bottom: 8px; }
  .sw-media, .sw-media.tall { aspect-ratio: auto; height: min(44dvh, calc((100vw - 32px) * 1.25)); max-height: none; }
  .sw-info { padding: 10px 16px 12px; }
  .sw-info h3 { font-size: 19px; margin: 6px 0 2px; }
  .sw-when { font-size: 15px; }
  .deck-btns { position: sticky; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 10px; padding: 8px 0; gap: 26px; }
  .deck-legend { display: none; }
  .round { width: 62px; height: 62px; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
  .round.note { width: 50px; height: 50px; }
  .c-decide { position: fixed; left: 10px; right: 10px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 15; padding: 10px; box-shadow: 0 -8px 30px rgba(0,0,0,.6); }
  .c-decide h3 { display: none; }
  .main:has(.c-decide) { padding-bottom: 210px; }
}
.chat-in textarea { resize: none; scrollbar-width: none; } .chat-in textarea::-webkit-scrollbar { display: none; }
@media (max-width: 860px) { .tour[data-pos="low"] { padding-bottom: calc(84px + env(safe-area-inset-bottom)); } .tour[data-pos="high"] { padding-top: 12px; } .tour-box { max-height: 70vh; overflow: auto; } }
@media (max-width: 860px) { .tour.lit .tour-figs, .tour.lit .tour-anim { display: none; } }
