/* Cooky — design nativo iOS, sempre scuro.
   Nero vero (si fonde con la barra di stato), liste raggruppate come nelle Impostazioni, riquadri-icona colorati con il glifo bianco,
   vetro solo per ciò che galleggia (menu, pannelli, barra in alto). Palette del marchio: verde #00D858, terracotta #DF9A68, pesca #ECC8AD.
   Tutto si muove con molle (js/motion.js). */

:root {
  color-scheme: dark;
  --bg: #000;
  --bg-outer: #000;
  --surface: #1C1C1E;          /* celle delle liste */
  --surface-2: #2C2C2E;        /* campi, chip, pannelli dentro i pannelli */
  --surface-3: #3A3A3C;
  --ink: #fff;
  --ink-2: rgba(235, 235, 245, .62);
  --ink-3: rgba(235, 235, 245, .34);
  --line: rgba(84, 84, 88, .55);
  --line-2: rgba(120, 120, 128, .5);

  --green: #00D858;
  --green-t: #3CE485;
  --green-soft: rgba(0, 216, 88, .16);
  --on-green: #04210F;
  --terra: #DF9A68;
  --peach: #ECC8AD;
  --peach-soft: rgba(236, 200, 173, .12);
  --red: #FF453A;
  --red-t: #FF6961;
  --red-soft: rgba(255, 69, 58, .16);
  --amber: #FF9F0A;
  --amber-t: #FFB340;
  --amber-soft: rgba(255, 159, 10, .16);

  --pill: #2C2C2E;
  --pill-ink: #fff;
  --hero: #0F2A1B;
  --hero-glow: rgba(0, 216, 88, .28);
  --toast: #2C2C2E;

  --shadow: 0 0 0 0 transparent;
  --shadow-lg: 0 18px 44px -14px rgba(0, 0, 0, .8);
  --tone-mix: 22%;

  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, 'Segoe UI', Roboto, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --bar: 58px;
  --nav: 66px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; background: var(--bg); overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.35 var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
}
body.noscroll #view { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
a { color: var(--green-t); }
b, strong { font-weight: 600; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 70%, transparent); outline-offset: 2px; border-radius: 12px; }
small { font-size: 13px; }
.muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- icone ---------- */
.pi { width: 1em; height: 1em; flex: none; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pi.ui { width: 24px; height: 24px; }
.pi.sm { width: 18px; height: 18px; }
.pi.xs { width: 15px; height: 15px; stroke-width: 2.2; }
.pi.lg { width: 44px; height: 44px; stroke-width: 2.4; }
.working .pi.lg { color: #fff; background: var(--green); border-radius: 50%; padding: 18px; box-sizing: content-box; }

/* riquadro-icona del prodotto, come nelle Impostazioni: colore pieno e glifo bianco */
.pt {
  --tf: #8E8E93;
  width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tf) 80%, #fff), var(--tf));
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .22);
}
.pt .pi { width: 22px; height: 22px; stroke-width: 1.9; }
.pt.sm { width: 34px; height: 34px; border-radius: 9px; } .pt.sm .pi { width: 19px; height: 19px; }
.pt.lg { width: 56px; height: 56px; border-radius: 15px; } .pt.lg .pi { width: 31px; height: 31px; stroke-width: 1.7; }
.pt.xl { width: 72px; height: 72px; border-radius: 19px; } .pt.xl .pi { width: 40px; height: 40px; stroke-width: 1.6; }
.tn-sky { --tf: #4DA3FF; } .tn-ice { --tf: #5AC8FA; } .tn-yolk { --tf: #F2A900; } .tn-rose { --tf: #FF5A52; }
.tn-berry { --tf: #FF4D79; } .tn-sea { --tf: #2CB5C9; } .tn-leaf { --tf: #30B955; } .tn-tomato { --tf: #FF6B3D; }
.tn-orange { --tf: #FF9F0A; } .tn-earth { --tf: #A67C52; } .tn-grape { --tf: #A560E8; } .tn-wheat { --tf: #C9954A; }
.tn-cocoa { --tf: #8E5E45; } .tn-sweet { --tf: #FF5FA2; } .tn-sand { --tf: #8E8E93; }

/* ---------- struttura ---------- */
@media (min-width: 700px) { html, body { background: var(--bg-outer); } }
#app { position: fixed; inset: 0; max-width: 560px; margin: 0 auto; background: var(--bg); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }

#top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20; height: calc(var(--safe-t) + var(--bar));
  padding: var(--safe-t) 14px 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  --sp: 0; pointer-events: none;
}
#top::before {
  content: ''; position: absolute; inset: 0; opacity: var(--sp); transition: opacity .12s linear;
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
}
#top > * { position: relative; pointer-events: auto; }
.tb-l, .tb-r { display: flex; align-items: center; gap: 10px; min-width: 88px; }
.tb-r { justify-content: flex-end; }
.tb-title { flex: 1; text-align: center; font: 600 17px/1 var(--display); opacity: calc(var(--sp) * 1.4 - .4); transform: translateY(calc((1 - var(--sp)) * 6px)); }

.iconbtn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); flex: none; position: relative; }
.iconbtn.float { background: var(--surface); box-shadow: var(--shadow); }
.iconbtn .pi { width: 22px; height: 22px; }
.done-pill {
  height: 42px; padding: 0 16px 0 12px; border-radius: 21px; display: flex; align-items: center; gap: 8px;
  background: var(--green); color: var(--on-green); font-weight: 650; font-size: 15px; box-shadow: 0 10px 22px -10px rgba(0, 216, 88, .8);
}
.done-pill .pi { width: 20px; height: 20px; stroke-width: 2.4; }
.done-pill.idle { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

#view {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain;
  padding: calc(var(--safe-t) + var(--bar) + 4px) 20px calc(var(--nav) + 64px + var(--safe-b)); scrollbar-width: none;
}
#view::-webkit-scrollbar { display: none; }

