/* LongME — Ideato e realizzato da Michele Pisano (creatore e ideatore). © 2026 Acaia Hub S.r.l. */
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.app { max-width: 560px; margin: 0 auto; padding: 16px 16px 24px; }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.hello { font-size: 24px; font-weight: 650; margin: 0 0 4px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: #111417; display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px 2px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
.tabbar a { color: #b9c0c6; text-decoration: none; text-align: center; font-size: 11px; padding: 8px 1px; border-radius: 8px; font-weight: 500; }
.tabbar a.on { color: #fff; background: #2a2f34; }
.tabbar svg { display: block; margin: 0 auto 3px; width: 22px; height: 22px; }
.rem { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rem:last-child { border-bottom: 0; }
.rem.done span { text-decoration: line-through; color: var(--ink3); }
.meter { height: 12px; border-radius: 99px; background: var(--surface2); overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; background: var(--ok); }
.big { font-size: 30px; font-weight: 650; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.choices input { position: absolute; opacity: 0; pointer-events: none; left: 0; top: 0; width: 1px; height: 1px; margin: 0; }
.choices label { position: relative; border: 1px solid #a6aeb5; border-radius: 8px; padding: 10px; text-align: center; cursor: pointer; font-weight: 500; display: block; }
.choices input:checked + span { font-weight: 700; }
.choices label:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.choices label:has(input:focus-visible) { outline: 3px solid #62bdea; outline-offset: 2px; }
input[type=range] { padding: 0; border: 0; accent-color: #111417; }
.scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink2); }
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 40vh; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; font-size: 15px; }
.msg.user { align-self: flex-end; background: #111417; color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.esc { border-color: var(--bad); background: #fdecea; }
.composer { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); display: flex; gap: 8px; background: var(--bg); padding: 10px 0; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.toggle:last-child { border-bottom: 0; }
.toggle input { width: 22px; height: 22px; flex: none; accent-color: #111417; }
.inbox-item { border-left: 3px solid var(--ink); padding: 6px 10px; }
.mealrow { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }

.app { min-width: 0; overflow-wrap: anywhere; }
