@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/bricolage-latin.woff2) format('woff2');
}

/* Pensato per il telefono, installato sulla Home. Tasti almeno 44px,
   testo dei campi 16px (sotto, iPhone zooma quando li tocchi). */

:root {
  --bg: #E9EDF1; --surface: #F7F9FB; --ink: #18212E; --muted: #5C6878; --line: #D3DAE2;
  --gold: #C08A12; --gold-ink: #3A2A05; --gold-soft: #F4E7C8; --teal: #2E7A80; --warn: #B4452F; --ok: #2E7A50;
  --c1: #2E7A80; --c2: #5A4FB0; --c3: #C08A12; --c4: #B4452F; --c5: #3F7F3A; --c6: #A0467E; --c7: #3D6FB0; --c8: #7A6A55;
  --radius: 18px;
  --tabbar-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161D; --surface: #1A212B; --ink: #E6EBF1; --muted: #95A1B0; --line: #2A3441;
    --gold: #E0AA35; --gold-ink: #241A03; --gold-soft: #3A2E14; --teal: #5DB3B8; --warn: #E07A63; --ok: #6CC08A;
    --c1: #5DB3B8; --c2: #9C93E8; --c3: #E0AA35; --c4: #E07A63; --c5: #86C47F; --c6: #DA83BB; --c7: #7FA8E6; --c8: #BFAE95;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font-family: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; }
button:not(:disabled):active { transform: scale(.97); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
img { max-width: 100%; }

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px calc(28px + var(--safe-b)); }
.wrap[data-screen="diary"], .wrap[data-screen="settings"] { padding-bottom: calc(var(--tabbar-h) + 28px + var(--safe-b)); }
.wrap[data-screen="builder"] { padding-bottom: calc(96px + var(--safe-b)); }
.center { text-align: center; }
.loading { padding-top: calc(40vh + var(--safe-t)); }
.muted { color: var(--muted); font-size: .92rem; margin: 0; }
.small { font-size: .82rem; }
.up { color: var(--ok); } .down { color: var(--warn); }
.link { color: var(--teal); font-weight: 600; font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.link.center { display: block; margin: 0 auto; }
.hint { text-align: center; color: var(--muted); font-size: .82rem; margin: 18px 0 0; }

/* ── barra in alto (fissa) ── */
.appbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 4px;
  margin: 0 -16px 14px; padding: calc(var(--safe-t) + 10px) 12px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.appbar.plain { grid-template-columns: 1fr; padding-left: 16px; padding-right: 16px; }
.appbar .ttl { text-align: center; min-width: 0; }
.appbar.plain .ttl { text-align: left; }
.appbar .d { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.15; }
.appbar .d::first-letter { text-transform: uppercase; }
.appbar .s { color: var(--muted); font-size: .85rem; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.appbar.plain .s { justify-content: flex-start; }
.arr { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.arr:disabled { opacity: .25; }
.pill-link { background: var(--ink); color: var(--bg); font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }

/* ── barra in basso ── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 560px; margin: 0 auto;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; min-height: 52px; color: var(--muted); font-size: .72rem; font-weight: 600; }
.tabbar svg { padding: 3px 14px; box-sizing: content-box; border-radius: 999px; }
.tabbar button[aria-current="page"] { color: var(--ink); }
.tabbar button[aria-current="page"] svg { background: color-mix(in srgb, var(--gold) 28%, transparent); }

/* ── animazioni di passaggio ── */
.view.from-right { animation: fromRight .22s ease-out; }
.view.from-left { animation: fromLeft .22s ease-out; }
.view.bump { animation: bump .25s ease-out; }
@keyframes fromRight { from { transform: translateX(28px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes fromLeft { from { transform: translateX(-28px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes bump { 30% { transform: translateX(-8px); } 60% { transform: translateX(4px); } }

/* ── titoli di sezione ── */
.sec { margin: 22px 2px 10px; }
.sec h2 { font-size: 1.15rem; margin: 0; letter-spacing: -.01em; }
.sec p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

/* ── schede aiuto e installazione ── */
.card-tip { background: var(--surface); border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--line)); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; display: grid; gap: 10px; }
.card-tip > b { font-size: 1.05rem; }
.card-tip .btn, .card-tip .link { justify-self: start; }
.tip-h { display: flex; gap: 12px; align-items: center; }
.tip-h img { border-radius: 10px; }
.tip-h div { display: grid; }
.tip-h span { color: var(--muted); font-size: .88rem; }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.steps li { padding-left: 2px; }
.inl { vertical-align: -3px; color: var(--teal); }

/* ── borsellino ── */
.purse { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin-bottom: 4px; }
.purse.full { border-color: var(--gold); background: color-mix(in srgb, var(--gold-soft) 55%, var(--surface)); }
.purse-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.purse-h span { font-weight: 600; color: var(--muted); font-size: .92rem; }
.purse-h b { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.purse-h small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.coins { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.coins .coin { width: 32px; height: 32px; }
.coins .coin.bonus { width: 46px; border-radius: 23px; }
.coin { width: 38px; height: 38px; border-radius: 50%; border: 2px dashed var(--line); flex: none; transition: transform .18s ease, background .18s ease; }
.coin.on { background: var(--gold); border: 2px solid var(--gold); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 6px var(--gold); }
.purse.full .coin.on { box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--gold-soft) 55%, var(--surface)), inset 0 0 0 6px var(--gold); }
.coin.bonus { display: grid; place-items: center; font-weight: 800; font-size: .88rem; color: var(--muted); }
.coin.bonus.on { color: var(--gold-ink); box-shadow: none; }
.purse p { margin: 12px 0 0; text-align: center; font-weight: 600; }
.purse-f { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: .85rem; }
.purse-f b { color: var(--ink); }

/* ── gettoni ── */
.habits { display: grid; gap: 8px; }
.habit { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px 12px 16px; }
.habit .t { flex: 1; min-width: 0; display: grid; gap: 1px; overflow-wrap: anywhere; }
.habit .n { font-weight: 700; font-size: 1.05rem; }
.habit .s { color: var(--muted); font-size: .86rem; }
.habit .st { color: var(--teal); font-size: .8rem; font-weight: 700; }
.habit[aria-pressed="true"] { border-color: var(--gold); background: color-mix(in srgb, var(--gold-soft) 45%, var(--surface)); }
.habit[aria-pressed="true"] .coin { transform: rotate(-12deg) scale(1.05); box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--gold-soft) 45%, var(--surface)), inset 0 0 0 6px var(--gold); }

/* ── schede ── */
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.block h3 { margin: 0 0 10px; font-size: 1.02rem; font-weight: 700; }
.block h3 span { color: var(--muted); font-weight: 400; font-size: .85rem; }

/* ── scale 1-5 ── */
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale button { height: 52px; border-radius: 14px; border: 2px solid var(--line); font-weight: 800; font-size: 1.1rem; background: var(--bg); }
.scale button[aria-pressed="true"] { background: var(--sc, var(--teal)); border-color: var(--sc, var(--teal)); color: var(--surface); }
.ends { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--muted); font-size: .84rem; }
.ends span:last-child { text-align: right; }

/* ── aree ── */
.chip-h { display: flex; align-items: center; gap: 8px; }
.chip-h::before { content: ''; width: 10px; height: 10px; border-radius: 50%; }
.peso-h::before { background: var(--warn); }
.bene-h::before { background: var(--teal); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips + h3 { margin-top: 16px; }
.chips button { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); font-weight: 600; background: var(--bg); }
.chips.peso button[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: var(--surface); }
.chips.bene button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--surface); }
textarea { width: 100%; min-height: 96px; resize: vertical; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; padding: 12px 14px; display: block; }

/* ── numeri ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin-bottom: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.stat .v { font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.1; }
.stat .v small { font-size: .9rem; color: var(--muted); }
.stat .k { color: var(--muted); font-size: .8rem; display: grid; }
.stat .pol { font-size: .72rem; opacity: .85; }

/* ── settimana ── */
.wk { padding: 12px 12px 6px; }
.wk-days, .wk-dots { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.wk-days span { color: var(--muted); font-size: .76rem; font-weight: 600; display: grid; line-height: 1.2; padding-bottom: 6px; }
.wk-days b { color: var(--ink); font-size: .95rem; }
.wk-days .today b { color: var(--surface); background: var(--teal); border-radius: 999px; width: 28px; justify-self: center; }
.wk-row { border-top: 1px solid var(--line); padding: 8px 0; }
.wk-name { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: .92rem; margin: 0 2px 6px; }
.wk-name small { color: var(--muted); font-weight: 600; }
.wk-dots { align-items: center; justify-items: center; min-height: 24px; }
.wk-row.sum .wk-dots { font-weight: 800; }
.dot { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); }
.dot.on { background: var(--gold); border-color: var(--gold); }
.dot.faint { opacity: .35; }

/* ── mese ── */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .hd { text-align: center; color: var(--muted); font-size: .78rem; font-weight: 600; }
.cal button { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; font-size: .9rem; position: relative; }
.cal button.fut { opacity: .3; }
.cal button.logged { border: 2px solid color-mix(in srgb, var(--gold) 70%, var(--line)); }
.cal button.today { outline: 2px solid var(--teal); outline-offset: 1px; }
.cal .nt, .nt-l { position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.nt-l { position: static; display: inline-block; vertical-align: middle; }
.legend { display: flex; justify-content: space-between; flex-wrap: wrap; color: var(--muted); font-size: .78rem; margin-top: 10px; gap: 8px; }

.bars { display: grid; gap: 10px; }
.bar .r { display: flex; justify-content: space-between; gap: 8px; font-size: .92rem; }
.bar .r span:last-child { color: var(--muted); white-space: nowrap; }
.bar .row2 { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.bar .tr, .cmp .tr { flex: 1; height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; }
.bar .pc { width: 3.2em; text-align: right; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
.bar .fl, .cmp .fl { height: 100%; background: var(--gold); border-radius: 5px; }

.ins { border-top: 1px solid var(--line); padding: 12px 0; }
.ins:first-of-type { border-top: 0; padding-top: 4px; }
.ins .q { font-size: .95rem; }
.ins .a { font-weight: 800; margin: 2px 0 8px; }
.ins .a::first-letter { text-transform: uppercase; }
.cmp { display: grid; grid-template-columns: 2.2em 1fr 2.4em; align-items: center; gap: 8px; font-size: .85rem; margin-top: 4px; }
.cmp span { color: var(--muted); }
.cmp b { text-align: right; font-variant-numeric: tabular-nums; }

svg.trend { width: 100%; height: auto; display: block; }
.scs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sc { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; }
.sc i { width: 12px; height: 3px; border-radius: 2px; }
.sc b { font-variant-numeric: tabular-nums; }
.sc.off { opacity: .4; text-decoration: line-through; }

.note-row { border-top: 1px solid var(--line); padding: 8px 0; }
.note-row:first-of-type { border-top: 0; }
.note-row .link { min-height: 0; text-transform: capitalize; }
.note-row p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── accesso ── */
.auth { padding-top: calc(var(--safe-t) + 12px); }
.hero { text-align: center; padding: 24px 0 18px; }
.hero img { border-radius: 18px; }
.hero p { color: var(--muted); max-width: 30em; margin: 6px auto 0; }
.brand.big { font-weight: 800; font-size: 2.1rem; letter-spacing: -.02em; margin-top: 8px; }
.intro { margin: 18px 2px 16px; }
.intro h1 { font-size: 1.6rem; letter-spacing: -.02em; margin: 0 0 6px; line-height: 1.15; }
.intro p { margin: 0; color: var(--muted); }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.seg button { min-height: 44px; border-radius: 10px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg.small { margin: 0; background: var(--bg); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; display: grid; gap: 14px; }
.form-card h2 { font-size: 1.1rem; margin: 0; }
label { display: grid; gap: 6px; font-weight: 700; font-size: .95rem; }
label small, .fld small { font-weight: 400; color: var(--muted); font-size: .84rem; line-height: 1.35; }
input[type=text], input[type=password], input:not([type]) {
  width: 100%; font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; height: 50px; min-width: 0;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
.pw { position: relative; display: block; }
.pw input { padding-right: 96px; }
.pw .eye { position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 14px; border-radius: 9px; font-weight: 700; font-size: .85rem; color: var(--teal); background: var(--surface); }
.check { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; }
.check input { width: 24px; height: 24px; accent-color: var(--teal); flex: none; margin: 0; }
.check span { display: grid; gap: 2px; }

.btn { background: var(--ink); color: var(--bg); border-radius: 14px; min-height: 52px; padding: 0 20px; font-weight: 800; font-size: 1rem; }
.btn:disabled { opacity: .4; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: .92rem; }
.error { color: var(--warn); font-size: .92rem; margin: 0; font-weight: 700; }
.okmsg { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line)); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; font-size: .92rem; }

.why { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
.why summary { min-height: 52px; display: flex; align-items: center; font-weight: 700; cursor: pointer; list-style: none; }
.why summary::after { content: '+'; margin-left: auto; font-size: 1.3rem; color: var(--muted); }
.why[open] summary::after { content: '−'; }
.why summary::-webkit-details-marker { display: none; }
.why ul { margin: 0 0 16px; padding-left: 1.2em; display: grid; gap: 6px; color: var(--muted); }
.why b { color: var(--ink); }

.code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 1.12rem; font-weight: 700; letter-spacing: .03em; text-align: center; background: var(--bg); border: 2px dashed var(--line); border-radius: 14px; padding: 16px 10px; word-spacing: .2em; line-height: 1.7; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }

/* ── costruttore ── */
.pick { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; width: 100%; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 10px; }
.pick b { font-size: 1.12rem; }
.pick span { color: var(--muted); font-size: .92rem; grid-column: 1; }
.pick .chev { grid-row: 1 / span 2; grid-column: 2; }

.step-h { display: flex; gap: 12px; align-items: flex-start; }
.step-h .num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; }
.step-h h2 { margin: 3px 0 2px; }
.step-h p { margin: 0; color: var(--muted); font-size: .9rem; }
.item { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.fld { display: grid; gap: 5px; font-weight: 600; font-size: .85rem; color: var(--muted); }
.fld input { color: var(--ink); }
.item > .fld:first-child input { font-weight: 700; }
.item.compact { gap: 6px; }
.item.compact .tools { margin-top: 2px; }
.hint-in input { height: 44px; font-size: 16px; color: var(--muted); }
.note-saved { min-height: 1.2em; margin-top: 6px; text-align: right; color: var(--ok); font-size: .82rem; font-weight: 700; }
.ends-in { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tools { display: flex; gap: 6px; justify-content: flex-end; }
.mini-btn { min-height: 40px; min-width: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; font-size: .88rem; background: var(--bg); }
.mini-btn:disabled { opacity: .3; }
.mini-btn.del { color: var(--warn); }
.add { min-height: 52px; border: 2px dashed var(--line); border-radius: 14px; font-weight: 700; color: var(--teal); }
.add:disabled { opacity: .4; }
.bonus-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.bonus-row > div:first-child { display: grid; }
.bonus-row small { color: var(--muted); font-size: .84rem; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper b { min-width: 2.6em; text-align: center; font-size: 1.1rem; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-edit { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; padding-left: 4px; background: var(--bg); max-width: 100%; }
.pill-edit input { border: 0; background: none; height: 40px; padding: 0 2px 0 10px; width: auto; font-weight: 700; }
.pill-edit button { width: 40px; height: 40px; color: var(--warn); font-weight: 700; }
.pill-add { display: flex; gap: 8px; }
.pill-add .btn { flex: none; }
.arch { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.arch small { color: var(--muted); }
.savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: 10px; max-width: 560px; margin: 0 auto;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.savebar .btn { flex: 1; }

/* ── impostazioni ── */
.row-btn { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 56px; text-align: left; padding: 6px 0; border-top: 1px solid var(--line); }
.form-card h2 + .row-btn, .form-card > .row-btn:first-child { border-top: 0; }
.row-btn span { display: grid; gap: 2px; }
.row-btn small { color: var(--muted); font-size: .84rem; font-weight: 400; }
.row-btn .chev, .pick .chev { color: var(--muted); flex: none; }
.row-btn.danger b { color: var(--warn); }
.sub { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.sub .link { justify-self: start; }
.sub-actions { display: flex; gap: 8px; }
.sub-actions .btn { flex: 1; }

/* ── avviso breve ── */
.status { position: fixed; left: 50%; transform: translateX(-50%); z-index: 40; bottom: calc(20px + var(--safe-b)); background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 999px; font-size: .88rem; font-weight: 600; pointer-events: none; opacity: 0; transition: opacity .2s; max-width: calc(100% - 32px); text-align: center; }
.status:not(:empty) { opacity: .94; }
.wrap[data-screen="diary"] ~ .status, .wrap[data-screen="settings"] ~ .status { bottom: calc(var(--tabbar-h) + 14px + var(--safe-b)); }
.wrap[data-screen="builder"] ~ .status { bottom: calc(92px + var(--safe-b)); }

@media (prefers-reduced-motion: reduce) { *, .view { transition: none !important; animation: none !important; } }
@media (min-width: 600px) { .tabbar { border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 18px 18px 0 0; } }
