/* labusta.it — «carta, sigillo e coriandoli». Solo CSS, animazioni dentro prefers-reduced-motion. */
@font-face {
  font-family: 'Bricolage';
  src: url('/fonts/bricolage.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #22172e;
  --muted: #6b5e73;
  --paper: #fff7ec;
  --card: #ffffff;
  --line: #efe2d2;
  --line-strong: #c9b7a6;
  --tomato: #f2542d;
  --tomato-ink: #c2381a;
  --tomato-soft: #ffe4da;
  --butter: #ffc93c;
  --butter-soft: #fff1c7;
  --lilac: #cdbdff;
  --lilac-soft: #efe9ff;
  --mint: #8fe3c0;
  --ok: #1f7a55;
  /* compatibilità con le classi esistenti */
  --accent: var(--tomato);
  --accent-dark: var(--tomato-ink);
  --gold: var(--butter);
  --radius: 26px;
  --radius-sm: 16px;
  --shadow: 0 1px 1px rgba(34, 23, 46, .04), 0 2px 4px rgba(34, 23, 46, .04), 0 12px 32px -12px rgba(34, 23, 46, .18);
  --shadow-lg: 0 2px 2px rgba(34, 23, 46, .04), 0 8px 16px rgba(34, 23, 46, .06), 0 32px 64px -24px rgba(34, 23, 46, .28);
  --display: 'Bricolage', ui-rounded, system-ui, sans-serif;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 19.4%, 1.067, 1.077 24.3%, 1.064 26.6%, 1.007 34.7%, .987 39.2%, .998 51.4%, 1);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
}

