/* ─────────────────────────────────────────────────────────────
   CAMBUSA — design system "cambusa di bordo"
   carta paglia + inchiostro navy + pomodoro; Fraunces + Figtree
   ───────────────────────────────────────────────────────────── */

:root {
  --paper: #F7F2E9;
  --paper-deep: #EFE6D6;
  --paper-card: #FCF9F3;
  --ink: #1B2A41;
  --ink-soft: #4A5871;
  --ink-faint: #8791A3;
  --tomato: #E2492F;
  --tomato-deep: #C43A24;
  --tomato-soft: #F8DED7;
  --sage: #6F8262;
  --sage-bg: #E6EBDD;
  --mustard: #D9A62E;
  --mustard-bg: #F5E8C8;
  --line: rgba(27, 42, 65, .14);
  --line-strong: rgba(27, 42, 65, .28);
  --shadow: 0 1px 2px rgba(27,42,65,.05), 0 6px 18px -8px rgba(27,42,65,.14);
  --shadow-lift: 0 2px 4px rgba(27,42,65,.06), 0 14px 34px -10px rgba(27,42,65,.22);
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-ui: 'Figtree', -apple-system, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar-h: 62px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { height: 100%; }

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  min-height: 100%;
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; color: var(--ink); }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ── topbar ─────────────────────────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 18px 10px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { width: 25px; height: 25px; color: var(--tomato); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.32rem; letter-spacing: .01em;
  font-variation-settings: 'opsz' 40;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink-soft); }
.icon-btn:active { background: var(--paper-deep); }
.icon-btn svg { width: 21px; height: 21px; }

.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sage); transition: background .3s; }
.sync-dot.syncing { background: var(--mustard); animation: pulse 1s infinite alternate; }
.sync-dot.offline { background: var(--ink-faint); }
.sync-dot.error { background: var(--tomato); }
.sync-dot.unconfigured { background: var(--ink-faint); box-shadow: 0 0 0 3px var(--tomato-soft); }
@keyframes pulse { from { opacity: .45; } to { opacity: 1; } }

/* ── layout / view ───────────────────────────────────────── */

.view {
  max-width: 560px; margin: 0 auto;
  padding: 18px 18px calc(var(--tabbar-h) + var(--safe-b) + 28px);
  animation: view-in .3s cubic-bezier(.2,.7,.3,1);
}
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.page-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.7rem; line-height: 1.15; letter-spacing: -.01em;
  margin: 6px 0 4px; font-variation-settings: 'opsz' 60;
}
.page-sub { color: var(--ink-soft); font-size: .95rem; margin-bottom: 18px; }

/* ── tabbar ─────────────────────────────────────────────── */

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--paper-card) 92%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: .68rem; font-weight: 600; letter-spacing: .02em;
  color: var(--ink-faint); transition: color .2s;
}
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.active { color: var(--tomato-deep); }
.tabbar a.active::before {
  content: ''; position: absolute; top: 0; width: 34px; height: 3px;
  background: var(--tomato); border-radius: 0 0 3px 3px;
}
.tab-badge {
  position: absolute; top: 7px; left: calc(50% + 6px);
  min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--tomato); color: #fff;
  font-size: .62rem; font-weight: 700; border-radius: 9px;
}

/* ── bottoni ────────────────────────────────────────────── */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 20px;
  background: var(--tomato); color: #fff;
  font-size: 1.02rem; font-weight: 700; letter-spacing: .01em;
  border-radius: var(--r-m);
  box-shadow: 0 2px 0 var(--tomato-deep), var(--shadow);
  transition: transform .12s, box-shadow .12s, opacity .2s;
}
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--tomato-deep), var(--shadow); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.secondary {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line-strong); box-shadow: none;
}
.btn.secondary:active { background: var(--paper-deep); transform: none; }
.btn.ghost { background: transparent; color: var(--tomato-deep); box-shadow: none; padding: 10px; width: auto; }
.btn.small { padding: 9px 14px; font-size: .88rem; width: auto; border-radius: var(--r-s); }

/* ── card ───────────────────────────────────────────────── */

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card + .card { margin-top: 12px; }

/* ── etichette corsia (stencil da cassetta) ─────────────── */