/* titoli di pagina */
.page-head { padding: 4px 0 18px; }
.eyebrow { display: block; font-size: 12.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.page-head h1 { font: 700 34px/1.12 var(--display); }
.page-head p { margin-top: 6px; color: var(--ink-2); font-size: 15.5px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; }
.sec-h h3 { font: 700 21px/1.1 var(--display); }
.sec-h span, .sec-h button { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.sec-h .tag { background: var(--red-soft); color: var(--red-t); padding: 3px 10px; border-radius: 999px; }

/* ---------- navigazione: pulsante col logo + menu che si apre ---------- */
#tabs { position: absolute; inset: 0; z-index: 25; pointer-events: none; transition: opacity .3s; }
#tabs.hide { opacity: 0; }
#tabs.hide .fab { transform: scale(.3); pointer-events: none; }
.nav-scrim { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity .3s; }
#tabs.open .nav-scrim { opacity: 1; pointer-events: auto; }
.fab {
  position: absolute; right: 18px; bottom: calc(16px + var(--safe-b)); width: var(--nav); height: var(--nav); border-radius: 50%; z-index: 2;
  display: grid; place-items: center; background: var(--pill); color: var(--pill-ink); box-shadow: var(--shadow-lg); pointer-events: auto;
  transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), background .3s;
}
.fab img, .fab .xicon { grid-area: 1 / 1; transition: transform .55s cubic-bezier(.3, 1.5, .5, 1), opacity .25s; }
.fab img { width: 29px; height: auto; }
.fab .xicon { width: 28px; height: 28px; stroke-width: 2.4; opacity: 0; transform: rotate(-90deg) scale(.4); }
.fab.open img { opacity: 0; transform: rotate(90deg) scale(.4); }
.fab.open .xicon { opacity: 1; transform: none; }
.nb { position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font: 700 12px/1 var(--text); font-style: normal; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); }
.nb.soft { background: var(--terra); color: #2A1608; }
.nav-menu { position: absolute; right: 18px; bottom: calc(16px + var(--nav) + 16px + var(--safe-b)); display: flex; flex-direction: column; align-items: flex-end; gap: 14px; z-index: 2; }
.nav-item { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.nav-item .nl { height: 36px; padding: 0 15px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); font-weight: 650; font-size: 15px; display: grid; place-items: center; }
.nav-item .ni { position: relative; width: 58px; height: 58px; border-radius: 50%; background: var(--pill); color: var(--pill-ink); display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.nav-item .ni .pi { width: 26px; height: 26px; stroke-width: 1.9; }
.nav-item.primary .ni { background: var(--green); color: var(--on-green); box-shadow: 0 14px 28px -10px rgba(0, 216, 88, .8); }
.nav-item.primary .ni .pi { stroke-width: 2.4; }

/* ---------- pulsanti, campi, chip ---------- */
.btn {
  min-height: 48px; padding: 0 20px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface-2); color: var(--ink); font-weight: 650; font-size: 15.5px; text-align: center;
}
.btn .pi { width: 20px; height: 20px; }
.btn small { display: block; font-weight: 500; color: var(--ink-2); margin-top: 1px; }
.btn.primary { background: var(--green); color: var(--on-green); box-shadow: 0 12px 24px -12px rgba(0, 216, 88, .9); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.danger { background: var(--red-soft); color: var(--red-t); }
.btn.big { min-height: 56px; border-radius: 20px; font-size: 17px; }
.btn.full { width: 100%; }
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.linkbtn { color: var(--green-t); font-weight: 650; padding: 10px 2px; font-size: 15px; }
.linkbtn.danger { color: var(--red-t); }
.linkbtn.apart { display: block; margin-top: 8px; }   /* azione secondaria: sulla sua riga, staccata dal pulsante sopra */

.input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 16px; border: 2px solid transparent; background: var(--surface-2); outline: 0;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { border-color: var(--green); background: var(--surface); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 20%, transparent); }
.input.sm { height: 42px; border-radius: 13px; padding: 0 12px; }
input[type=date].input { appearance: none; -webkit-appearance: none; text-align: left; min-width: 0; }
.inline { display: flex; gap: 8px; margin-top: 8px; }
.inline .input { flex: 1; }

.field { margin-top: 20px; }
.field > label { display: block; font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; }
.hint { color: var(--ink-2); font-size: 13.5px; line-height: 1.4; margin-top: 8px; }
.hint.error { color: var(--red-t); font-weight: 600; }
.hint.sum { margin: 0 0 6px; font-size: 14.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hint.footnote { margin: 0 0 10px; text-align: center; }

.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; }
.chip {
  min-height: 42px; padding: 0 16px; border-radius: 21px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background .25s, color .25s, box-shadow .25s;
}
.chip.on { background: var(--ink); color: var(--bg); }
.chip .pi { width: 20px; height: 20px; }
.chip.sm { min-height: 40px; min-width: 44px; padding: 0 12px; }
.chip.tag { cursor: default; padding-right: 6px; } .chip.tag button { width: 28px; height: 28px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: 16px; line-height: 1; display: grid; place-items: center; }
.chips.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.chips.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.chips.grid4 .chip { padding: 0 4px; font-size: 14px; }
.chips.grid3 .chip { flex-direction: column; gap: 6px; min-height: 76px; border-radius: 20px; padding: 10px 6px; font-size: 14px; }
.chips.grid3 .chip .ci .pi { width: 28px; height: 28px; stroke-width: 1.6; }
.chips.grid3 .chip.on { background: var(--green-soft); color: var(--ink); box-shadow: inset 0 0 0 2px var(--green); }
.chips.seg { display: grid; grid-template-columns: repeat(3, 1fr); }
.chips.seg .chip { border-radius: 16px; flex-direction: column; gap: 4px; min-height: 66px; font-size: 14px; }
.chips.seg .chip .pi { width: 26px; height: 26px; stroke-width: 1.6; }
.chips.seg .chip.on { background: var(--green-soft); color: var(--ink); box-shadow: inset 0 0 0 2px var(--green); }

.stepper { display: inline-flex; align-items: center; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface-2); }
.stepper button { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); font-size: 24px; font-weight: 500; line-height: 1; display: grid; place-items: center; }
.stepper output { min-width: 54px; text-align: center; font: 700 24px/1 var(--display); font-variant-numeric: tabular-nums; }