@view-transition { navigation: auto; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* sfondo «al plasma»: tre macchie morbide che si muovono piano */
body::before {
  content: '';
  position: fixed;
  inset: -30vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(28vmax 28vmax at 18% 22%, rgba(242, 84, 45, .16), transparent 70%),
    radial-gradient(32vmax 32vmax at 82% 12%, rgba(255, 201, 60, .22), transparent 70%),
    radial-gradient(30vmax 30vmax at 70% 78%, rgba(205, 189, 255, .30), transparent 70%);
}
main { max-width: 680px; margin: 0 auto; padding: 0 18px 40px; }
a { color: var(--tomato-ink); text-underline-offset: 3px; }
::selection { background: var(--butter); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3, .display { font-family: var(--display); line-height: 1.04; margin: 0 0 .45em; letter-spacing: -.025em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(34px, 9vw, 56px); }
h2 { font-size: clamp(22px, 5.4vw, 28px); letter-spacing: -.02em; }
h3 { font-size: 19px; margin-top: 1.1em; letter-spacing: -.01em; }
p { margin: 0 0 .9em; text-wrap: pretty; }

/* header */
.top { max-width: 680px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top-link { font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1.5px var(--line); }
.top-link:hover { background: #fff; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 25px; letter-spacing: -.04em; font-weight: 500; view-transition-name: logo; }
.logo b { font-weight: 800; color: var(--ink); }
.logo i { font-style: normal; font-weight: 700; color: var(--tomato); font-size: .62em; margin-left: 1px; }
.logo svg { flex: none; filter: drop-shadow(0 3px 6px rgba(242, 84, 45, .3)); }

/* superfici */
.card { position: relative; background: var(--card); border-radius: var(--radius); padding: 24px; margin: 0 0 16px; box-shadow: var(--shadow); }
.card > h2:first-child { margin-top: 0; }
.narrow { max-width: 540px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.small { font-size: 14px; color: var(--muted); }
.muted { color: var(--muted); }
.hint { font-weight: 400; color: var(--muted); font-size: 14px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: var(--butter-soft); border-radius: 999px; padding: 6px 12px; margin-bottom: 14px; }
.lead { font-size: 19px; color: #3d3047; }
.big-emoji { font-size: 64px; line-height: 1; }
.mark { background: linear-gradient(transparent 62%, var(--butter) 62%, var(--butter) 92%, transparent 92%); padding: 0 .06em; }

/* pulsanti: si schiacciano al tocco */
.btn {
  --b: var(--ink); --c: var(--paper); --s: #000;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; border: 0; border-radius: 999px; padding: 12px 24px; margin: 4px 0;
  background: var(--b); color: var(--c); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--s), 0 10px 20px -8px rgba(34, 23, 46, .45);
  transition: transform .18s var(--pop), box-shadow .18s var(--pop), background .2s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--s), 0 14px 24px -8px rgba(34, 23, 46, .5); }
.btn:active { transform: translateY(3px) scale(.985); box-shadow: 0 1px 0 var(--s), 0 4px 10px -6px rgba(34, 23, 46, .4); transition-duration: .06s; }
.btn.big { --b: var(--tomato); --c: #fff; --s: #a8300f; display: flex; width: 100%; min-height: 60px; padding: 16px 22px; font-family: var(--display); font-size: 21px; letter-spacing: -.01em; text-align: center; }
.btn.small { min-height: 44px; padding: 8px 18px; font-size: 15px; box-shadow: 0 3px 0 var(--s); }
.btn.small:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--s); }
.btn.ghost { --b: #fff; --c: var(--ink); --s: var(--line-strong); box-shadow: inset 0 0 0 2px var(--ink), 0 3px 0 var(--ink); }
.btn.ghost:hover { --b: var(--butter-soft); }
.btn.ghost:active { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 var(--ink); }
.btn.danger { --b: #fff; --c: #a3290f; box-shadow: inset 0 0 0 2px #e9b3a5, 0 3px 0 #e9b3a5; }
.btn[disabled] { opacity: .65; cursor: wait; transform: none; }
.hero .btn.big { max-width: 360px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.actions .btn { flex: 1 1 200px; text-align: center; }
.actions form { flex: 1 1 200px; margin: 0; }
.actions form .btn { width: 100%; }

/* form */
.form fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.form legend { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; margin-bottom: 10px; }
.form label { display: block; font-weight: 650; margin-bottom: 16px; }
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form select, .form textarea, .copy-row input, textarea {
  display: block; width: 100%; min-height: 52px; margin-top: 6px; padding: 13px 16px; font: inherit; font-size: 17px; font-weight: 400; color: var(--ink);
  background: #fffdf9; border: 2px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .2s, background .15s;
}
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--line-strong); }
.form input:focus, .form select:focus, .form textarea:focus, textarea:focus { outline: none; background: #fff; border-color: var(--ink); box-shadow: 0 0 0 5px var(--butter-soft); }
.form input[type=file] { display: block; width: 100%; margin-top: 6px; padding: 14px; border: 2px dashed var(--line-strong); border-radius: var(--radius-sm); background: #fffdf9; font: inherit; font-size: 15px; }
.form input[type=file]::file-selector-button { font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 8px 14px; margin-right: 10px; background: var(--ink); color: var(--paper); cursor: pointer; }
.form .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 15px; }
.form .check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--tomato); flex: none; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.summary { background: var(--butter-soft); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 15px; font-variant-numeric: tabular-nums; }
.summary:empty { display: none; }
.alert { background: var(--tomato-soft); color: #7a2310; border-radius: var(--radius-sm); padding: 14px 18px; font-weight: 500; }
.alert.soft { background: var(--butter-soft); color: #5c430a; }

/* importi: chip morbide */
.amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 8px; margin: 4px 0 14px; }
.chip {
  min-height: 56px; border: 0; border-radius: 18px; padding: 8px 10px; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.02em;
  background: #fffdf9; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); transition: transform .2s var(--pop), box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.chip:hover { box-shadow: inset 0 0 0 2px var(--line-strong), 0 3px 0 var(--line-strong); }
.chip:active { transform: translateY(2px) scale(.96); box-shadow: inset 0 0 0 2px var(--line-strong), 0 1px 0 var(--line-strong); }
.chip.on { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 2px var(--ink), 0 3px 0 #000; transform: translateY(-2px); }
.money { position: relative; }
.money::before { content: '€'; position: absolute; left: 18px; bottom: 13px; font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--muted); pointer-events: none; }
.form .money input:not([type=checkbox]):not([type=radio]):not([type=file]) { padding-left: 42px; font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ===== home ===== */
.hero { padding: 22px 0 10px; text-align: center; }
.hero h1 { font-size: clamp(42px, 12vw, 76px); letter-spacing: -.045em; line-height: .98; }
.hero .lead { max-width: 30em; margin: 0 auto 26px; }
.hero .btn.big { margin: 0 auto; }
.hero .reassure { margin-top: 14px; font-size: 14px; color: var(--muted); }
.hero-art { position: relative; height: 310px; margin: 26px auto 10px; max-width: 420px; }
.env-art { position: absolute; left: 50%; bottom: 18px; width: 260px; height: 168px; transform: translateX(-50%) rotate(-4deg); }
.env-art .back { position: absolute; inset: 0; border-radius: 22px; background: #e8431d; box-shadow: var(--shadow-lg); }
.env-art .letter { position: absolute; left: 18px; right: 18px; top: -78px; height: 170px; border-radius: 16px; background: #fff; box-shadow: 0 8px 20px -10px rgba(34, 23, 46, .35); padding: 18px 18px; text-align: left; }
.env-art .letter b { display: block; font-family: var(--display); font-size: 26px; letter-spacing: -.03em; line-height: 1.05; }
.env-art .letter span { font-size: 13px; color: var(--muted); }
.env-art .letter .bar { margin-top: 12px; height: 10px; }
.env-art .front { position: absolute; inset: 0; border-radius: 22px; background: var(--tomato); clip-path: polygon(0 28%, 50% 62%, 100% 28%, 100% 100%, 0 100%); }
.env-art .seal { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -12px 0 0 -23px; border-radius: 50%; background: var(--butter); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--ink), 0 6px 12px rgba(34, 23, 46, .3); font-size: 22px; }
.bubble { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-weight: 700; font-size: 15px; white-space: nowrap; }
.bubble i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-size: 13px; font-weight: 800; color: var(--ink); }
.bubble.b1 { left: 0; top: 0; } .bubble.b1 i { background: var(--lilac); }
.bubble.b2 { right: 0; top: 118px; } .bubble.b2 i { background: var(--mint); }
.bubble.b3 { left: 4%; bottom: 4px; } .bubble.b3 i { background: var(--butter); }

.steps { display: grid; gap: 14px; margin: 28px 0; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { margin: 0; padding-top: 20px; }
.step .num { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: var(--paper); font-family: var(--display); font-size: 22px; font-weight: 800; margin-bottom: 12px; transform: rotate(-6deg); }
.step:nth-child(2) .num { background: var(--tomato); color: #fff; transform: rotate(4deg); }
.step:nth-child(3) .num { background: var(--butter); color: var(--ink); transform: rotate(-3deg); }
.step h3 { margin-top: 0; font-size: 21px; }
.step p { margin: 0; color: #3d3047; font-size: 16px; }
.bento { display: grid; gap: 14px; margin: 0 0 16px; }
@media (min-width: 640px) { .bento { grid-template-columns: 1.2fr 1fr; } .bento .wide { grid-column: 1 / -1; } }
.bento .card { margin: 0; }
.feature h2 { font-size: 24px; }
.feature.tint-butter { background: var(--butter-soft); }
.feature.tint-lilac { background: var(--lilac-soft); }
.feature.tint-ink { background: var(--ink); color: var(--paper); }
.feature.tint-ink .small, .feature.tint-ink p { color: #e9dff0; }
.pay-marks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pay-marks span { font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); }
.feature.tint-ink .pay-marks span { background: rgba(255, 255, 255, .1); box-shadow: none; color: var(--paper); }
.cta-band { text-align: center; padding: 34px 24px; background: var(--tomato); color: #fff; border-radius: 32px; margin: 26px 0 0; box-shadow: var(--shadow-lg); }
.cta-band h2 { font-size: clamp(28px, 7vw, 40px); color: #fff; }
.cta-band .btn { --b: var(--ink); --c: var(--paper); --s: #000; font-family: var(--display); font-size: 20px; min-height: 58px; padding: 14px 28px; }

/* ===== busta pubblica: la busta si apre ===== */
.envelope { position: relative; margin: 34px 0 18px; perspective: 1200px; }
.envelope .flap {
  position: absolute; left: 0; right: 0; top: 0; height: 120px; z-index: 3; transform-origin: 50% 0; pointer-events: none;
  background: var(--tomato); clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: var(--radius) var(--radius) 0 0;
  transform: rotateX(180deg); opacity: 0;
}
.envelope .seal { position: absolute; z-index: 4; left: 50%; top: -24px; width: 56px; height: 56px; margin-left: -28px; border-radius: 50%; background: var(--butter); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--ink), 0 8px 18px rgba(34, 23, 46, .25); }
.envelope .seal svg { width: 26px; height: 26px; }
.hero-env { text-align: center; padding: 46px 22px 24px; overflow: hidden; border-top: 10px solid var(--tomato); }
.avatar { width: 116px; height: 116px; border-radius: 34px; object-fit: cover; margin: 0 auto 14px; display: block; box-shadow: 0 0 0 5px #fff, 0 0 0 8px var(--butter), var(--shadow); transform: rotate(-3deg); }
.avatar.emoji { display: grid; place-items: center; font-size: 60px; background: var(--tomato-soft); }
.hero-env h1 { margin-bottom: .3em; }
.hero-env .title { font-size: 19px; font-weight: 650; margin-bottom: .5em; }
.hero-env .desc { color: #3d3047; max-width: 32em; margin-left: auto; margin-right: auto; }
.meta { color: var(--muted); font-size: 15px; }
.gift { display: inline-flex; align-items: center; gap: 10px; text-align: left; background: var(--lilac-soft); border-radius: 18px; padding: 10px 16px; margin: 6px 0 12px; font-weight: 650; }
.gift span { font-size: 24px; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0 12px; padding: 0; list-style: none; }
.facts li { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--paper); }

.progress { margin-top: 16px; text-align: left; }
.total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.total b { font-family: var(--display); font-size: clamp(40px, 11vw, 56px); font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.total span { color: var(--muted); font-weight: 600; }
.progress .count { font-size: 17px; margin-bottom: 10px; font-weight: 600; }
.bar { position: relative; height: 16px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line-strong); overflow: hidden; margin-bottom: 6px; }
.bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--tomato), #ff8a3d 60%, var(--butter)); border-radius: 999px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.goal { text-align: right; margin: 0; }
.missing { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--tomato-ink); }
.faces { display: flex; align-items: center; justify-content: center; margin: 4px 0 0; }
.faces i { display: grid; place-items: center; width: 40px; height: 40px; margin-left: -10px; border-radius: 50%; font-style: normal; font-weight: 800; font-size: 15px; color: var(--ink); box-shadow: 0 0 0 3px #fff; }
.faces i:first-child { margin-left: 0; }
.faces i:nth-child(4n+1) { background: var(--lilac); } .faces i:nth-child(4n+2) { background: var(--mint); }
.faces i:nth-child(4n+3) { background: var(--butter); } .faces i:nth-child(4n+4) { background: var(--tomato-soft); }
.faces i.more { background: var(--ink); color: var(--paper); font-size: 13px; }
.people { font-size: 16px; text-align: center; margin-top: 10px; color: #3d3047; }
.join h2 { display: flex; align-items: center; gap: 10px; }
.pay-note { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.pay-note span { font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: var(--paper); color: var(--ink); }
.trust { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 14px 4px 0; }
.trust svg { flex: none; margin-top: 2px; }

/* barra fissa «Partecipa» su mobile */
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20; margin: 0; transition: transform .35s var(--pop), opacity .2s; }
.sticky-cta.hide { transform: translateY(140%); opacity: 0; pointer-events: none; }
@media (min-width: 760px) { .sticky-cta { display: none !important; } }

/* ===== grazie ===== */
.thanks { padding: 30px 24px; overflow: hidden; }
.thanks .big-emoji { display: inline-block; margin-bottom: 8px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; opacity: 0; }
.confetti i:nth-child(3n) { background: var(--tomato); } .confetti i:nth-child(3n+1) { background: var(--butter); } .confetti i:nth-child(3n+2) { background: var(--lilac); }

/* ===== gestione ===== */
.save-link { background: var(--butter-soft); box-shadow: inset 0 0 0 2px var(--butter), var(--shadow); }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.copy-row input { margin: 0; font-size: 14px; color: var(--muted); min-height: 48px; }
.copy-row .btn { flex: none; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; margin-top: 14px; }
.stats div { background: var(--paper); border-radius: 18px; padding: 14px 6px; }
.stats div:first-child { background: var(--ink); color: var(--paper); }
.stats div:first-child span { color: #d9cfe0; }
.stats b { display: block; font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--muted); font-weight: 600; }
#poster canvas { width: 100%; height: auto; border-radius: 20px; display: block; box-shadow: var(--shadow-lg); }
.list { width: 100%; border-collapse: collapse; }
.list td { padding: 12px 4px; border-bottom: 1.5px dashed var(--line); }
.list tr:last-child td { border-bottom: 0; }
.list .num { text-align: right; font-family: var(--display); font-weight: 800; font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.list .muted { text-align: right; font-size: 14px; white-space: nowrap; }
form + form { margin-top: 8px; }

.stepper { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: s; position: relative; }
.stepper li { counter-increment: s; font-size: 13px; text-align: center; color: var(--muted); padding-top: 42px; position: relative; font-weight: 600; }
.stepper li::before { content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line-strong); color: var(--muted); font-family: var(--display); font-weight: 800; }
.stepper li.done::before { content: '✓'; background: var(--ok); box-shadow: none; color: #fff; }
.stepper li.now { color: var(--ink); font-weight: 800; }
.stepper li.now::before { background: var(--tomato); box-shadow: 0 0 0 4px var(--tomato-soft); color: #fff; }
.stepper a { color: inherit; text-decoration: none; }
.lock-note { margin: 14px 0 0; background: var(--lilac-soft); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 15px; }
.themes { display: flex; flex-wrap: wrap; gap: 10px; }
.themes legend { font-family: var(--font) !important; font-size: 17px !important; font-weight: 650 !important; letter-spacing: 0 !important; width: 100%; }
.form .theme { position: relative; display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; min-height: 48px; background: #fffdf9; box-shadow: inset 0 0 0 2px var(--line); border-radius: 999px; padding: 6px 16px 6px 6px; cursor: pointer; transition: transform .2s var(--pop), box-shadow .2s; }
.form .theme:has(input:checked) { box-shadow: inset 0 0 0 2.5px var(--ink); background: #fff; transform: translateY(-2px); }
.form .theme:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.theme input { position: absolute; opacity: 0; pointer-events: none; }
.swatch { width: 34px; height: 34px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
details > summary { cursor: pointer; padding: 6px 0; list-style-position: inside; font-weight: 600; }
details[open] > summary { margin-bottom: 14px; }

/* ===== biglietto ===== */
.card-body::before { background: radial-gradient(40vmax 40vmax at 50% 0%, rgba(242, 84, 45, .18), transparent 70%), radial-gradient(30vmax 30vmax at 90% 80%, rgba(255, 201, 60, .25), transparent 70%); }
.greeting { text-align: center; padding: 26px 0 14px; }
.greeting h1 { font-size: clamp(44px, 13vw, 80px); color: var(--tomato-ink); letter-spacing: -.045em; }
.greeting .title { font-size: 19px; font-weight: 650; }
.greeting .from { color: var(--muted); }
.messages { columns: 2 260px; column-gap: 16px; }
.msg { break-inside: avoid; background: #fff; border-radius: 6px 22px 22px 22px; padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow); transform: rotate(-1deg); }
.msg:nth-child(3n+2) { background: var(--butter-soft); transform: rotate(1.2deg); }
.msg:nth-child(3n) { background: var(--lilac-soft); transform: rotate(-.4deg); }
.msg blockquote { margin: 0 0 10px; font-size: 19px; white-space: pre-line; }
.msg figcaption { color: var(--tomato-ink); font-weight: 800; font-family: var(--display); }

/* testi */
.prose h2 { margin-top: 1.4em; }
.prose p { color: #3d3047; }

.foot { max-width: 680px; margin: 0 auto; padding: 28px 18px 48px; color: var(--muted); font-size: 14px; text-align: center; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.foot a { color: var(--muted); font-weight: 600; text-decoration: none; padding: 8px 2px; }
.foot a:hover { color: var(--ink); }
.foot .small { margin-top: 8px; }
body:has(.sticky-cta) .foot { padding-bottom: 110px; }

/* ===== movimento (solo se l'utente non lo ha disattivato) ===== */
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: plasma 26s ease-in-out infinite alternate; }
  @keyframes plasma {
    0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
    50% { transform: translate3d(4vmax, -3vmax, 0) rotate(8deg) scale(1.08); }
    100% { transform: translate3d(-3vmax, 3vmax, 0) rotate(-6deg) scale(1.02); }
  }
  main > *, .hero > *, .rise { animation: rise .7s var(--spring) both; }
  main > :nth-child(2) { animation-delay: .06s; } main > :nth-child(3) { animation-delay: .12s; } main > :nth-child(4) { animation-delay: .18s; } main > :nth-child(5) { animation-delay: .24s; }
  .hero > :nth-child(2) { animation-delay: .05s; } .hero > :nth-child(3) { animation-delay: .1s; } .hero > :nth-child(4) { animation-delay: .15s; } .hero > :nth-child(5) { animation-delay: .2s; } .hero > :nth-child(6) { animation-delay: .25s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }

  .env-art { animation: bob 5s ease-in-out infinite; }
  .env-art .letter { animation: peek 1.1s .35s var(--spring) both; }
  .env-art .seal { animation: pop .7s .9s var(--spring) both; }
  .bubble { animation: pop .7s var(--spring) both, float 4.5s ease-in-out infinite; }
  .bubble.b1 { animation-delay: .9s, 1.6s; } .bubble.b2 { animation-delay: 1.15s, 2.2s; } .bubble.b3 { animation-delay: 1.4s, 1.9s; }
  @keyframes bob { 50% { transform: translateX(-50%) rotate(-2deg) translateY(-6px); } }
  @keyframes peek { from { transform: translateY(70px); } }
  @keyframes pop { from { opacity: 0; transform: scale(.4); } }
  @keyframes float { 50% { translate: 0 -8px; } }

  .envelope .flap { animation: flap-open 1s .15s cubic-bezier(.6, 0, .3, 1) both; }
  @keyframes flap-open { 0% { transform: rotateX(0deg); opacity: 1; } 60% { opacity: 1; } 100% { transform: rotateX(180deg); opacity: 0; } }
  .envelope .seal { animation: seal 1.1s var(--spring) both; }
  @keyframes seal { 0% { transform: translateY(100px) scale(1.25); } 35% { transform: translateY(100px) scale(1.25); } 100% { transform: none; } }
  .envelope .hero-env > * { animation: rise .8s var(--spring) both; animation-delay: .55s; }
  .envelope .hero-env > :nth-child(2) { animation-delay: .62s; } .envelope .hero-env > :nth-child(3) { animation-delay: .69s; } .envelope .hero-env > :nth-child(n+4) { animation-delay: .76s; }
  .bar span { animation: fill 1.4s .9s var(--spring) both; }
  @keyframes fill { from { width: 0; } }
  .faces i { animation: pop .5s var(--spring) both; animation-delay: calc(1s + var(--i, 0) * 70ms); }

  .thanks .big-emoji { animation: wobble 1.2s .2s var(--spring) both; }
  @keyframes wobble { 0% { transform: scale(.2) rotate(-30deg); } 100% { transform: none; } }
  .confetti i { animation: drop 2.6s cubic-bezier(.2, .6, .4, 1) both; }
  @keyframes drop { 0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); } 100% { opacity: 0; transform: translate3d(var(--x, 20px), 520px, 0) rotate(var(--r, 540deg)); } }

  .logo:hover svg { animation: wiggle .6s var(--spring); }
  @keyframes wiggle { 30% { transform: rotate(-10deg) scale(1.08); } 60% { transform: rotate(6deg); } }
  .chip.on { animation: squish .35s var(--spring); }
  @keyframes squish { 0% { transform: scale(.9); } 100% { transform: translateY(-2px); } }
}

@media print {
  .top, .foot, .noprint, .sticky-cta { display: none; }
  body, .card-body { background: #fff; }
  body::before { display: none; }
  .msg { box-shadow: none; border: 1px solid #ccc; transform: none; }
}