.aisle-label {
  display: flex; align-items: baseline; gap: 10px;
  margin: 22px 2px 8px;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.aisle-label::after { content: ''; flex: 1; border-top: 1px solid var(--line-strong); transform: translateY(-3px); }
.aisle-label .count { color: var(--ink-faint); font-weight: 600; letter-spacing: .04em; }

/* ── lista spesa: righe + checkbox timbro ───────────────── */

.item-row {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 4px;
  border-bottom: 1px dashed var(--line);
  animation: row-in .35s both;
}
@keyframes row-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.stamp {
  flex: none; width: 30px; height: 30px;
  border: 2px solid var(--line-strong);
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--paper-card);
  transition: background .15s, border-color .15s, transform .15s;
}
.stamp svg { width: 17px; height: 17px; opacity: 0; transform: scale(.4) rotate(-14deg); transition: opacity .18s, transform .22s cubic-bezier(.2,1.6,.4,1); }
.item-row.checked .stamp { background: var(--tomato); border-color: var(--tomato-deep); animation: stamp-pop .3s; }
.item-row.checked .stamp svg { opacity: 1; transform: scale(1) rotate(0); color: #fff; }
@keyframes stamp-pop { 40% { transform: scale(1.18) rotate(3deg); } }

.item-main { flex: 1; min-width: 0; }
.item-name { font-weight: 600; font-size: 1.0rem; transition: color .2s; }
.item-qty { font-size: .8rem; color: var(--ink-faint); }
.item-row.checked .item-name {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: var(--tomato);
  text-decoration-thickness: 2px;
}
.item-price {
  font-family: var(--font-display); font-size: .92rem; font-weight: 600;
  color: var(--ink-soft); white-space: nowrap;
}
.item-price.real { color: var(--sage); }
.item-row .row-x { color: var(--ink-faint); width: 34px; height: 34px; flex: none; display: grid; place-items: center; }
.item-row .row-x svg { width: 15px; height: 15px; }

/* progress lista */
.progress-wrap { margin: 4px 0 6px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.progress-count { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.progress-note { font-size: .78rem; color: var(--ink-faint); }
.progress-bar { height: 7px; background: var(--paper-deep); border-radius: 4px; overflow: hidden; }
.progress-bar i {
  display: block; height: 100%; background: var(--tomato);
  border-radius: 4px; transition: width .4s cubic-bezier(.2,.7,.3,1);
}
.progress-bar.done i { background: var(--sage); }

/* budget strip */
.budget-strip {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; margin-top: 14px;
  background: var(--paper-deep); border-radius: var(--r-m);
  font-size: .86rem; color: var(--ink-soft);
}
.budget-strip b { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }
.budget-strip .over { color: var(--tomato-deep); }

/* ── dispensa: gauge a 3 stati ──────────────────────────── */

.pantry-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px dashed var(--line);
}
.pantry-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gauge { flex: none; display: flex; gap: 4px; }
.gauge button {
  width: 44px; height: 30px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  font-size: .62rem; font-weight: 700; letter-spacing: .03em;
  color: var(--ink-faint);
  display: grid; place-items: center;
  transition: all .15s;
}
.gauge button.on[data-state="ok"]  { background: var(--sage-bg); border-color: var(--sage); color: var(--sage); }
.gauge button.on[data-state="low"] { background: var(--mustard-bg); border-color: var(--mustard); color: #97701A; }
.gauge button.on[data-state="out"] { background: var(--tomato-soft); border-color: var(--tomato); color: var(--tomato-deep); }

.pantry-add {
  display: flex; gap: 8px; margin: 12px 0 4px;
}
.pantry-add input {
  flex: 1; padding: 11px 14px;
  background: var(--paper-card);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-m);
}
.pantry-add input:focus { outline: none; border-color: var(--ink); }

/* ── wizard ─────────────────────────────────────────────── */

.wiz-progress { display: flex; gap: 5px; margin: 4px 0 16px; }
.wiz-progress i { flex: 1; height: 3.5px; background: var(--paper-deep); border-radius: 2px; }
.wiz-progress i.done { background: var(--tomato); }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-grid.single { grid-template-columns: 1fr; }

.opt-card {
  position: relative; text-align: left;
  padding: 14px; min-height: 74px;
  background: var(--paper-card);
  border: 1.5px solid var(--line); border-radius: var(--r-m);
  transition: border-color .15s, background .15s, transform .1s;
}
.opt-card:active { transform: scale(.98); }
.opt-card.on { border-color: var(--tomato); background: #FDF2EE; box-shadow: 0 0 0 1px var(--tomato); }
.opt-card .t { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 2px; }
.opt-card .d { display: block; font-size: .78rem; color: var(--ink-soft); line-height: 1.3; }
.opt-card .tick {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--tomato); color: #fff;
  display: none; place-items: center;
}
.opt-card .tick svg { width: 11px; height: 11px; }
.opt-card.on .tick { display: grid; }

/* tile supermercati */
.market-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.market-tile {
  height: 86px; border-radius: var(--r-m);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  color: #fff; letter-spacing: .02em;
  border: 2.5px solid transparent;
  box-shadow: var(--shadow);
  transition: transform .12s, border-color .15s, box-shadow .15s;
}
.market-tile:active { transform: scale(.97); }
.market-tile.on { border-color: var(--ink); box-shadow: var(--shadow-lift); }
.market-tile.conad { background: #C8321E; }
.market-tile.pam { background: #1E63AF; }
.market-tile.ali { background: #E07C1F; }
.market-tile.coop { background: #C93334; }

/* stepper persone/budget */
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--paper-card); border: 1.5px solid var(--line);
  border-radius: var(--r-l); padding: 14px 16px;
}
.stepper + .stepper { margin-top: 12px; }
.stepper .lab { font-weight: 600; }
.stepper .lab small { display: block; font-weight: 400; font-size: .78rem; color: var(--ink-soft); }
.stepper .ctrl { display: flex; align-items: center; gap: 14px; }
.stepper .val {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  min-width: 74px; text-align: center; font-variant-numeric: tabular-nums;
}
.stepper button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font-size: 1.3rem; font-weight: 600; line-height: 1;
  display: grid; place-items: center;
  transition: background .12s, transform .12s;
}
.stepper button:active { background: var(--paper-deep); transform: scale(.92); }

.field-label { display: block; font-weight: 600; font-size: .88rem; margin: 16px 0 7px; }
.text-input, textarea.text-input {
  width: 100%; padding: 12px 14px;
  background: var(--paper-card);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-m);
  resize: none;
}
.text-input:focus { outline: none; border-color: var(--ink); }

.wiz-nav { display: flex; gap: 10px; margin-top: 22px; }
.wiz-nav .btn.secondary { width: auto; padding-inline: 18px; }

/* ── piano pasti ────────────────────────────────────────── */

.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--paper-deep); border-radius: var(--r-m); padding: 4px;
  margin: 14px 0 6px;
}
.seg button {
  padding: 9px; border-radius: 10px;
  font-weight: 700; font-size: .92rem; color: var(--ink-soft);
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button.on { background: var(--paper-card); color: var(--ink); box-shadow: var(--shadow); }

.day-label {
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  margin: 18px 2px 8px; color: var(--ink);
}
.day-label small { font-family: var(--font-ui); color: var(--ink-faint); font-size: .75rem; margin-left: 6px; }

.meal-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--paper-card);
  border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--shadow);
  padding: 13px 14px; margin-bottom: 10px;
  animation: row-in .35s both;
}
.meal-emoji {
  flex: none; width: 46px; height: 46px; border-radius: 14px;
  background: var(--paper-deep);
  display: grid; place-items: center; font-size: 24px;
}
.meal-main { flex: 1; min-width: 0; }
.meal-title { font-weight: 700; font-size: .98rem; line-height: 1.25; }
.meal-meta { display: flex; gap: 10px; font-size: .78rem; color: var(--ink-soft); margin-top: 3px; }
.meal-meta b { font-weight: 600; }
.meal-regen {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  color: var(--ink-faint); display: grid; place-items: center;
}
.meal-regen svg { width: 18px; height: 18px; }
.meal-regen:active { background: var(--paper-deep); color: var(--tomato-deep); }
.meal-regen.spin svg { animation: spin 1s linear infinite; color: var(--mustard); }
@keyframes spin { to { transform: rotate(360deg); } }

