:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding:0}img{max-width:100%}[hidden]:not([hidden=until-found i]){display:none!important}
/* Layout: his club on a cream page (story rail, the phone wearing his brand, what happens behind).
   The group dashboard wears the same paper: see plancia.css. Palette from albertomarchetti.it. */
:root {
  color-scheme: light;
  --blue: #4A759F; --blue-deep: #3D6791; --blue-light: #89A9CB; --blue-tint: #E3EAF2;
  --saffron: #F4AD24; --coral: #D3705E;
  --cream: #EDEBDD; --paper: #F4F2E8; --card: #FBFAF4; --pline: #D9D5C5;
  --ink: #212529; --ink2: #2B3036; --ink3: #353B41; --line: #3E454C;
  --text: #F7F5EC; --muted: #C3CAD0; --pmuted: #545D65;
  --green: #0B6E4F; --mint: #86E0B8;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Jost', 'Segoe UI', Arial, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.45; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 48px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
.wrap { max-width: 1280px; margin: 0 auto; }

/* Top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--paper); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-block: 16px; border-bottom: 1px solid var(--pline); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.wm { font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: -.3px; }
.with { font-size: 14px; color: var(--pmuted); }
.proto { font-size: 12px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink); background: var(--saffron); border-radius: 999px; padding: 4px 12px; }
.seg { display: flex; background: var(--cream); border: 1px solid var(--pline); border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: transparent; padding: 9px 18px; border-radius: 999px; font-weight: 600; color: var(--pmuted); transition: background .3s var(--ease), color .3s; }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; margin-top: 24px; border-radius: 28px; background: var(--blue-deep); color: var(--text); padding: 48px 48px 44px; display: grid; gap: 14px; }
.hero h1 { position: relative; margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 6vw, 80px); line-height: 1.0; letter-spacing: -1.5px; text-wrap: balance; max-width: 15ch; }
.hero h1 em { font-style: italic; font-weight: 400; }
.hero p { position: relative; margin: 0; max-width: 60ch; font-size: 18px; color: var(--text); }
.hero .art { position: absolute; right: 0; top: 0; width: 520px; height: 100%; max-width: 50%; }

.view { display: none; }
.view.on { display: block; animation: viewin .5s var(--ease); }
@keyframes viewin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Customer side */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 400px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 36px; }
.rail { display: grid; gap: 4px; }
.rail h2, .behind h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--blue-deep); font-weight: 600; }
.behind h2 { color: var(--pmuted); }
.stepbtn { width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 14px; padding: 11px 14px; display: grid; grid-template-columns: 30px 1fr; gap: 2px 10px; transition: background .25s, border-color .25s; }
.stepbtn:hover { background: var(--cream); }
.stepbtn .n { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--pline); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--pmuted); font-variant-numeric: tabular-nums; }
.stepbtn .t { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.stepbtn .d { color: var(--pmuted); font-size: 14px; }
.stepbtn.done .n { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--text); }
.stepbtn.cur { background: var(--card); border-color: var(--pline); }
.stepbtn.cur .n { border-color: var(--saffron); background: var(--saffron); color: var(--ink); }
.railnav { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.btn { border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 600; background: var(--saffron); color: var(--ink); transition: transform .15s; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--pline); }

/* Phone */
.phonecol { display: grid; justify-items: center; gap: 14px; }
.phone { width: min(380px, calc(100vw - 32px)); height: 780px; border-radius: 56px; background: #0B0D0F; padding: 12px; box-shadow: 0 50px 100px rgba(61,103,145,.28), 0 0 0 1px #2B3036; position: relative; }
.screen { position: relative; height: 100%; border-radius: 44px; overflow: hidden; background: var(--cream); color: var(--ink); }
.status { height: 44px; display: flex; justify-content: space-between; align-items: center; padding: 0 28px; font-size: 14px; font-weight: 600; color: var(--ink); }
.notch { width: 110px; height: 30px; background: #0B0D0F; border-radius: 20px; }
.pages { position: absolute; inset: 44px 0 72px 0; }
.page { position: absolute; inset: 0; overflow-y: auto; padding: 6px 20px 24px; opacity: 0; transform: translateX(24px); pointer-events: none; transition: opacity .35s var(--ease), transform .45s var(--ease); scrollbar-width: none; }
.page.on { opacity: 1; transform: none; pointer-events: auto; }
.apphead { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.mono { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-deep); color: var(--text); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 14px; flex: none; }
.apphead .k { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; color: var(--blue-deep); }
.apphead .n2 { font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1.1; }
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 72px; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); border-top: 1px solid var(--pline); padding: 6px 6px 14px; }
.tabbar button { border: 0; background: transparent; display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--pmuted); border-radius: 12px; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button[aria-selected="true"] { color: var(--blue-deep); }
.ptitle { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -.5px; line-height: 1.05; margin: 4px 0 14px; }
.psub { color: var(--pmuted); font-size: 14px; margin: -8px 0 14px; }