/* filtri delle ricette: righe ordinate in schede, con menu a tendina (select) e sezioni che si aprono con un tocco */
.group-h.opt-h { margin: 24px 2px 8px; }
.optcard { background: var(--surface-2); border-radius: 20px; overflow: hidden; }
.optrow, .fold-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 8px 10px 8px 16px; }
.optrow + .optrow, .fold + .fold, .optrow + .fold, .fold + .optrow { border-top: 1px solid var(--line); }
.optrow .ol, .fold-h .ol { font-weight: 600; font-size: 15.5px; color: var(--ink); }
.select { position: relative; display: inline-flex; align-items: center; min-width: 0; max-width: 62%; flex: none; }
.select select {
  appearance: none; -webkit-appearance: none; height: 40px; max-width: 100%; padding: 0 34px 0 14px; border: 0; border-radius: 12px;
  background: var(--surface-3); color: var(--ink); font: 600 15px/1 var(--text); text-overflow: ellipsis; cursor: pointer;
}
.select select:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.select .sel-chev { position: absolute; right: 11px; width: 15px; height: 15px; color: var(--ink-2); pointer-events: none; }
.optrow .stepper { padding: 3px; background: transparent; }
.optrow .stepper button { width: 36px; height: 36px; font-size: 20px; background: var(--surface-3); }
.optrow .stepper output { min-width: 36px; font-size: 18px; }
.optrow .switch { margin-right: 4px; }
.fold-h { width: 100%; text-align: left; }
.fold-s { flex: 1; min-width: 0; text-align: right; color: var(--ink-2); font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold-chev { width: 18px; height: 18px; margin-right: 6px; color: var(--ink-2); transition: transform .3s; }
.fold.open .fold-chev { transform: rotate(180deg); }
.fold-b { padding: 2px 14px 16px; }
.fold-b .chip:not(.on), .fold-b .input { background: var(--surface-3); }
.group-h.opt-h.first { margin-top: 6px; }
.optcard.first { margin-top: 6px; }
.optrow .ol { min-width: 0; }
.mini-wrap { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--ink-2); font-size: 14.5px; font-weight: 600; }
.optrow .input.mini { width: 128px; height: 40px; padding: 0 12px; border-radius: 12px; border-width: 0; background: var(--surface-3); font-weight: 600; text-align: right; }
.optrow input[type=date].input.mini { width: 150px; }
.optrow .btn.sm { min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14.5px; background: var(--surface-3); flex: none; }
.optrow .ov { min-width: 0; text-align: right; color: var(--ink-2); font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
.hint.opt-note { margin: 8px 6px 0; font-size: 13px; }
.optcard + .linkbtn { display: block; margin-top: 6px; }
.optcard + .inline { margin-top: 10px; }
.attempts { margin: 0; padding: 0 0 0 18px; color: var(--ink); font-size: 14px; line-height: 1.5; }
.slowinfo { margin-top: 14px; }

.togglerow { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; padding: 14px 16px; border-radius: 20px; background: var(--surface-2); }
.togglerow small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.switch { position: relative; width: 54px; height: 32px; border-radius: 16px; background: var(--line-2); flex: none; transition: background .3s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .5s cubic-bezier(.3, 1.5, .5, 1); }
.switch.on { background: var(--green); }
.switch.on span { transform: translateX(22px); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 14px; font-size: 13px; font-weight: 650; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.badge.b-ok { background: var(--green-soft); color: var(--green-t); }
.badge.b-soon { background: var(--amber-soft); color: var(--amber-t); }
.badge.b-expired { background: var(--red-soft); color: var(--red-t); }
.badge.have { background: var(--green-soft); color: var(--green-t); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: 18px; background: var(--amber-soft); color: var(--amber-t); font-size: 14.5px; font-weight: 550; margin-top: 12px; }
.alert .pi { margin-top: 2px; }

.bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--green)); width: var(--w, 0%); transition: width .7s cubic-bezier(.3, 1.1, .4, 1); }
.st-ok { --c: var(--green); } .st-soon { --c: var(--amber); } .st-expired { --c: var(--red); } .st-none { --c: var(--ink-3); }