/* riepilogo piano (card "buon appetito") */
.plan-hero { text-align: left; margin-bottom: 14px; }
.plan-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-top: 12px;
}
.plan-stat {
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 9px 6px; text-align: center;
}
.plan-stat b { display: block; font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; }
.plan-stat span { font-size: .64rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }

/* feedback box */
.feedback-box textarea { min-height: 74px; }
.feedback-box .btn { margin-top: 10px; }

/* ── ricetta ────────────────────────────────────────────── */

.recipe-hero {
  text-align: center; padding: 26px 16px 20px;
  background: var(--paper-deep);
  border-radius: var(--r-l); margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.recipe-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% -30%, rgba(226,73,47,.16), transparent 60%);
}
.recipe-emoji { font-size: 52px; display: block; margin-bottom: 8px; position: relative; }
.recipe-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.45rem;
  line-height: 1.2; position: relative;
}
.recipe-slot {
  display: inline-block; margin-top: 8px; padding: 4px 12px;
  background: var(--paper-card); border-radius: 20px;
  font-size: .76rem; font-weight: 600; color: var(--ink-soft);
  position: relative;
}

.chip-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.chip {
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 9px 4px; text-align: center;
}
.chip b { display: block; font-family: var(--font-display); font-size: 1.0rem; }
.chip span { font-size: .62rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }
.chip.macro-p { background: var(--sage-bg); border-color: transparent; }
.chip.macro-c { background: var(--mustard-bg); border-color: transparent; }
.chip.macro-f { background: var(--tomato-soft); border-color: transparent; }

