/* ================================================================
   La Partecipazione — app.css · design system "Aurora"
   Condiviso con LoveSnap.it (lovesnap.css v3): stessi token, stesso
   materiale (vetro), stessa luce (aurora pastello), stessi font
   self-hosted Fraunces + Figtree. Qui vivono landing, auth, area
   coppia, checkout, pagine legali e admin. Il sito degli sposi
   (invito) ha il suo foglio: site.css.
   ================================================================ */
@import url('../fonts/fonts.css');

/* ── Token ─────────────────────────────────────────────────────── */
:root {
  --paper:      #FCFBF9;
  --paper-2:    #F6F3F0;
  --ink:        #2B2733;
  --ink-2:      #5B5565;
  --ink-3:      #8E8798;
  --line:       rgba(43,39,51,.10);
  --line-2:     rgba(43,39,51,.06);

  /* superfici pastello */
  --blush:      #F5D6DC;
  --mint:       #D7E6DB;
  --lilac:      #E2DDF4;
  --peach:      #FBE3D3;
  --sky:        #DCE8F3;
  --butter:     #F7EBCF;
  /* accenti (leggibili come testo) */
  --rose:       #D9728A;
  --rose-dark:  #B8506A;
  --sage:       #5E8A6E;
  --sage-light: #9DB8A0;
  --amber:      #B5731A;
  --danger:     #C94F4F;

  --glass:        rgba(255,255,255,.52);
  --glass-2:      rgba(255,255,255,.72);
  --glass-3:      rgba(255,255,255,.88);
  --glass-dark:   rgba(43,39,51,.42);
  --glass-line:   rgba(255,255,255,.78);
  --glass-blur:   22px;
  --glass-shadow: 0 18px 50px -18px rgba(43,39,51,.22), 0 2px 6px -2px rgba(43,39,51,.06);
  --glass-inner:  inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(255,255,255,.25);

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans:    'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-glass: 28px; --r-card: 20px; --r-input: 14px; --r-pill: 999px;
  --r-xs: 6px; --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 36px;

  --ease: cubic-bezier(.2,.7,.2,1);
  --wrap: 1120px;

  --shadow-sm: 0 2px 12px rgba(43,39,51,.07);
  --shadow-md: 0 8px 28px -8px rgba(43,39,51,.14);
  --shadow-lg: 0 18px 56px -18px rgba(43,39,51,.22);
}

/* ── Reset / base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6; color: var(--ink);
  background: var(--paper); -webkit-font-smoothing: antialiased; min-height: 100vh;
  position: relative; overflow-x: clip;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blush); color: var(--ink); }

.wrap    { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.wrap-sm { width: min(720px, 100% - 2.5rem); margin-inline: auto; }
.wrap-xs { width: min(520px, 100% - 2.5rem); margin-inline: auto; }

/* Tipografia */
h1, h2, h3, .t-display {
  font-family: var(--font-display); font-weight: 400; line-height: 1.08; letter-spacing: -.012em;
  font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 72;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 36; }
h4, h5, h6 { font-family: var(--font-sans); font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.15rem; } h5 { font-size: 1rem; } h6 { font-size: .9rem; }
p { max-width: 62ch; }
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
em, .em { font-style: italic; font-variation-settings: "SOFT" 90, "WONK" 1, "opsz" 72; }
.ic { width: 1.1em; height: 1.1em; flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lp-logo-text { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.d-flex { display: flex; } .gap-2 { gap: .5rem; } .align-center { align-items: center; } .ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.only-mob { display: none; }
@media (max-width: 860px) { .only-desk { display: none !important; } .only-mob { display: initial; } }

/* ── Aurora: la luce pastello dietro al vetro ──────────────────── */
.aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .85; will-change: transform;
  animation: drift 40s var(--ease) infinite alternate;
}
.aurora i:nth-child(1) { width: 60vw; height: 60vw; left: -16vw; top: -14vw; background: var(--blush); }
.aurora i:nth-child(2) { width: 50vw; height: 50vw; right: -14vw; top: -6vw;  background: var(--lilac); animation-delay: -9s; }
.aurora i:nth-child(3) { width: 46vw; height: 46vw; left: 30vw; top: 22%;   background: var(--peach); animation-delay: -19s; opacity: .55; }
.aurora i:nth-child(4) { width: 54vw; height: 54vw; right: -16vw; top: 48%;  background: var(--mint); animation-delay: -27s; }
.aurora i:nth-child(5) { width: 48vw; height: 48vw; left: -14vw; top: 68%;  background: var(--sky); animation-delay: -5s; }
.aurora i:nth-child(6) { width: 50vw; height: 50vw; right: -10vw; bottom: -14vw; background: var(--blush); animation-delay: -14s; opacity: .7; }
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(5vw, 3vw, 0) scale(1.1); }
}
@media (max-width: 720px) {
  .aurora i { filter: blur(48px); }
  .aurora i:nth-child(1) { width: 120vw; height: 120vw; left: -40vw; top: -40vw; }
  .aurora i:nth-child(2) { width: 100vw; height: 100vw; right: -40vw; top: 12%; }
  .aurora i:nth-child(3) { display: none; }
  .aurora i:nth-child(4) { width: 110vw; height: 110vw; }
  .aurora i:nth-child(5) { width: 100vw; height: 100vw; }
  .aurora i:nth-child(6) { width: 110vw; height: 110vw; }
}
@media (prefers-reduced-motion: reduce) { .aurora i { animation: none; } html { scroll-behavior: auto; } }

/* ── Vetro ─────────────────────────────────────────────────────── */
.glass, .glass-2, .glass-3 {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-glass);
  box-shadow: var(--glass-shadow), var(--glass-inner);
}
.glass-2 { background: var(--glass-2); }
.glass-3 { background: var(--glass-3); }
.glass::before, .glass-2::before, .glass-3::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 60% at 12% 0%, rgba(255,255,255,.55), rgba(255,255,255,0) 60%);
}
.glass > *, .glass-2 > *, .glass-3 > * { position: relative; }
.glass-dark {
  background: var(--glass-dark); color: #fff;
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-glass);
}