/* The club card */
.wcard { position: relative; border-radius: 22px; padding: 20px 20px 18px; color: var(--text); background: var(--blue-deep); overflow: hidden; box-shadow: 0 20px 40px rgba(61,103,145,.3); }
.wtop svg { width: 26px; height: 34px; }
.wtop { position: relative; display: flex; justify-content: space-between; align-items: center; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; }
.wclub { position: relative; font-family: var(--serif); font-size: 21px; font-weight: 500; margin-top: 6px; }
.wrow { position: relative; display: flex; justify-content: space-between; margin-top: 16px; gap: 12px; }
.wk { font-size: 12px; color: #DCE5EF; }
.wv { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1.0; font-variant-numeric: tabular-nums; }
.lvl { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; background: var(--saffron); color: var(--ink); border-radius: 999px; padding: 3px 11px; margin-top: 6px; }
.bar { position: relative; height: 6px; border-radius: 3px; background: rgba(247,245,236,.22); margin-top: 16px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--saffron); border-radius: 3px; width: 0; transition: width .9s var(--ease); }
.next { position: relative; font-size: 13px; color: #E8EEF4; margin-top: 8px; }
.wfoot { position: relative; display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.qr { width: 64px; height: 64px; background: var(--card); border-radius: 10px; padding: 6px; }
.walletbtn { border: 0; background: var(--text); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 14px; }
.walletbtn.in { background: var(--saffron); color: var(--ink); }
.sec { margin-top: 22px; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--blue-deep); font-weight: 600; }
.places { display: grid; gap: 8px; margin-top: 10px; }
.place { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--pline); border-radius: 14px; padding: 10px 12px; }
.pic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-tint); color: var(--blue-deep); }
.pic svg { width: 22px; height: 22px; }
.pn { font-family: var(--serif); font-weight: 500; font-size: 16px; line-height: 1.15; }
.pd { font-size: 12.5px; color: var(--pmuted); }
.chip { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 9px; background: var(--cream); color: var(--ink); white-space: nowrap; flex: none; align-self: flex-start; line-height: 1.35; }
.chip.b { background: var(--blue-tint); color: var(--blue-deep); }
.chip.s { background: var(--saffron); color: var(--ink); }
.chip.o { background: transparent; border: 1px dashed var(--pmuted); color: var(--pmuted); }
.dono { margin-top: 14px; background: var(--card); border: 1px solid var(--pline); border-radius: 18px; padding: 14px; display: grid; gap: 6px; }
.dono .h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; font-family: var(--serif); font-weight: 500; font-size: 17px; }
.dono p { margin: 0; font-size: 13px; color: var(--pmuted); }
.dono .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; font-size: 13.5px; }
.minibtn { white-space: nowrap; flex: none; border: 0; border-radius: 10px; background: var(--blue-deep); color: var(--text); font-weight: 600; font-size: 13px; padding: 8px 12px; }

/* Lists */
.item { background: var(--card); border: 1px solid var(--pline); border-radius: 16px; padding: 13px 14px; display: grid; gap: 4px; margin-bottom: 10px; text-align: left; width: 100%; }
.item .h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; font-family: var(--serif); font-weight: 500; font-size: 16.5px; line-height: 1.2; }
.item .s { font-size: 13px; color: var(--pmuted); }
.item.lock { background: transparent; border-style: dashed; }
.item.hero2 { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--text); }
.item.hero2 .s { color: #E8EEF4; }
.item .act { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.item.new { animation: pop .6s var(--ease); }
@keyframes pop { 0% { transform: scale(.96); opacity: 0; } 100% { transform: none; opacity: 1; } }
.amt { font-variant-numeric: tabular-nums; font-family: var(--sans); font-weight: 600; font-size: 15px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters button { border: 1px solid var(--pline); background: var(--card); border-radius: 999px; padding: 6px 11px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--blue-deep); color: var(--text); border-color: var(--blue-deep); }
.flav { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: transparent; border: 0; border-top: 1px solid var(--pline); padding: 11px 2px; }
.flav .fn { font-family: var(--serif); font-weight: 500; font-size: 17px; }
.flav .fs { font-size: 12.5px; color: var(--pmuted); }
.qrhint { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--pmuted); margin: 12px 0 0; }

/* Form */
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--pmuted); }
.field input { border: 1px solid var(--pline); background: var(--card); border-radius: 12px; padding: 11px 12px; font: inherit; color: var(--ink); }
.cons { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--pline); }
.cons .ct { font-weight: 600; font-size: 14.5px; }
.cons .cd { font-size: 12.5px; color: var(--pmuted); }
.sw { width: 46px; height: 28px; border-radius: 14px; border: 0; background: #C9C4B3; position: relative; transition: background .25s; padding: 0; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.sw[aria-checked="true"] { background: var(--blue-deep); }
.sw[aria-checked="true"]::after { transform: translateX(18px); }
.sw:disabled { opacity: .55; cursor: not-allowed; }
.cta { width: 100%; border: 0; border-radius: 14px; padding: 14px; background: var(--blue-deep); color: var(--text); font-weight: 600; margin-top: 14px; }
.timer { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--blue-deep); font-weight: 600; margin: 6px 0 12px; }