.group { margin-top: 22px; }
.group-h { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.group-h .gi { width: 26px; height: 26px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); }
.group-h .gi .pi { width: 16px; height: 16px; }
.group-h em { font-style: normal; font-weight: 600; color: var(--ink-3); }
.group-h .gsum { margin-left: auto; font-weight: 600; color: var(--ink-3); }
.group-h.g-soon { color: var(--amber-t); }

.card { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; margin-top: 10px; }
.card.pad { padding: 18px; }

/* righe con icona (risultati di ricerca, revisione scontrino) */
.row { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 16px 12px 14px; min-height: 66px; position: relative; }
.row + .row, .row + .rv, .rv + .row { border-top: 1px solid var(--line); }
.row .emo { flex: none; }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .main b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .main small { color: var(--ink-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.dropped { opacity: .6; }
.emo { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.emo .pi { width: 24px; height: 24px; }
.emo.plus-row { background: var(--green-soft); color: var(--green-t); }


.hscroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll.grab { cursor: grabbing; user-select: none; } .hscroll.grab * { pointer-events: none; }

/* ---------- SPESA ---------- */
.addbar { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 8px 0 18px; border-radius: 27px; background: var(--surface); transition: background .25s; margin-top: 18px; }
/* come i campi di ricerca di iOS: niente cornice colorata, solo un fondo un po' più chiaro e la lente che si accende */
.addbar:focus-within { background: var(--surface-2); }
.addbar .pi { color: var(--ink-3); width: 22px; height: 22px; transition: color .25s; }
.addbar:focus-within .pi { color: var(--green-t); }
.addbar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; -webkit-appearance: none; appearance: none; }
.addbar input::placeholder { color: var(--ink-3); }
.addbar .go { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; flex: none; }
.addbar .go .pi { color: inherit; width: 20px; height: 20px; stroke-width: 2.4; }

.sugs { display: flex; gap: 8px; margin: 0 -20px -8px; padding: 4px 20px 16px; }
.sugs button { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 6px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: 14.5px; }
.sugs .pt { width: 32px; height: 32px; border-radius: 50%; } .sugs .pt .pi { width: 18px; height: 18px; }

.store-h { display: flex; align-items: center; gap: 10px; margin: 26px 2px 10px; }
.store-av { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; font: 650 15px/1 var(--display); color: #fff; background: var(--sc, var(--ink)); flex: none; }
.store-h b { font: 700 19px/1.1 var(--display); }
.store-h > span:last-child { margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 11px 14px 11px 12px; position: relative; background: var(--surface); }
.lrow .pt { width: 46px; height: 46px; border-radius: 15px; transition: opacity .4s, filter .4s; }
.lrow .info { flex: 1; min-width: 0; text-align: left; }
.lrow .nm { font-size: 16.5px; font-weight: 600; line-height: 1.2; background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 0 2px; transition: color .3s, background-size .4s cubic-bezier(.3, .8, .3, 1); display: inline; padding-bottom: 1px; }
.lrow .sub { display: block; color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.lrow .have { color: var(--green-t); font-weight: 650; }
.lrow.done .nm { color: var(--ink-3); background-size: 100% 2px; }
.lrow.done .pt { opacity: .45; filter: saturate(.4); }
.lrow.done .sub, .lrow.done .price { opacity: .5; }
.ck { position: relative; width: 32px; height: 32px; flex: none; border-radius: 50%; border: 2.5px solid var(--line-2); display: grid; place-items: center; transition: background .3s, border-color .3s, box-shadow .3s; }
.ck svg { width: 18px; height: 18px; fill: none; stroke: var(--on-green); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.ck path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s .08s cubic-bezier(.3, .8, .3, 1); }
.ck.on { background: var(--green); border-color: var(--green); box-shadow: 0 6px 14px -6px rgba(0, 216, 88, .9); }
.ck.on path { stroke-dashoffset: 0; }
.totalnote { margin: 18px 4px 0; color: var(--ink-2); font-size: 14px; text-align: center; }
.totalnote b { color: var(--ink); font-variant-numeric: tabular-nums; }
.stickybar { position: sticky; bottom: -38px; margin-top: 20px; z-index: 5; }
.stickybar .btn { box-shadow: 0 18px 34px -12px rgba(0, 216, 88, .85), 0 0 0 6px color-mix(in srgb, var(--bg) 88%, transparent); }

/* ---------- AGGIUNGI ---------- */
.addpage .page-head h1 { max-width: 12ch; }
.scanner {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 18px; padding: 16px 18px 16px 16px; border-radius: 28px; color: #FDFCF5;
  background: radial-gradient(110% 120% at 100% 0%, var(--hero-glow), transparent 60%), var(--hero); box-shadow: var(--shadow-lg);
}
.scanner .cam { width: 52px; height: 52px; border-radius: 18px; background: var(--green); color: var(--on-green); display: grid; place-items: center; flex: none; }
.scanner .cam .pi { width: 28px; height: 28px; stroke-width: 2; }
.scanner div { flex: 1; min-width: 0; text-align: left; }
.scanner b { display: block; font: 700 18px/1.15 var(--display); }
.scanner small { display: block; opacity: .7; margin-top: 3px; font-size: 13.5px; line-height: 1.3; }
.scanner > .pi { opacity: .6; width: 22px; height: 22px; }
.scanner .hat { position: absolute; right: -10px; top: -14px; width: 84px; opacity: .08; transform: rotate(14deg); }

.cats { display: flex; gap: 8px; margin: 14px -20px -6px; padding: 6px 20px 16px; }
.cats .chip { background: var(--surface); box-shadow: var(--shadow); }
.cats .chip.on { background: var(--ink); color: var(--bg); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .55); }
.add-hero { display: flex; align-items: center; gap: 16px; padding-bottom: 6px; }
.add-hero h2 { font: 700 26px/1.1 var(--display); }
.add-hero p { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }

/* ---------- pannelli ---------- */
#sheet { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#sheet > * { pointer-events: auto; }
.backdrop { position: absolute; inset: 0; background: rgba(18, 13, 6, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet-ghost { position: fixed; inset: 0; z-index: 61; pointer-events: none; }
.sheet-ghost > * { pointer-events: none; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 92%; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border-radius: 34px 34px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .28); will-change: transform; }
.sheet-head { position: relative; padding: 10px 64px 8px 22px; touch-action: none; cursor: grab; flex: none; }
.sheet-head .grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 0 auto 14px; position: relative; left: 21px; }
.sheet-head h2 { font: 700 24px/1.15 var(--display); display: flex; align-items: center; gap: 12px; min-height: 40px; }
.sheet-head .iconbtn { position: absolute; right: 16px; top: 22px; }
.sheet-body { overflow-y: auto; padding: 4px 22px 22px; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-body > .field:first-child, .sheet-body > .togglerow:first-child { margin-top: 6px; }
.sheet-foot { padding: 12px 22px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); flex: none; background: var(--surface); }
.sheet-foot .hint { margin: 0 0 10px; }
.sheet p { line-height: 1.45; }
.sheet .card { background: var(--surface-2); box-shadow: none; }
.sheet .group { margin-top: 18px; }
.sheet .badge { flex: none; }
.sheet-hero { display: flex; align-items: center; gap: 16px; padding: 2px 0 6px; }
.sheet-hero .sh-t { min-width: 0; }
.sheet-hero h3 { font: 700 26px/1.1 var(--display); }
.sheet-hero p { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sheet-hero p .pi { width: 16px; height: 16px; }
.fresh { margin: 14px 0 4px; }
.fresh .bar { height: 10px; background: var(--surface-2); }
.fresh .meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.actions .btn { flex-direction: column; min-height: 88px; gap: 8px; border-radius: 22px; font-size: 15px; }
.actions .btn .pi { width: 26px; height: 26px; }
.actions .btn.primary .pi, .actions .btn.danger .pi { stroke-width: 2; }
.actions .btn small { margin: -4px 0 0; }
.namerow { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.iconpick { width: 52px; height: 52px; flex: none; border-radius: 17px; background: var(--surface-2); display: grid; place-items: center; }
.iconpick .pi { width: 28px; height: 28px; }
.iconsgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; }
.iconsgrid button { aspect-ratio: 1; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); }
.iconsgrid button.on { background: var(--green-soft); color: var(--ink); box-shadow: inset 0 0 0 2px var(--green); }
.iconsgrid .pi { width: 24px; height: 24px; }
.steps { padding-left: 20px; margin: 12px 0 0; color: var(--ink-2); line-height: 1.5; } .steps li { margin-bottom: 6px; }

.donerow { padding: 12px 0; } .donerow + .donerow { border-top: 1px solid var(--line); }
.dr-top { display: flex; align-items: center; gap: 12px; font-size: 16px; } .dr-top .pt { width: 40px; height: 40px; border-radius: 13px; } .dr-top .pt .pi { width: 22px; height: 22px; }
.dr-ctl { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.dr-ctl .chips { flex: none; }
.dr-date { flex: 1; min-width: 150px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.dr-date .input { flex: 1; min-width: 0; }

.editor { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.editor .raw { margin-bottom: 8px; font-size: 13px; color: var(--ink-2); } .editor code { background: var(--surface-2); padding: 2px 7px; border-radius: 7px; font-size: 12.5px; }
.editor .field { margin-top: 14px; } .editor .dual { margin-top: 16px; }
.rv { background: var(--surface); }

.working { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 22px 0 10px; }
.working .hint { max-width: 30ch; }
.spinner { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 5px solid var(--green-soft); border-top-color: var(--green); animation: spin 1s linear infinite; }
.spinner-wrap { position: relative; display: grid; place-items: center; }
.spinner-wrap img { position: absolute; width: 38px; animation: bob 1.6s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-4deg); } }

/* ---------- vuoto ---------- */
.empty { text-align: center; padding: 34px 10px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty h2 { font: 700 27px/1.1 var(--display); margin-top: 10px; }
.empty p { color: var(--ink-2); max-width: 30ch; }
.empty .stack { width: 100%; margin-top: 14px; gap: 16px; }
/* l'alone verde del pulsante principale resta sotto di lui: prima arrivava a toccare il pulsante dopo */
.empty .stack .btn.primary { box-shadow: 0 8px 18px -12px rgba(0, 216, 88, .75); }
.empty.small { padding: 40px 10px; }
.art { position: relative; width: 148px; height: 148px; display: grid; place-items: center; }
.art::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--peach-soft); }
.art::after { content: ''; position: absolute; inset: 18px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--terra) 55%, transparent); animation: spin 26s linear infinite; }
.art img { position: relative; width: 64px; animation: bob 3.2s ease-in-out infinite; z-index: 1; }
.art i { position: absolute; border-radius: 50%; background: var(--c); width: var(--s); height: var(--s); left: var(--x); top: var(--y); animation: bob 3s ease-in-out infinite var(--d); }

.tip { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 10px 12px 16px; border-radius: 20px; background: var(--peach-soft); font-size: 14px; }
.tip div { flex: 1; }

/* ---------- avviso a scomparsa ---------- */
#toast {
  position: fixed; left: 0; right: 0; margin: 0 auto; bottom: calc(var(--nav) + 34px + var(--safe-b)); z-index: 80; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 12px 0 20px; border-radius: 26px; background: var(--toast); color: #FDFCF5;
  font-weight: 600; font-size: 15px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transform: translateY(40px) scale(.85); transition: transform .6s cubic-bezier(.3, 1.5, .5, 1), opacity .25s;
}
#toast.show { opacity: 1; pointer-events: auto; transform: none; }
body.sheet-open #toast { bottom: calc(112px + var(--safe-b)); }
body.no-nav #toast { bottom: calc(24px + var(--safe-b)); }
#toast button { height: 36px; padding: 0 14px; border-radius: 18px; background: rgba(128, 128, 128, .28); font-weight: 700; color: var(--green); }
#toast.plain { padding-right: 20px; }

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