.section-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin: 20px 2px 8px;
}
.ing-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 9px 2px; border-bottom: 1px dashed var(--line);
  font-size: .95rem;
}
.ing-row .qty { color: var(--ink-soft); font-family: var(--font-display); font-size: .88rem; white-space: nowrap; }
.pantry-badge {
  font-size: .64rem; font-weight: 700; letter-spacing: .04em;
  padding: 2.5px 8px; border-radius: 10px;
  background: var(--sage-bg); color: var(--sage);
}
.step-row { display: flex; gap: 12px; padding: 9px 2px; }
.step-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  display: grid; place-items: center;
}

/* ── stato job / banner ─────────────────────────────────── */

.job-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; border-radius: var(--r-m);
  background: var(--mustard-bg); border: 1px solid rgba(217,166,46,.4);
  font-size: .9rem; font-weight: 500; margin-bottom: 14px;
  animation: view-in .3s;
}
.job-banner.error { background: var(--tomato-soft); border-color: rgba(226,73,47,.35); }
.job-banner .spinner {
  flex: none; width: 18px; height: 18px;
  border: 2.5px solid rgba(27,42,65,.15); border-top-color: var(--mustard);
  border-radius: 50%; animation: spin 1s linear infinite;
}
.job-banner.error .spinner { display: none; }

/* ── home ───────────────────────────────────────────────── */

.hero-empty { text-align: center; padding: 44px 10px 30px; }
.hero-empty .big { font-size: 56px; display: block; margin-bottom: 12px; }
.hero-empty h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.55rem;
  line-height: 1.2; margin-bottom: 8px; letter-spacing: -.01em;
}
.hero-empty p { color: var(--ink-soft); font-size: .95rem; max-width: 300px; margin: 0 auto 22px; }

.home-tile {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--r-l); box-shadow: var(--shadow);
  padding: 15px 16px; margin-top: 12px;
}
.home-tile .emoji { font-size: 26px; }
.home-tile .t { font-weight: 700; }
.home-tile .d { font-size: .8rem; color: var(--ink-soft); }
.home-tile .arrow { margin-left: auto; color: var(--ink-faint); }

/* ── sheet / dialog ─────────────────────────────────────── */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(27,42,65,.4);
  animation: fade-in .2s;
}
@keyframes fade-in { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  background: var(--paper); border-radius: 22px 22px 0 0;
  padding: 10px 20px calc(24px + var(--safe-b));
  max-width: 560px; margin: 0 auto;
  max-height: 82vh; overflow-y: auto;
  animation: sheet-up .3s cubic-bezier(.2,.8,.3,1);
  box-shadow: 0 -10px 40px rgba(27,42,65,.25);
}
@keyframes sheet-up { from { transform: translateY(60%); opacity: .4; } }
.sheet-handle { width: 40px; height: 4px; background: var(--line-strong); border-radius: 2px; margin: 4px auto 14px; }
.sheet h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin-bottom: 4px; }
.sheet .sub { color: var(--ink-soft); font-size: .88rem; margin-bottom: 14px; }

/* ── toast ──────────────────────────────────────────────── */

.toast-zone {
  position: fixed; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  left: 0; right: 0; z-index: 70;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: var(--paper);
  padding: 11px 20px; border-radius: 30px;
  font-size: .88rem; font-weight: 600;
  box-shadow: var(--shadow-lift);
  animation: toast-in .3s cubic-bezier(.2,1.2,.4,1), fade-out .3s 2.7s forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.9); } }
@keyframes fade-out { to { opacity: 0; transform: translateY(6px); } }

/* ── welcome / prima apertura ───────────────────────────── */

.welcome {
  min-height: calc(100dvh - 160px - var(--safe-t) - var(--safe-b));
  display: flex; flex-direction: column; justify-content: center;
  text-align: center; padding: 20px 6px;
}
.welcome .mark { font-size: 64px; margin-bottom: 14px; }
.welcome h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 2.1rem;
  letter-spacing: -.01em; margin-bottom: 8px;
}
.welcome p { color: var(--ink-soft); max-width: 300px; margin: 0 auto 24px; }
.welcome .text-input { text-align: center; font-size: 1.1rem; letter-spacing: .06em; }
.welcome .btn { margin-top: 12px; }

/* disclaimer prezzi */
.price-note { font-size: .72rem; color: var(--ink-faint); text-align: center; margin: 14px 0 4px; }

/* util */
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.muted { color: var(--ink-soft); font-size: .88rem; }
.center { text-align: center; }

@media (min-width: 700px) {
  .view { padding-top: 28px; }
}