/* Notification + sheets */
.notif { position: absolute; left: 10px; right: 10px; top: 48px; z-index: 5; background: #212529; color: var(--text); border-radius: 20px; padding: 12px 14px; display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; transform: translateY(calc(-100% - 64px)); opacity: 0; visibility: hidden; transition: transform .55s var(--ease), opacity .3s ease, visibility 0s linear .55s; box-shadow: 0 20px 40px rgba(0,0,0,.35); }
.notif.on { transform: none; opacity: 1; visibility: visible; transition: transform .55s var(--ease), opacity .2s ease, visibility 0s; }
.notif .ni { width: 36px; height: 36px; border-radius: 10px; background: var(--saffron); display: grid; place-items: center; font-weight: 700; color: var(--ink); font-size: 13px; }
.notif .nt { font-weight: 600; font-size: 14px; }
.notif .nx { font-size: 13px; color: var(--muted); }
.sheet { position: absolute; inset: auto 0 0 0; z-index: 6; background: var(--card); border-radius: 26px 26px 0 0; padding: 18px 20px 26px; transform: translateY(105%); transition: transform .5s var(--ease); box-shadow: 0 -20px 50px rgba(0,0,0,.25); max-height: 86%; overflow-y: auto; }
.sheet.on { transform: none; }
.scrim { position: absolute; inset: 0; z-index: 5; background: rgba(33,37,41,.35); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--pline); margin: 0 auto 14px; }
.rline { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--pline); font-size: 14px; }
.rtot { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; padding-top: 12px; }
.fil-motto { background: var(--blue-deep); color: var(--text); border-radius: 16px; padding: 14px; margin: 4px 0 10px; }
.fil-motto .k { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; }
.fil-motto p { margin: 4px 0 0; font-family: var(--serif); font-style: italic; font-size: 17px; }
.ing { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--pline); }
.ing .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--blue-tint); color: var(--blue-deep); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; }
.ing b { font-family: var(--serif); font-weight: 500; font-size: 15.5px; }
.ing span { display: block; font-size: 12.5px; color: var(--pmuted); }
.allerg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.allerg span { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 4px 10px; border: 1.5px solid var(--coral); color: var(--ink); }
.levelup { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; padding: 28px; background: var(--blue-deep); opacity: 0; pointer-events: none; transition: opacity .35s; text-align: center; color: var(--text); }
.levelup.on { opacity: 1; pointer-events: auto; }
.levelup .big { font-family: var(--serif); font-size: 52px; font-weight: 500; letter-spacing: -1px; line-height: 1; transform: scale(.8); transition: transform .6s var(--ease); }
.levelup.on .big { transform: none; }
.levelup .sx { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--text); margin-top: 12px; }
.ring { width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 20px; border: 2px solid var(--saffron); box-shadow: 0 0 0 14px rgba(244,173,36,.16), 0 0 0 30px rgba(244,173,36,.08); display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: 1.6px; text-transform: uppercase; }

/* Behind panel, in Tavola56's voice */
.behind { display: grid; gap: 12px; }
.bcard { background: var(--ink); color: var(--text); border: 1px solid var(--ink); border-radius: 18px; padding: 16px 18px; }
.bcard .k { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--mint); font-weight: 600; }
.bcard .v { margin-top: 6px; font-size: 15.5px; }
.bcard.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { border-color: var(--saffron); background: #2E3A33; } 100% { border-color: var(--ink); background: var(--ink); } }
.honest { font-size: 13.5px; color: var(--pmuted); border-top: 1px solid var(--pline); padding-top: 12px; margin: 0; }

.foot { margin-top: 44px; border-top: 1px solid var(--pline); padding-top: 18px; color: var(--pmuted); font-size: 14px; display: grid; gap: 6px; max-width: 90ch; }

@media (max-width: 1100px) {
  .stage { grid-template-columns: minmax(0, 1fr) 400px; }
  .behind { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .behind h2, .behind .honest { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .hero { padding: 32px 22px; }
  .hero .art { display: none; }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .phonecol { order: -1; }
  .phone { height: 720px; }
  .behind { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* Compatibilita mobile e fallback per le anteprime senza JavaScript. */
.preview-warning { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--pline); border-radius: 12px; background: var(--card); color: var(--ink); }
@media (max-width: 760px) {
  body { padding-left: 16px; padding-right: 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .top { position: relative; top: auto; }
  .phonecol { min-width: 0; width: 100%; }
  .phone { width: 100%; max-width: 380px; height: 720px; padding: 8px; border-radius: 38px; }
  .screen { border-radius: 30px; }
  .page { padding-left: 12px; padding-right: 12px; -webkit-overflow-scrolling: touch; }
  .hero h1 { font-size: 40px; }
  .field input { font-size: 16px; min-width: 0; width: 100%; }
  .place { grid-template-columns: 34px minmax(0,1fr); }
  .place > .chip { grid-column: 2; justify-self: start; }
  .status { padding: 0 16px; }
  .wfoot { gap: 8px; }
  .tabbar button { padding: 0; font-size: 10px; }
}
@media (max-width: 360px) {
  .seg button { padding: 9px 12px; }
}