/* ── Bottoni ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.5rem; border-radius: var(--r-pill);
  font-weight: 600; font-size: .95rem; line-height: 1; letter-spacing: 0; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn .ic { width: 1.05em; height: 1.05em; }
.btn-primary {
  background: var(--ink); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 24px -10px rgba(43,39,51,.55);
}
.btn-primary:hover { background: #3a3544; transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 14px 28px -10px rgba(43,39,51,.6); }
.btn-glass, .btn-white {
  background: var(--glass-2); color: var(--ink);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-inner), 0 6px 20px -10px rgba(43,39,51,.25);
}
.btn-glass:hover, .btn-white:hover { background: rgba(255,255,255,.92); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-rose { background: var(--rose); color: #fff; }
.btn-rose:hover { background: var(--rose-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--sage); color: #fff; }
.btn-sm { padding: .6rem 1.1rem; font-size: .85rem; }
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.02rem; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.btn[disabled], .btn:disabled { opacity: .6; cursor: wait; }
.btn.w-full, .plan .btn, .cta-final .btn, .hero-cta .btn { white-space: normal; text-align: center; line-height: 1.2; }

/* ── Form ──────────────────────────────────────────────────────── */
.f-group { margin-bottom: 1rem; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .f-row { grid-template-columns: 1fr; } }
.f-label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: .4rem; }
.f-input {
  width: 100%; min-width: 0; padding: .85rem 1rem; border-radius: var(--r-input);
  background: rgba(255,255,255,.75); border: 1px solid rgba(43,39,51,.12); color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(43,39,51,.04); transition: border-color .2s, box-shadow .2s, background .2s;
}
.f-input::placeholder { color: var(--ink-3); }
.f-input:focus { outline: none; border-color: var(--rose); background: #fff; box-shadow: 0 0 0 4px rgba(217,114,138,.16); }
textarea.f-input { min-height: 96px; resize: vertical; }
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; min-width: 0; max-width: 100%;
  min-height: calc(1.6em + 1.7rem + 2px); text-align: left;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; }