/* pulsante Ricette: in basso a sinistra, compare quando il menu è aperto */
.nav-left { position: absolute; left: 18px; bottom: calc(16px + var(--safe-b) + 3px); z-index: 2; display: flex; }
.nav-left .nav-item { flex-direction: row; }
.nav-item.left .ni { background: var(--terra); color: #2A1608; box-shadow: 0 14px 28px -10px rgba(223, 154, 104, .7); }
.nav-item.left .ni .pi { stroke-width: 2; }

/* ricette */
.recipe { background: var(--bg); border-radius: 24px; padding: 4px 0 14px; margin-top: 12px; }
.rc-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px 4px; text-align: left; }
.rc-t { flex: 1; min-width: 0; }
.rc-t b { display: block; font: 700 19px/1.15 var(--display); }
.rc-t small { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 6px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.rc-t small .pi { width: 15px; height: 15px; }
.rc-t small i { font-style: normal; opacity: .5; }
.rc-chev { width: 22px; height: 22px; color: var(--ink-2); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.recipe.open .rc-chev { transform: rotate(180deg); }
.rc-sum { padding: 4px 16px 0; color: var(--ink-2); font-size: 14.5px; }
.rc-ing { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 0; }
.rc-ing .badge { height: 26px; font-size: 12.5px; }
.rc-steps { margin: 14px 16px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; animation: rc-in .5s cubic-bezier(.2, .9, .25, 1); }
.rc-steps li::marker { color: var(--green-t); font-weight: 700; }
.rc-tip { display: flex; gap: 8px; margin: 12px 16px 0; padding: 12px 14px; border-radius: 16px; background: var(--peach-soft); font-size: 14px; animation: rc-in .5s cubic-bezier(.2, .9, .25, 1); }
.rc-tip .pi { color: var(--terra); margin-top: 2px; }
.recipe > .btn { margin: 14px 16px 0; width: calc(100% - 32px); animation: rc-in .5s cubic-bezier(.2, .9, .25, 1); }
@keyframes rc-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Spesa ---------- */
.ckhit { align-self: stretch; width: 56px; margin: -11px 0 -11px -12px; display: grid; place-items: center; flex: none; }   /* tocco largo quanto la riga, mai oltre */
.swipehint { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 550; }
.swipehint .pi { color: var(--terra); }

/* ---------- materiali: la parte che galleggia è vetro, il contenuto è solido ---------- */
.fab, .nav-item .ni, .nav-item .nl, #toast {
  -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8);
}
.fab { background: color-mix(in srgb, var(--pill) 78%, transparent); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .16); }
.nav-item .ni { background: color-mix(in srgb, var(--pill) 78%, transparent); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .16); }
.nav-item.primary .ni { background: color-mix(in srgb, var(--green) 88%, transparent); box-shadow: 0 14px 28px -10px rgba(0, 216, 88, .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.nav-item.left .ni { background: color-mix(in srgb, var(--terra) 88%, transparent); box-shadow: 0 14px 28px -10px rgba(223, 154, 104, .7), inset 0 1px 0 rgba(255, 255, 255, .35); }
.nav-item .nl { background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
#toast { background: color-mix(in srgb, var(--toast) 82%, transparent); }
.sheet { background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(34px) saturate(1.7); backdrop-filter: blur(34px) saturate(1.7); box-shadow: 0 -20px 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .1); }
.sheet-foot { background: transparent; }

/* titoli: più stretti man mano che crescono; testo piccolo: un filo più largo (come fa il sistema) */

@media (prefers-reduced-transparency: reduce) {
  .fab, .nav-item .ni, .nav-item .nl, #toast, .sheet, #top::before { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .fab, .nav-item .ni { background: var(--pill); }
  .nav-item .nl { background: var(--surface); }
  .sheet { background: var(--surface); }
  #toast { background: var(--toast); }
  #top::before { background: var(--bg); }
}
@media (prefers-contrast: more) {
  .lcard, .card, .addbar { box-shadow: 0 0 0 1.5px var(--line-2); }
  .fab, .nav-item .ni { box-shadow: 0 0 0 1.5px var(--line-2); }
}

/* ---------- liste raggruppate (Casa, Aggiungi, Prodotti, Spesa) ---------- */
.lsec { margin-top: 24px; }
.lsec:first-child { margin-top: 4px; }
.lh { display: flex; align-items: center; gap: 7px; margin: 0 6px 8px; font-size: 13px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); }
.lh .pi { width: 15px; height: 15px; stroke-width: 2.2; }
.lh em { font-style: normal; margin-left: auto; color: var(--ink-3); text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.lsec.urgent .lh { color: var(--amber-t); }
.lcard { --sep: 67px; background: var(--surface); border-radius: 20px; overflow: hidden; }
.lcard.shop { --sep: 0px; }
.row2 { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 62px; padding: 11px 16px 11px 14px; text-align: left; }
.rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rt b { font-size: 17px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt small { color: var(--ink-2); font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv { flex: none; color: var(--ink-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.rv.st-soon { color: var(--amber-t); font-weight: 600; }
.rv.st-expired { color: var(--red-t); font-weight: 600; }

/* separatori inseriti dopo l'icona, come in iOS */
.lcard .swipe + .swipe .swipe-face::before, .lcard .arow + .arow::before, .lcard .prow + .prow::before {
  content: ''; position: absolute; top: 0; left: var(--sep); right: 0; height: 1px; background: var(--line); pointer-events: none;
}
.arow, .prow { position: relative; display: flex; align-items: stretch; }
.arow .row2, .prow .row2 { flex: 1; min-width: 0; }

/* righe che si scorrono di lato */
.swipe { position: relative; }
.swipe-acts { position: absolute; top: 0; right: 0; bottom: 0; display: flex; opacity: 0; transition: opacity .2s .18s; }
.swipe.open .swipe-acts, .swipe.dragging .swipe-acts { opacity: 1; transition: none; }
.swipe-acts button { width: 84px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; }
.swipe-acts .pi { width: 22px; height: 22px; }
.swipe-acts .ok { background: var(--green); color: var(--on-green); }
.swipe-acts .bad { background: var(--red); color: #fff; }
.swipe-face { position: relative; background: var(--surface); touch-action: pan-y; }

/* aggiungi: la colonna a destra è larga quanto la riga, così non si sbaglia mai */
.addhit { width: 66px; flex: none; display: grid; place-items: center; }
.addbtn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-t); }
.addbtn .pi { width: 18px; height: 18px; stroke-width: 2.6; }

/* prodotti: cuore e pollice */
.rates { display: flex; align-items: stretch; flex: none; padding-right: 6px; }
.rb { width: 46px; display: grid; place-items: center; color: var(--ink-3); }
.rb .pi { width: 22px; height: 22px; transition: transform .5s cubic-bezier(.3, 1.8, .5, 1), color .25s; }
.rb.good.on { color: var(--red-t); } .rb.good.on .pi { fill: currentColor; transform: scale(1.15); }
.rb.bad.on { color: var(--amber-t); } .rb.bad.on .pi { fill: currentColor; transform: scale(1.12); }

/* filtri a segmenti */
.seg-track { position: relative; display: flex; gap: 2px; padding: 3px; margin: 6px 0 14px; border-radius: 999px; background: var(--surface); }
.seg-track .ind { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 999px; background: var(--surface-3); opacity: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.seg-track button { position: relative; z-index: 1; flex: 1 0 auto; justify-content: center; height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; color: var(--ink-2); font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: color .3s; }
.seg-track button.on { color: #fff; }

.hsearch { display: flow-root; overflow: hidden; overflow: clip; }   /* "clip": niente scorrimento interno, nemmeno quando il campo prende il focus */
.hsearch .addbar { margin: 4px 0 10px; }          /* 4 + 54 + 10 = 68 = SEARCH_H: il contenuto sta esattamente nella barra aperta */
.page-head .warn { color: var(--amber-t); }

/* ---------- confezioni aperte / chiuse ---------- */
.rt small .op { color: var(--amber-t); font-weight: 600; }
.swipe-acts .open { background: var(--amber); color: #2A1A00; }
.btn.amber { background: var(--amber-soft); color: var(--amber-t); }
.op-line { display: flex; align-items: flex-start; gap: 8px; }
.op-line .pi { margin-top: 2px; color: var(--amber-t); }
.actions .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* se i pulsanti sono dispari, l'ultimo occupa tutta la riga */
.actions .btn.amber small { color: inherit; opacity: .8; }

/* ---------- ricette: schede, cuore, origine ---------- */
.chips.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tabs2 .chip { min-height: 44px; border-radius: 14px; }
.tabs2 .chip .pi { width: 18px; height: 18px; }
.rc-top { display: flex; align-items: flex-start; }
.rc-top .rc-head { flex: 1; width: auto; min-width: 0; }
.rc-fav { width: 52px; height: 52px; flex: none; display: grid; place-items: center; color: var(--ink-3); margin: 4px 4px 0 0; }
.rc-fav .pi { width: 24px; height: 24px; transition: transform .5s cubic-bezier(.3, 1.8, .5, 1), color .25s; }
.rc-fav.on { color: var(--red-t); }
.rc-fav.on .pi { fill: currentColor; transform: scale(1.1); }
.rc-o { display: block; margin-bottom: 5px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rc-o.o-classica { color: var(--green-t); }
.rc-o.o-adattata { color: var(--amber-t); }
.rc-o.o-inventata { color: var(--terra); }

/* ---------- pagina di benvenuto (js/landing.js): chi apre Cooky nel browser la prima volta ----------
   Copre l'app (già pronta sotto). Poche cose e tanto spazio: nella prima schermata icona, nome, una frase e un pulsante;
   sotto, tre cose che fa e i passi solo per il dispositivo di chi guarda. */
.lp {
  position: fixed; inset: 0; z-index: 90; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--bg); transition: opacity .3s, transform .3s; scrollbar-width: none;
}
.lp::-webkit-scrollbar { display: none; }
.lp.out { opacity: 0; transform: scale(.985); pointer-events: none; }
.lp-in { max-width: 460px; margin: 0 auto; padding: 0 24px calc(var(--safe-b) + 32px); }
.lp .linkbtn { color: var(--ink-2); font-weight: 600; }

/* prima schermata: alta quanto il telefono, tutto al centro */
.lp-hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: calc(var(--safe-t) + 40px) 0 104px;
}
.lp-hero::before {
  content: ''; position: absolute; top: 50%; left: 50%; width: 440px; height: 440px; margin: -340px 0 0 -220px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--hero-glow), transparent); opacity: .4; pointer-events: none;
}
.lp-hero > * { position: relative; animation: lp-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.lp-hero > :nth-child(2) { animation-delay: .06s; }
.lp-hero > :nth-child(3) { animation-delay: .12s; }
.lp-hero > :nth-child(4) { animation-delay: .18s; }
.lp-hero > :nth-child(5) { animation-delay: .6s; }
@keyframes lp-rise { from { opacity: 0; transform: translateY(14px); } }
.lp-icon { width: 104px; height: 104px; border-radius: 24px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 26px 50px -22px rgba(0, 216, 88, .6); }
.lp-word { margin-top: 30px; line-height: 0; }
.lp-word img { width: 138px; height: auto; }
.lp-tag { margin-top: 16px; font: 500 21px/1.35 var(--display); max-width: 17ch; }
.lp-cta { width: 100%; margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lp-done {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 16px;
  border-radius: 20px; background: var(--green-soft); color: var(--green-t); font-weight: 650;
}
.lp-more {
  position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 22px); width: max-content; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 14px; color: var(--ink-3); font-size: 14px; font-weight: 600;
}
.lp-more .pi { width: 20px; height: 20px; animation: lp-bob 2.4s ease-in-out infinite; }
@keyframes lp-bob { 50% { transform: translateY(3px); } }

/* sotto: una cosa per volta, con spazio */
.lp-sec { padding-top: 28px; margin-bottom: 64px; }
.lp-sec > h2 { font: 700 28px/1.15 var(--display); margin-bottom: 28px; }
.lp-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.lp-feats li { display: flex; align-items: center; gap: 18px; }
.lp-feats b { display: block; font: 650 19px/1.25 var(--display); }
.lp-feats div > span { display: block; margin-top: 3px; color: var(--ink-2); font-size: 15.5px; line-height: 1.4; }
.lp-small { margin-top: 28px; color: var(--ink-3); font-size: 14px; line-height: 1.45; }

.lp-steps { list-style: none; margin: 0; padding: 6px 0; border-radius: 24px; background: var(--surface); }
.lp-steps li { display: flex; align-items: flex-start; gap: 16px; padding: 16px 20px; }
.lp-num {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green-t); font-weight: 700; font-size: 16px;
}
.lp-steps p { flex: 1; padding-top: 5px; font-size: 17px; line-height: 1.35; }
.lp-steps small { display: block; margin-top: 5px; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.lp-steps .pi { display: inline-block; width: 19px; height: 19px; vertical-align: -3px; color: var(--green-t); }
.lp-other { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; color: var(--ink-3); font-size: 14px; }
.lp-other button { padding: 8px 0; color: var(--green-t); font-weight: 600; font-size: 14px; }
.lp-inapp { padding: 20px; border-radius: 24px; background: var(--peach-soft); line-height: 1.45; }
.lp-inapp p + p { margin-top: 6px; }
.lp-inapp .btn { margin-top: 18px; }
.lp-flash { animation: lp-flash 1.4s ease; }
@keyframes lp-flash { 20% { box-shadow: 0 0 0 3px var(--green); } }
.lp-foot { display: flex; justify-content: center; }