.f-hint { display: block; font-size: .8rem; color: var(--ink-3); margin-top: .4rem; }
.f-divider { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

/* ── Nav flottante (pagine pubbliche) ──────────────────────────── */
.ls-nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 500; pointer-events: none; }
.ls-nav .wrap {
  pointer-events: auto; display: flex; align-items: center; gap: 1.5rem;
  padding: .55rem .6rem .55rem 1.25rem; border-radius: var(--r-pill);
  background: var(--glass-2); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: var(--glass-inner), 0 10px 30px -14px rgba(43,39,51,.25);
  transition: box-shadow .3s;
}
.ls-nav.scrolled .wrap { box-shadow: var(--glass-inner), 0 14px 36px -14px rgba(43,39,51,.35); }
.nav-brand { display: inline-flex; align-items: center; line-height: 1; color: var(--ink); }
.nav-brand svg { display: block; height: 30px; width: auto; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a { font-size: .92rem; font-weight: 500; color: var(--ink-2); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; gap: .5rem; align-items: center; margin-left: auto; }
.nav-links + .nav-actions { margin-left: 0; }
@media (max-width: 860px) {
  .ls-nav { top: 10px; }
  .ls-nav .wrap { width: calc(100% - 1.25rem); padding: .45rem .45rem .45rem 1rem; gap: .6rem; justify-content: space-between; }
  .nav-links { display: none; }
  .nav-actions, .nav-links + .nav-actions { margin-left: auto; gap: .35rem; }
  .nav-actions .btn-sm { padding: .55rem .85rem; font-size: .82rem; }
  .nav-brand svg { height: 26px; }
}
@media (max-width: 400px) {
  .ls-nav .wrap { padding-left: .85rem; }
  .nav-brand svg { height: 22px; }
  .nav-actions .btn-sm { padding: .5rem .7rem; font-size: .78rem; }
}

/* ── Sezioni ───────────────────────────────────────────────────── */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head h2 { margin-bottom: .9rem; }
.section-head p { color: var(--ink-2); font-size: 1.08rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center p { margin-inline: auto; }
.t-label { display: block; font-size: .92rem; font-weight: 600; color: var(--rose-dark); margin-bottom: .6rem; }

/* ── Chip / tag ────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: var(--r-pill);
  background: var(--glass-2); border: 1px solid var(--glass-line); font-size: .85rem; font-weight: 600; color: var(--ink);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--glass-inner), 0 6px 18px -10px rgba(43,39,51,.3);
}
.chip .ic { width: .95em; height: .95em; }
.chip-rose { color: var(--rose-dark); }

/* ── Alert / toast ─────────────────────────────────────────────── */
.alert { display: flex; gap: .6rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--r-input); font-size: .92rem; margin-bottom: 1rem; }
.alert .ic { margin-top: .15rem; }
.alert-err { background: #FBE4E6; color: #8E2F3C; border: 1px solid #F3C6CC; }
.alert-ok  { background: #E2F0E6; color: #2E5B3E; border: 1px solid #C6E0CE; }
.alert-warn { background: rgba(247,235,207,.8); color: #7A4F10; border: 1px solid rgba(181,115,26,.3); }
.toast, #app-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px); z-index: 9000; opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: .6rem; padding: .8rem 1.1rem; border-radius: var(--r-pill);
  background: rgba(43,39,51,.86); color: #fff; font-size: .92rem; font-weight: 500;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px -12px rgba(43,39,51,.5); transition: opacity .3s var(--ease), transform .3s var(--ease);
  max-width: calc(100% - 2rem);
}
.toast.show, #app-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.error { background: rgba(142,47,60,.92); }

/* ================================================================
   HOMEPAGE
   ================================================================ */
.ls-hero { padding: calc(92px + 3vw) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-copy h1 { margin-bottom: 1.4rem; }
.hero-copy .lead { margin-bottom: 2rem; max-width: 34rem; }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2rem; font-size: .92rem; color: var(--ink-2); }
.hero-facts span { display: inline-flex; align-items: center; gap: .5rem; }
.hero-facts .ic { color: var(--sage); width: .95em; height: .95em; }

/* La scena: l'invito aperto, in una finestra di vetro, con l'interfaccia che galleggia sopra */
.hero-scene { position: relative; width: 100%; aspect-ratio: 4 / 4.6; max-width: 520px; margin-left: auto; }
.hero-invite {
  position: absolute; inset: 0; border-radius: 36px; overflow: hidden;
  background: linear-gradient(160deg, #FFFDFB, #F7EFEA 55%, #EFE4E8);
  box-shadow: 0 40px 80px -30px rgba(43,39,51,.45), 0 0 0 1px rgba(255,255,255,.6);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 2rem 1.5rem;
}
.hero-invite::before { content: ''; position: absolute; inset: 14px; border: 1px solid rgba(43,39,51,.1); border-radius: 26px; pointer-events: none; }
.hero-invite::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 50% at 20% 0%, rgba(255,255,255,.8), transparent 60%), linear-gradient(180deg, rgba(255,255,255,0) 60%, rgba(245,214,220,.35) 100%);
}
.hero-invite > * { position: relative; z-index: 1; }
.hi-seal { width: 64px; height: 64px; margin-bottom: 1.1rem; filter: drop-shadow(0 10px 16px rgba(184,80,106,.35)); }
.hi-eye { font-size: .72rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--rose-dark); }
.hi-names { font-family: var(--font-display); font-size: clamp(2.4rem, 7vw, 3.4rem); line-height: 1; margin: .5rem 0 .4rem; letter-spacing: -.02em; font-variation-settings: "SOFT" 80, "WONK" 1, "opsz" 72; }
.hi-names em { color: var(--rose); }
.hi-date { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.hi-rule { width: 44px; height: 1px; background: rgba(43,39,51,.15); margin: 1rem auto; }
.hi-place { font-size: .92rem; color: var(--ink-2); }
.hi-cta { margin-top: 1.4rem; display: inline-flex; padding: .7rem 1.3rem; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: .82rem; font-weight: 600; }

.hero-float { position: absolute; z-index: 2; animation: float 7s ease-in-out infinite; }
.hero-float.f1 { right: -6%; top: 9%; animation-delay: -1.5s; }
.hero-float.f2 { left: -8%; top: 46%; animation-delay: -3.5s; }
.hero-float.f3 { right: 4%; bottom: 7%; animation-delay: -5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .hero-float { animation: none; } }

.rsvp-card { padding: .75rem .95rem .75rem .75rem; display: flex; align-items: center; gap: .75rem; min-width: 240px; border-radius: 20px; }
.rsvp-card .av { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--mint), var(--sky)); display: grid; place-items: center; color: var(--sage); flex-shrink: 0; }
.rsvp-card strong { display: block; font-size: .9rem; line-height: 1.25; }
.rsvp-card small { color: var(--ink-3); font-size: .78rem; }
.count-chip { padding: .55rem .95rem; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; }
.count-chip .ic { color: var(--rose); }
.count-chip small { font-weight: 500; color: var(--ink-3); }
.link-chip { padding: .7rem .85rem; border-radius: 18px; display: flex; align-items: center; gap: .7rem; }
.link-chip .qr { width: 46px; height: 46px; border-radius: 10px; background: #fff; padding: 4px; }
.link-chip .qr svg { width: 100%; height: 100%; }
.link-chip span { font-size: .8rem; line-height: 1.3; color: var(--ink-2); max-width: 12rem; }
.link-chip span b { color: var(--ink); display: block; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-scene { max-width: 520px; margin: 0 auto; aspect-ratio: 4 / 3.6; }
  .hero-float.f1 { right: 2%; } .hero-float.f2 { left: 2%; } .hero-float.f3 { right: 3%; }
}
@media (max-width: 560px) {
  .ls-hero { padding-top: 96px; }
  .hero-cta .btn { width: 100%; }
  /* telefono: l'invito sta in alto, le card galleggiano nella fascia bassa senza coprire i nomi */
  .hero-scene { aspect-ratio: 4 / 4.9; }
  .hero-invite { justify-content: flex-start; padding-top: 1.8rem; }
  .hi-cta { display: none; }
  .hero-float.f2 { display: none; }
  .hero-float.f1 { top: auto; bottom: 17%; left: 4%; right: auto; }
  .hero-float.f3 { bottom: 1.5%; right: 4%; }
}

/* Come funziona: sequenza numerata */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.how-step { padding: 1.75rem 1.6rem 1.6rem; border-radius: var(--r-card); }
.how-step .n {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem;
  font-family: var(--font-display); font-size: 1.35rem; font-style: italic; color: var(--ink);
  background: linear-gradient(135deg, #fff, var(--blush)); box-shadow: var(--glass-inner), 0 6px 16px -8px rgba(43,39,51,.3);
}
.how-step:nth-child(2) .n { background: linear-gradient(135deg, #fff, var(--lilac)); }
.how-step:nth-child(3) .n { background: linear-gradient(135deg, #fff, var(--mint)); }
.how-step h3 { margin-bottom: .5rem; font-size: 1.35rem; }
.how-step p { color: var(--ink-2); font-size: .98rem; }
@media (max-width: 860px) { .how { grid-template-columns: 1fr; } }

/* Funzionalità: bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(190px, auto); gap: 1.1rem; }
.tile { padding: 1.5rem; border-radius: var(--r-card); display: flex; flex-direction: column; overflow: hidden; }
.tile h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.tile p { color: var(--ink-2); font-size: .95rem; }
.tile .art { margin-top: auto; padding-top: 1.25rem; }
.tile-env  { grid-column: span 4; grid-row: span 2; }
.tile-rsvp { grid-column: span 2; grid-row: span 2; }
.tile-edit { grid-column: span 2; }
.tile-cd   { grid-column: span 2; }
.tile-gift { grid-column: span 2; }
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; }
  .tile-env, .tile-rsvp, .tile-edit, .tile-cd, .tile-gift { grid-column: span 2; grid-row: auto; }
  .tile-edit, .tile-cd { grid-column: span 1; }
}
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } .bento .tile { grid-column: auto; grid-row: auto; } }

/* tessera grande: tre buste con i temi */
.minienvs { position: relative; height: 230px; }
.minienv {
  position: absolute; bottom: 0; width: 150px; aspect-ratio: 148 / 200; border-radius: 12px;
  box-shadow: 0 20px 40px -18px rgba(43,39,51,.45), 0 0 0 1px rgba(255,255,255,.7);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; padding: .9rem;
  text-align: center; transition: transform .4s var(--ease);
}
.minienv::before { content: ''; position: absolute; inset: 8px; border: 1px solid currentColor; opacity: .18; border-radius: 8px; }
.minienv .eye { font-size: .5rem; letter-spacing: .25em; text-transform: uppercase; font-weight: 700; opacity: .7; }
.minienv .nm { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; line-height: 1.1; }
.minienv .dt { font-size: .55rem; letter-spacing: .14em; opacity: .7; }
.minienv .seal { width: 26px; height: 26px; margin-top: .3rem; }
.minienv.c1 { left: 6%; transform: rotate(-8deg) translateY(10px); background: linear-gradient(180deg, #FBF6EC, #F3E7D2); color: #3a3025; }
.minienv.c2 { left: 50%; margin-left: -75px; z-index: 2; background: #fff; color: var(--ink); }
.minienv.c3 { right: 6%; transform: rotate(8deg) translateY(10px); background: linear-gradient(180deg, #EEF2E7, #DDE6D3); color: #35422F; }
.tile-env:hover .minienv.c1 { transform: rotate(-11deg) translate(-6px, 4px); }
.tile-env:hover .minienv.c3 { transform: rotate(11deg) translate(6px, 4px); }
@media (max-width: 560px) { .minienvs { height: 200px; } .minienv { width: 120px; } .minienv.c2 { margin-left: -60px; } }

/* rsvp: righe di risposte */
.rsvp-art { display: grid; gap: .6rem; }
.rsvp-row { display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; border-radius: 14px; background: rgba(255,255,255,.7); border: 1px solid var(--glass-line); }
.rsvp-row i.av { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--peach), var(--blush)); flex-shrink: 0; }
.rsvp-row:nth-child(2) i.av { background: linear-gradient(135deg, var(--sky), var(--lilac)); }
.rsvp-row:nth-child(3) i.av { background: linear-gradient(135deg, var(--mint), var(--butter)); }
.rsvp-row span { font-size: .85rem; flex: 1; color: var(--ink-2); line-height: 1.25; }
.rsvp-row span b { display: block; color: var(--ink); font-weight: 600; }
.rsvp-row em { font-style: normal; font-size: .7rem; font-weight: 700; padding: .25rem .55rem; border-radius: var(--r-pill); background: rgba(94,138,110,.14); color: var(--sage); }
.rsvp-row.no em { background: rgba(43,39,51,.08); color: var(--ink-2); }

/* editor in-page */
.edit-art { position: relative; border-radius: 12px; background: rgba(255,255,255,.7); border: 1px solid var(--glass-line); padding: .9rem; }
.edit-art .ln { height: 9px; border-radius: 5px; background: rgba(43,39,51,.1); margin-bottom: .5rem; }
.edit-art .ln.t { width: 55%; height: 13px; background: rgba(43,39,51,.2); }
.edit-art .ln.s { width: 80%; } .edit-art .ln.x { width: 65%; margin-bottom: 0; }
.edit-art .cur { position: absolute; right: 14px; top: 12px; padding: .25rem .55rem; border-radius: var(--r-pill); background: var(--rose); color: #fff; font-size: .68rem; font-weight: 700; }
.edit-art .cur::before { content: ''; position: absolute; left: -6px; top: 8px; width: 2px; height: 14px; background: var(--rose); }

/* countdown */
.cd-art { display: flex; gap: .5rem; }
.cd-art b { flex: 1; text-align: center; padding: .55rem .2rem; border-radius: 12px; background: var(--ink); color: #fff; font-family: var(--font-display); font-size: 1.3rem; line-height: 1; }
.cd-art b small { display: block; font-family: var(--font-sans); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; opacity: .6; margin-top: .3rem; }

/* lista nozze */
.gift-art { display: flex; align-items: center; gap: .8rem; }
.gift-art .box { width: 54px; height: 54px; border-radius: 14px; background: var(--ink); color: var(--butter); display: grid; place-items: center; }
.gift-art .box .ic { width: 24px; height: 24px; }
.gift-art small { color: var(--ink-3); display: block; font-size: .78rem; }
.gift-art b { font-size: .95rem; font-family: ui-monospace, SFMono-Regular, monospace; letter-spacing: .04em; }

/* Bande (es. LoveSnap, galleria foto ospiti) */
.bands { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.band { padding: 2.25rem 2rem; border-radius: var(--r-glass); position: relative; overflow: hidden; }
.band.sage { background: linear-gradient(135deg, rgba(215,230,219,.85), rgba(255,255,255,.6)); }
.band.lilac { background: linear-gradient(135deg, rgba(226,221,244,.9), rgba(255,255,255,.6)); }
.band.blush { background: linear-gradient(135deg, rgba(245,214,220,.9), rgba(255,255,255,.6)); }
.band h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: .75rem; }
.band p { color: var(--ink-2); margin-bottom: 1.4rem; }
.band .chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.5rem; }
.band .chip { font-weight: 500; }
.band .partner-logo { display: inline-flex; margin-bottom: 1rem; }
.band .partner-logo svg { height: 30px; width: auto; }
@media (max-width: 860px) { .bands { grid-template-columns: 1fr; } }

/* Prezzo: un solo piano, in evidenza */
.plans { display: grid; grid-template-columns: 1fr; gap: 1.25rem; max-width: 560px; margin-inline: auto; }
.plans.two { grid-template-columns: 1fr 1fr; max-width: 880px; }
.plan { padding: 2.25rem 2rem; border-radius: var(--r-glass); display: flex; flex-direction: column; }
.plan.featured { box-shadow: var(--glass-shadow), var(--glass-inner), 0 0 0 1px rgba(255,255,255,.9); }
.plan.featured::after {
  content: ''; position: absolute; inset: -2px; border-radius: 30px; z-index: -1;
  background: conic-gradient(from 120deg, var(--blush), var(--lilac), var(--mint), var(--peach), var(--blush));
  filter: blur(10px); opacity: .9;
}
.plan .tier { font-weight: 600; color: var(--ink-2); margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; }
.plan .price { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; letter-spacing: -.02em; margin-bottom: .35rem; font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 72; }
.plan .price sup { font-size: 1.4rem; vertical-align: top; margin-right: .1em; top: .35em; position: relative; }
.plan .price small { font-family: var(--font-sans); font-size: .95rem; color: var(--ink-3); margin-left: .35rem; letter-spacing: 0; }
.plan .desc { color: var(--ink-2); margin-bottom: 1.5rem; font-size: .95rem; }
.plan ul { list-style: none; margin: 0 0 1.75rem; display: grid; gap: .55rem; }
.plan li { display: flex; gap: .65rem; align-items: flex-start; font-size: .95rem; }
.plan li .ic { margin-top: .25rem; width: .85em; height: .85em; color: var(--sage); }
.plan .btn { margin-top: auto; }
.plan .note { font-size: .8rem; color: var(--ink-3); text-align: center; margin-top: .8rem; display: flex; justify-content: center; align-items: center; gap: .35rem; }
@media (max-width: 760px) { .plans.two { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: .6rem; }
.faq details { border-radius: var(--r-card); padding: 0 1.4rem; transition: background .25s; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 0; font-weight: 600; font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 30px; height: 30px; padding: 8px; border-radius: 50%; background: rgba(43,39,51,.06); transition: transform .3s var(--ease), background .3s; flex-shrink: 0; }
.faq details[open] summary .ic { transform: rotate(45deg); background: var(--ink); color: #fff; }
.faq .faq-answer { padding: 0 0 1.25rem; color: var(--ink-2); font-size: .97rem; }
.faq .faq-answer p { max-width: none; }
.faq-cta { text-align: center; color: var(--ink-2); margin-top: 2rem; }
.faq-cta a { color: var(--rose-dark); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(217,114,138,.4); text-underline-offset: 3px; }

/* CTA finale */
.cta-final { text-align: center; padding: clamp(3rem, 6vw, 5rem) 2rem; border-radius: 36px; }
.cta-final h2 { margin-bottom: .8rem; }
.cta-final p { margin: 0 auto 1.8rem; color: var(--ink-2); font-size: 1.08rem; }
.cta-final .actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* Footer */
.ls-footer { padding: 4rem 0 2rem; border-top: 1px solid var(--line-2); margin-top: 2rem; font-size: .92rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr) 1.2fr; gap: 2rem; margin-bottom: 3rem; }
.footer-logo { display: inline-flex; margin-bottom: .8rem; color: var(--ink); }
.footer-logo svg { display: block; height: 36px; width: auto; }
.footer-tagline { color: var(--ink-2); max-width: 24ch; }
.footer-h6 { font-size: .85rem; font-weight: 700; margin-bottom: .9rem; }
.footer-links { display: grid; gap: .5rem; }
.footer-links a { color: var(--ink-2); } .footer-links a:hover { color: var(--ink); }
.footer-contact-line { display: flex; gap: .6rem; align-items: flex-start; color: var(--ink-2); margin-bottom: .55rem; }
.footer-contact-line .ic { margin-top: .25rem; width: .95em; height: .95em; color: var(--ink-3); }
.footer-social { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(43,39,51,.06); color: var(--ink); }
.footer-social a .ic { width: 16px; height: 16px; }
.footer-social a:hover { background: var(--ink); color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.5rem; border-top: 1px solid var(--line-2); color: var(--ink-3); font-size: .82rem; }
.footer-bottom a { color: var(--ink-2); }
@media (max-width: 960px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; gap: 1.6rem; } }

/* WhatsApp flottante (pagine pubbliche) */
.ls-wa-float {
  position: fixed; left: 18px; bottom: 18px; z-index: 800; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: #25D366; color: #fff;
  box-shadow: 0 12px 30px -10px rgba(37,211,102,.7); transition: transform .25s var(--ease);
}
.ls-wa-float svg { width: 28px; height: 28px; }
.ls-wa-float:hover { transform: translateY(-2px) scale(1.04); }
.ls-wa-label { position: absolute; left: 62px; white-space: nowrap; background: var(--ink); color: #fff; font-size: .8rem; font-weight: 600; padding: .4rem .7rem; border-radius: var(--r-pill); opacity: 0; transform: translateX(-6px); transition: all .25s; pointer-events: none; }
.ls-wa-float:hover .ls-wa-label { opacity: 1; transform: none; }
@media (max-width: 720px) {
  .ls-wa-float { width: 48px; height: 48px; left: auto; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .ls-wa-float svg { width: 26px; height: 26px; }
  .ls-wa-label { display: none; }
  body.has-bottom-nav .ls-wa-float { display: none; }
}

/* ================================================================
   AUTH  (accesso, registrazione)
   ================================================================ */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.25rem; padding: 1.25rem; align-items: stretch; }
.auth-side {
  position: sticky; top: 1.25rem; height: calc(100vh - 2.5rem); align-self: start;
  border-radius: var(--r-xl); padding: 2.5rem; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(160deg, rgba(245,214,220,.85), rgba(226,221,244,.8) 55%, rgba(215,230,219,.8)); overflow: hidden;
}
.auth-side::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 50% at 20% 0%, rgba(255,255,255,.7), transparent 60%); pointer-events: none; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side-logo { position: absolute; top: 2.2rem; left: 2.5rem; display: inline-flex; color: var(--ink); line-height: 1; z-index: 2; }
.auth-side-logo svg { display: block; height: 34px; width: auto; }
.auth-side h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); margin: 0 0 1rem; color: var(--ink); }
.auth-side p { color: var(--ink-2); font-size: 1.02rem; max-width: 34rem; }
.auth-perks { display: grid; gap: .55rem; margin-top: 1.75rem; }
.auth-perk { display: flex; align-items: center; gap: .7rem; font-size: .92rem; color: var(--ink-2); }
.auth-perk .ic { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: rgba(255,255,255,.7); color: var(--ink); }
.auth-side, .auth-form-side, .auth-form-wrap { min-width: 0; }
.auth-form-side { display: flex; align-items: center; justify-content: center; }
.auth-form-wrap {
  width: min(480px, 100%); padding: 2.25rem; border-radius: var(--r-glass);
  background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow), var(--glass-inner);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%); backdrop-filter: blur(var(--glass-blur)) saturate(160%);
}
.auth-form-title { font-size: 2rem; margin-bottom: .35rem; }
.auth-form-sub { color: var(--ink-2); margin-bottom: 1.5rem; }
.auth-form-wrap .f-input { background: rgba(255,255,255,.85); }
.auth-form-wrap .btn-primary { width: 100%; margin-top: .5rem; }
.auth-foot { text-align: center; color: var(--ink-3); font-size: .85rem; margin-top: 1.25rem; line-height: 1.7; }
.auth-foot a { color: var(--rose-dark); font-weight: 600; }
.auth-foot-mini { font-size: .76rem; color: var(--ink-3); text-align: center; margin-top: 1rem; line-height: 1.6; }
.auth-foot-mini a { color: var(--rose-dark); text-decoration: underline; text-underline-offset: 2px; }
.auth-single { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; }
.auth-single .auth-form-wrap { width: min(440px, 100%); }
.auth-single-logo { display: flex; justify-content: center; margin-bottom: 1.5rem; }
@media (max-width: 960px) {
  .auth-page { grid-template-columns: 1fr; padding: .75rem; gap: .75rem; min-height: 0; align-content: start; }
  .auth-side { position: relative; top: auto; height: auto; padding: 1.5rem; border-radius: var(--r-glass); }
  .auth-side-logo { position: static; display: inline-flex; margin-bottom: 1.25rem; }
  .auth-side-logo svg { height: 28px; }
  .auth-side h2 { margin: 0 0 .4rem; font-size: 1.7rem; }
  .auth-side p { font-size: .92rem; }
  .auth-perks { display: none; }
  .auth-form-wrap { padding: 1.5rem; border-radius: var(--r-card); }
}

/* ================================================================
   DASHBOARD SHELL  (area coppia + admin)
   ================================================================ */
.dash-wrap { display: flex; min-height: 100vh; }
.dash-sidebar {
  width: 268px; flex-shrink: 0; position: sticky; top: 12px; height: calc(100vh - 24px); margin: 12px 0 12px 12px;
  border-radius: var(--r-glass); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: .5rem; overflow-y: auto;
  background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow), var(--glass-inner);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%); backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  transition: transform .3s var(--ease);
}
.sidebar-close { display: none; }
.s-head { padding: .25rem .5rem .75rem; }
.s-logo { display: inline-flex; color: var(--ink); line-height: 1; }
.s-logo svg { display: block; height: 28px; width: auto; }
.s-couple { padding: .9rem; border-radius: var(--r-card); background: rgba(255,255,255,.55); border: 1px solid var(--glass-line); margin-bottom: .5rem; }
.s-couple-name { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.15; color: var(--ink); font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 36; margin-bottom: .3rem; }
.s-couple-name em { color: var(--rose); }
.s-couple-date { font-size: .8rem; color: var(--ink-2); }
.s-days { display: block; color: var(--rose-dark); font-weight: 600; }
.s-plan { display: inline-flex; align-items: center; gap: .35rem; margin-top: .6rem; padding: .25rem .65rem; border-radius: var(--r-pill); font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.s-plan::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-plan.on { background: rgba(94,138,110,.14); color: var(--sage); }
.s-plan.off { background: rgba(43,39,51,.08); color: var(--ink-2); }
.s-nav { display: flex; flex-direction: column; gap: .15rem; }
.s-section-lbl { display: block; font-size: .72rem; font-weight: 600; color: var(--ink-3); padding: .9rem .75rem .35rem; }
.s-nav a, .s-foot a, .s-foot button { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border-radius: 14px; font-size: .92rem; font-weight: 500; color: var(--ink-2); transition: background .2s, color .2s; width: 100%; text-align: left; }
.s-nav a .ic, .s-foot .ic { width: 18px; height: 18px; color: var(--ink-3); }
.s-nav a:hover, .s-foot a:hover, .s-foot button:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.s-nav a.active { background: var(--ink); color: #fff; }
.s-nav a.active .ic { color: #fff; }
.s-nav a.accent { color: var(--rose-dark); }
.s-nav a.accent .ic { color: var(--rose); }
.s-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--rose); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.s-foot { margin-top: auto; padding-top: .5rem; border-top: 1px solid var(--line-2); }
.s-foot form { margin: 0; }
.sidebar-backdrop { display: none; }

.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-topbar { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 1.75rem .75rem; }
.dash-topbar-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 36; margin-right: auto; }
.mobile-menu-btn { display: none; }
.dash-body { padding: .5rem 1.75rem 2.5rem; max-width: 1180px; width: 100%; }
.dash-body.narrow { max-width: 900px; }

@media (max-width: 860px) {
  .dash-sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: auto; margin: 10px; width: min(300px, 85vw); z-index: 1200; transform: translateX(calc(-100% - 12px)); }
  .dash-sidebar.open { transform: none; }
  .sidebar-close { display: grid; place-items: center; position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(43,39,51,.06); color: var(--ink); }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1100; background: rgba(43,39,51,.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  .mobile-menu-btn { display: grid !important; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--glass-line); color: var(--ink); }
  .mobile-menu-btn .ic { width: 20px; height: 20px; }
  .dash-topbar { padding: .9rem 1rem .5rem; }
  .dash-topbar-title { font-size: 1.3rem; }
  .dash-topbar .btn span { display: none; }
  .dash-body { padding: .25rem 1rem 6.5rem; }
}

/* barre contestuali */
.upgrade-bar, .info-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.25rem; border-radius: var(--r-card); margin-bottom: 1.25rem;
}
.upgrade-bar { background: linear-gradient(135deg, rgba(245,214,220,.9), rgba(251,227,211,.7)); }
.info-bar { background: linear-gradient(135deg, rgba(226,221,244,.9), rgba(255,255,255,.6)); font-size: .92rem; color: var(--ink-2); }
.upgrade-bar h6 { font-size: 1rem; margin-bottom: .15rem; display: flex; align-items: center; gap: .45rem; }
.upgrade-bar h6 .ic { color: var(--rose); }
.upgrade-bar p { font-size: .88rem; color: var(--ink-2); margin: 0; }

/* stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.stat-cards.three { grid-template-columns: repeat(3, 1fr); }
.stat-cards.six { grid-template-columns: repeat(3, 1fr); }
.stat-card { position: relative; padding: 1.2rem 1.25rem; border-radius: var(--r-card); background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--glass-inner), 0 10px 30px -18px rgba(43,39,51,.2); }
.stat-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; margin-bottom: .9rem; }
.stat-icon .ic { width: 20px; height: 20px; }
.stat-icon.blush { background: var(--blush); color: var(--rose-dark); }
.stat-icon.mint { background: var(--mint); color: var(--sage); }
.stat-icon.peach { background: var(--peach); color: #A4583A; }
.stat-icon.butter { background: var(--butter); color: var(--amber); }
.stat-icon.lilac { background: var(--lilac); color: #6B5A9C; }
.stat-icon.sky { background: var(--sky); color: #3F6A8C; }
.stat-num { font-family: var(--font-display); font-size: 2.1rem; line-height: 1; color: var(--ink); font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 36; }
.stat-num small { font-family: var(--font-sans); font-size: .85rem; color: var(--ink-3); margin-left: .2rem; }
.stat-lbl { font-size: .82rem; color: var(--ink-2); margin-top: .4rem; }
.stat-num.sm { font-size: 1.6rem; }
@media (max-width: 960px) { .stat-cards, .stat-cards.three { grid-template-columns: repeat(2, 1fr); gap: .75rem; } .stat-cards.three .stat-card:last-child { grid-column: 1 / -1; } .stat-card { padding: 1rem; } .stat-num { font-size: 1.7rem; } }
@media (max-width: 560px) {
  .stat-cards { gap: .6rem; }
  .stat-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .65rem; align-items: center; padding: .75rem .8rem; }
  .stat-icon { grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 11px; margin: 0; }
  .stat-icon .ic { width: 18px; height: 18px; }
  .stat-num, .stat-num.sm { grid-column: 2; font-size: 1.4rem; white-space: nowrap; }
  .stat-num small { display: block; white-space: normal; font-size: .72rem; margin: .1rem 0 0; }
  .stat-lbl { grid-column: 2; font-size: .72rem; line-height: 1.25; margin-top: .15rem; }
}

/* card generica */
.ls-card { position: relative; border-radius: var(--r-card); background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--glass-inner), 0 10px 30px -18px rgba(43,39,51,.2); margin-bottom: 1.25rem; }
.ls-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.ls-card-head h5 { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.ls-card-head h5 .ic { color: var(--rose); width: 16px; height: 16px; }
.ls-card-body { padding: 1.25rem; }
.ls-card-body.flush { padding: 0; }
.ls-card.warn { border-color: rgba(181,115,26,.35); }
.ls-card.warn .ls-card-head h5, .ls-card.warn .ls-card-head h5 .ic { color: var(--amber); }

/* link + copia, condivisione */
.url-copy { display: flex; align-items: center; padding: .3rem; border-radius: var(--r-pill); background: rgba(255,255,255,.8); border: 1px solid var(--line); }
.url-copy input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .55rem .9rem; font-size: .92rem; color: var(--ink); }
.url-copy input:focus { outline: none; }
.url-copy button { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.share-row { display: flex; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 560px) {
  .share-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .share-row .btn { padding: .65rem .3rem; font-size: .78rem; gap: .35rem; }
}
.dash-link-grid { display: grid; grid-template-columns: 1fr auto; gap: 1.25rem; align-items: start; margin-bottom: 1.25rem; }
@media (max-width: 860px) { .dash-link-grid { grid-template-columns: 1fr; } }

/* azioni rapide (tessere) */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.quick { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.15rem; border-radius: var(--r-card); background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--glass-inner), 0 10px 30px -18px rgba(43,39,51,.2); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.quick:hover { transform: translateY(-2px); box-shadow: var(--glass-inner), 0 18px 36px -16px rgba(43,39,51,.3); }
.quick .qi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; background: linear-gradient(135deg, #fff, var(--blush)); color: var(--ink); box-shadow: var(--glass-inner), 0 6px 16px -8px rgba(43,39,51,.3); }
.quick:nth-child(2) .qi { background: linear-gradient(135deg, #fff, var(--lilac)); }
.quick:nth-child(3) .qi { background: linear-gradient(135deg, #fff, var(--mint)); }
.quick .qi .ic { width: 20px; height: 20px; }
.quick strong { display: block; font-size: .95rem; }
.quick small { color: var(--ink-3); font-size: .8rem; }
.quick .go { margin-left: auto; color: var(--ink-3); width: 18px; height: 18px; transition: transform .2s; }
.quick:hover .go { transform: translateX(3px); color: var(--ink); }
@media (max-width: 860px) { .quick-grid { grid-template-columns: 1fr; gap: .6rem; } .quick { padding: .9rem 1rem; } }

/* checklist di completamento */
.progress { height: 8px; border-radius: var(--r-pill); background: rgba(43,39,51,.08); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--rose), #C9A7E8); transition: width .6s var(--ease); }
.progress-lbl { display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-2); margin-bottom: .5rem; }
.progress-lbl b { color: var(--ink); }
.checklist { display: grid; gap: .25rem; margin-top: 1rem; }
.check-item { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: 14px; transition: background .2s; color: inherit; }
.check-item:hover { background: rgba(255,255,255,.7); }
.check-box { flex: 0 0 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(43,39,51,.2); display: grid; place-items: center; color: #fff; }
.check-box .ic { width: 13px; height: 13px; opacity: 0; }
.check-item.done .check-box { background: var(--sage); border-color: var(--sage); }
.check-item.done .check-box .ic { opacity: 1; }
.check-item .t { font-weight: 500; font-size: .94rem; }
.check-item.done .t { color: var(--ink-3); text-decoration: line-through; }
.check-item .go { margin-left: auto; color: var(--ink-3); width: 18px; height: 18px; }

/* bottom nav (mobile) */
.bottom-nav { display: none; }
@media (max-width: 860px) {
  .bottom-nav { display: block; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 900; border-radius: var(--r-pill); padding: .35rem; background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--glass-inner), 0 18px 40px -14px rgba(43,39,51,.4); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
  .bottom-nav-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; }
  .bottom-nav-grid a { position: relative; display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .5rem .25rem; border-radius: var(--r-pill); font-size: .68rem; font-weight: 600; color: var(--ink-2); }
  .bottom-nav-grid a .ic { width: 20px; height: 20px; }
  .bottom-nav-grid a.active { background: var(--ink); color: #fff; }
  .bottom-nav-badge { position: absolute; top: 4px; right: 18%; min-width: 16px; height: 16px; border-radius: var(--r-pill); background: var(--rose); color: #fff; font-size: .6rem; display: grid; place-items: center; padding: 0 4px; }
}

/* tabs / filtri */
.tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .3rem; border-radius: var(--r-pill); background: rgba(43,39,51,.06); }
.tab-btn { padding: .55rem 1rem; border-radius: var(--r-pill); font-size: .88rem; font-weight: 600; color: var(--ink-2); transition: all .2s; }
.tab-btn.active { background: #fff; color: var(--ink); box-shadow: 0 2px 10px rgba(43,39,51,.12); }
.tab-btn small { font-weight: 500; color: var(--ink-3); margin-left: .3rem; }
@media (max-width: 560px) {
  .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; gap: .2rem; padding: .25rem; border-radius: 22px; }
  .tab-btn { padding: .5rem .15rem; border-radius: 18px; font-size: .78rem; text-align: center; white-space: nowrap; }
}

/* tabelle, tag, bottoni icona, ricerca, paginazione, vuoto */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: .8rem 1.1rem; font-size: .74rem; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line-2); background: rgba(255,255,255,.35); white-space: nowrap; }
.admin-table td { padding: .85rem 1.1rem; border-bottom: 1px solid var(--line-2); font-size: .88rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: rgba(255,255,255,.5); }
.admin-table .sub { display: block; font-size: .78rem; color: var(--ink-3); }
.admin-table .nowrap { white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: var(--r-pill); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.tag-ink { background: var(--ink); color: #fff; }
.tag-free { background: rgba(43,39,51,.07); color: var(--ink-2); }
.tag-ok { background: rgba(94,138,110,.14); color: var(--sage); }
.tag-no { background: rgba(201,79,79,.12); color: #A33B3B; }
.tag-pending { background: rgba(181,115,26,.14); color: var(--amber); }
.tag-rose { background: var(--blush); color: var(--rose-dark); }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.8); border: 1px solid var(--line); color: var(--ink-2); transition: all .2s; cursor: pointer; }
.icon-btn .ic { width: 16px; height: 16px; }
.icon-btn:hover { background: #fff; color: var(--ink); border-color: var(--ink-3); }
.icon-btn-danger:hover { background: #FBE4E6; color: #A33B3B; border-color: #F3C6CC; }
.row-actions { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.row-actions form { margin: 0; }
.btn-xs { padding: .45rem .8rem; font-size: .78rem; background: rgba(255,255,255,.8); border: 1px solid var(--line); color: var(--ink-2); }
.btn-xs:hover { background: #fff; color: var(--ink); border-color: var(--ink-3); }
.btn-xs.danger:hover { background: #FBE4E6; color: #A33B3B; border-color: #F3C6CC; }
.search-box { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }
.search-input { flex: 1; min-width: 200px; padding: .7rem 1rem; border-radius: var(--r-pill); background: rgba(255,255,255,.8); border: 1px solid var(--line); font-size: .9rem; color: var(--ink); }
.search-input:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(217,114,138,.14); }
select.search-input { appearance: none; -webkit-appearance: none; padding-right: 2.2rem; flex: 0 1 auto; min-width: 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8798' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 14px; }
.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--ink-3); }
.empty-state .ic { width: 36px; height: 36px; opacity: .4; margin: 0 auto .8rem; }
.empty-state p { margin: 0 auto .35rem; color: var(--ink-2); }
.empty-state small { font-size: .85rem; }

/* grafici a barre (admin) */
.bars-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 760px) { .bars-grid { grid-template-columns: 1fr; } }
.bars { display: flex; align-items: flex-end; gap: .6rem; height: 130px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; }
.bar i { display: block; width: 100%; max-width: 44px; border-radius: 8px 8px 4px 4px; background: var(--ink); min-height: 3px; opacity: .85; }
.bar.rose i { background: linear-gradient(180deg, var(--rose), var(--rose-dark)); opacity: 1; }
.bar b { font-size: .74rem; font-weight: 700; }
.bar span { font-size: .66rem; color: var(--ink-3); }

/* ================================================================
   ATTIVAZIONE (checkout 49 €)
   ================================================================ */
.upgrade-page { display: grid; place-items: center; padding: .5rem 0 2rem; }
.upgrade-card { width: min(540px, 100%); border-radius: var(--r-glass); overflow: hidden; background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow), var(--glass-inner); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%); backdrop-filter: blur(var(--glass-blur)) saturate(160%); }
.upgrade-head { padding: 2.25rem 2rem 1.75rem; text-align: center; background: linear-gradient(160deg, rgba(245,214,220,.7), rgba(226,221,244,.6)); border-bottom: 1px solid var(--line-2); }
.upgrade-crown { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 1rem; background: var(--ink); color: var(--butter); }
.upgrade-crown .ic { width: 24px; height: 24px; }
.upgrade-head h1 { font-size: 2rem; margin-bottom: .5rem; }
.upgrade-head p { color: var(--ink-2); font-size: .95rem; margin: 0 auto; max-width: 40ch; }
.upgrade-price { font-family: var(--font-display); font-size: 3.2rem; line-height: 1; letter-spacing: -.02em; font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 72; margin-top: 1rem; }
.upgrade-price sup { font-size: 1.3rem; position: relative; top: .3em; margin-right: .1em; }
.upgrade-price sub { font-family: var(--font-sans); font-size: .9rem; color: var(--ink-2); vertical-align: baseline; }
.upgrade-note { color: var(--ink-3); font-size: .82rem; margin-top: .6rem; }
.upgrade-body { padding: 1.75rem 2rem 2rem; }
.upgrade-feats { list-style: none; margin: 0 0 1.75rem; display: grid; gap: .55rem; }
.upgrade-feats li { display: flex; gap: .65rem; align-items: center; font-size: .95rem; }
.uf-yes { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(94,138,110,.15); color: var(--sage); flex-shrink: 0; }
.uf-yes .ic { width: 12px; height: 12px; }
.paypal-area { padding-top: .5rem; max-width: 360px; margin: 0 auto; }
apple-pay-button {
  display: block; width: 100%; box-sizing: border-box;
  --apple-pay-button-width: 100%; --apple-pay-button-height: 46px;
  --apple-pay-button-border-radius: 999px; --apple-pay-button-padding: 0; --apple-pay-button-box-sizing: border-box;
}
.pay-or { display: flex; align-items: center; gap: .75rem; margin: .9rem 0; color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.pay-or::before, .pay-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.pay-error { margin: .75rem 0 0; padding: .7rem .9rem; border-radius: 12px; background: rgba(201,79,79,.08); color: #9E3B3B; font-size: .88rem; }
.pay-error[hidden], #applepay-wrap[hidden], .pay-processing[hidden] { display: none; }
.pay-processing { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 1rem 0; color: var(--ink-2); font-size: .92rem; }
.spin { width: 22px; height: 22px; border: 3px solid rgba(43,39,51,.12); border-top-color: var(--rose); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.paypal-note { text-align: center; color: var(--ink-3); font-size: .78rem; margin-top: 1rem; line-height: 1.6; }
.paypal-note a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.upgrade-back { display: block; text-align: center; margin-top: 1rem; color: var(--ink-3); font-size: .82rem; }
@media (max-width: 560px) { .upgrade-head { padding: 1.75rem 1.25rem 1.5rem; } .upgrade-body { padding: 1.5rem 1.25rem; } }

/* ================================================================
   PAGINE LEGALI, ERRORI
   ================================================================ */
.legal-hero { padding: calc(92px + 3vw) 0 2.5rem; text-align: center; }
.legal-hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.legal-hero .updated { color: var(--ink-3); font-size: .8rem; margin: 1.25rem auto 0; }
.legal-content { padding: 1rem 0 5rem; }
.legal-doc { max-width: 760px; margin: 0 auto; padding: 2.5rem; color: var(--ink-2); border-radius: var(--r-glass); background: var(--glass-2); border: 1px solid var(--glass-line); box-shadow: var(--glass-shadow), var(--glass-inner); }
.legal-doc h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc h3 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; color: var(--ink); }
.legal-doc p { font-size: .95rem; line-height: 1.8; margin-bottom: 1rem; max-width: none; }
.legal-doc ul, .legal-doc ol { font-size: .95rem; line-height: 1.8; margin: 1rem 0 1rem 1.5rem; }
.legal-doc li { margin-bottom: .35rem; }
.legal-doc b, .legal-doc strong { color: var(--ink); font-weight: 600; }
.legal-doc a { color: var(--rose-dark); text-decoration: underline; text-decoration-color: rgba(217,114,138,.4); text-underline-offset: 3px; }
.legal-doc .table-wrap { margin: 1rem 0; }
.legal-doc table { width: 100%; min-width: 520px; border-collapse: collapse; margin: 0; background: rgba(255,255,255,.6); border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); font-size: .88rem; }
.legal-doc th { background: rgba(43,39,51,.05); padding: .8rem 1rem; text-align: left; font-weight: 600; color: var(--ink); font-size: .8rem; border-bottom: 1px solid var(--line); }
.legal-doc td { padding: .8rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.legal-doc tr:last-child td { border-bottom: none; }
.legal-doc code { background: rgba(43,39,51,.06); padding: 1px 6px; border-radius: 4px; font-size: .82rem; color: var(--rose-dark); }
.legal-nav { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line-2); font-size: .88rem; display: flex; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 720px) { .legal-doc { padding: 1.5rem; border-radius: var(--r-card); } }

.page-err { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.page-err .mark { display: flex; justify-content: center; margin-bottom: 1rem; }
.page-err .mark svg { height: 72px; width: auto; }
.page-err h1 { font-size: clamp(4rem, 12vw, 6rem); line-height: 1; }
.page-err p { color: var(--ink-2); margin: .75rem auto 1.5rem; max-width: 36ch; }

/* ================================================================
   COOKIE BANNER (solo tecnici) — pillola ink, come il toast
   ================================================================ */
.ck-bar { position: fixed; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 950; display: flex; justify-content: center; pointer-events: none; }
.ck-bar[hidden], .ck-modal[hidden] { display: none; }
.ck-in { pointer-events: auto; max-width: 680px; width: 100%; background: rgba(43,39,51,.92); color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.14); border-radius: 22px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  padding: 1rem 1.2rem; display: flex; gap: 1rem; align-items: center; box-shadow: 0 18px 40px -18px rgba(43,39,51,.6); animation: ck-in .35s var(--ease); }
@keyframes ck-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.ck-in p { font-size: .84rem; line-height: 1.55; margin: 0; max-width: none; }
.ck-in p b { color: #fff; }
.ck-in a { color: var(--blush); text-decoration: underline; text-underline-offset: 2px; }
.ck-btns { display: flex; gap: .5rem; flex: 0 0 auto; }
.ck-btn { font-weight: 600; font-size: .84rem; border: 0; border-radius: var(--r-pill); padding: .6rem 1.1rem; cursor: pointer; background: #fff; color: var(--ink); transition: .2s; white-space: nowrap; }
.ck-btn:hover { background: var(--blush); }
.ck-btn.ghost { background: transparent; color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.3); }
.ck-btn.ghost:hover { background: rgba(255,255,255,.1); }
.ck-modal { position: fixed; inset: 0; z-index: 960; background: rgba(43,39,51,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 1rem; }
.ck-card { max-width: 440px; width: 100%; background: var(--glass-3); border: 1px solid var(--glass-line); border-radius: var(--r-card); padding: 1.5rem; box-shadow: var(--glass-shadow); }
.ck-card h3 { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; margin: 0 0 1rem; }
.ck-row { display: flex; align-items: center; gap: 1rem; justify-content: space-between; padding: .8rem 0; border-top: 1px solid var(--line-2); }
.ck-row b { display: block; font-size: .9rem; }
.ck-row span:not(.tag) { display: block; font-size: .78rem; color: var(--ink-3); margin-top: .15rem; line-height: 1.45; }
.ck-more { font-size: .78rem; color: var(--ink-3); margin: .8rem 0 1rem; }
.ck-more a { color: var(--rose-dark); }
.ck-card .ck-btn { width: 100%; background: var(--ink); color: #fff; }
.ck-card .ck-btn:hover { background: #3a3544; }
@media (max-width: 560px) { .ck-in { flex-direction: column; align-items: stretch; text-align: center; padding: 1rem; } .ck-btns { display: grid; grid-template-columns: 1fr 1fr; } }
body:has(.ck-bar:not([hidden])) .ls-wa-float { bottom: 120px; }
