/* =========================================================
   La Selection — Mini App · Home
   Stile: Liquid Glass chiaro, sfondo avorio animato

   REGOLE DEL DESIGN SYSTEM (non usare valori fuori da qui)
   - Spazi:   4 · 8 · 12 · 16 · 24
   - Testo:   11 · 13 · 15 · 17 · 24 (solo titolo della scheda venditore) (+ logo)
   - Raggi:   capsula (999) · pannello 24 · interno 16
   - Comandi: 44 px (barra laterale, header) · 48 px (ricerca)
   - Un solo materiale: .glass
   ========================================================= */

:root {
  color-scheme: light;

  /* Colori */
  --bg:        #f4eee3;                    /* avorio */
  --ink:       #1f1b14;                    /* testo */
  --ink-2:     rgba(31, 27, 20, .62);      /* testo secondario */
  --gold:      #c9963e;                    /* oro per superfici */
  --gold-text: #8a5d12;                    /* oro per testi (contrasto 4.5:1 su avorio) */
  --gold-hi:   #f2d390;
  --gold-ink:  #2a1d05;                    /* testo su oro */
  --live:      #1fb866;
  --hair:      rgba(31, 27, 20, .09);      /* separatori */

  /* mappa */
  --on-1: #5cbf8e;  --on-2: #1f7a55;       /* disponibile: verde smeraldo */
  --off-1: #e88a7c; --off-2: #b44a40;      /* non disponibile: rosso corallo */

  /* Materiale vetro (chiaro) */
  --glass-tint:  rgba(255, 252, 245, .42);
  --glass-blur:  blur(18px) saturate(180%);

  /* Tipografia */
  --f-logo: "Pinyon Script", cursive;
  --f-ui:   "Onest", -apple-system, system-ui, sans-serif;
  --t-cap:  11px;
  --t-sm:   13px;
  --t-body: 15px;
  --t-head: 17px;
  --t-title: 24px;

  /* Spazi */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px;

  /* Raggi */
  --r-panel: 24px;
  --r-inner: 16px;

  /* Misure */
  --ctl: 44px;
  --ctl-lg: 48px;
  --tabbar-h: 64px;
  --app-max: 480px;

  /* Zone sicure: notch + barre di Telegram */
  --safe-t: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));

  /* Movimento */
  --ease:   cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.36, .5, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #e9e2d4;
  color: var(--ink);
  font: 400 var(--t-body)/1.33 var(--f-ui);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input  { font: inherit; color: inherit; user-select: text; -webkit-user-select: text; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h2, p { margin: 0; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; }

/* icone: un solo stile di tratto */
.btn-round svg, .rail-btn svg, .tab svg, .search svg, .ico-slot svg {
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
svg .solid { fill: currentColor; stroke: none; }

.tap { transition: transform .25s var(--spring); touch-action: manipulation; }
.tap:active { transform: scale(.94); }

/* =========================================================
   MATERIALE: Liquid Glass chiaro
   ========================================================= */
.glass {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.18) 100%),
    var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-blur);
          backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(255,255,255,.35),
    0 12px 30px -12px rgba(92,68,28,.30),
    0 2px 6px -2px rgba(92,68,28,.16);
}
/* bordo luminoso: più chiaro in alto a sinistra e in basso a destra */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(255,255,255,1) 0%, rgba(255,255,255,.55) 25%,
    rgba(201,150,62,.18) 55%,
    rgba(255,255,255,.4) 80%, rgba(255,255,255,.95) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
/* riflesso in alto */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(130% 70% at 25% -10%, rgba(255,255,255,.7), transparent 55%);
  pointer-events: none;
}

.capsule { border-radius: 999px; }
/* pannelli con testo: vetro più coprente (variante "regular") */
.panel   { border-radius: var(--r-panel); --glass-tint: rgba(255, 252, 245, .78); }

/* lente: indicatore che scivola come liquido */
.lens {
  --c-rgb: 201,150,62;
  position: absolute;
  z-index: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(var(--c-rgb),.30), rgba(var(--c-rgb),.12));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 0 0 1px rgba(var(--c-rgb),.45),
    0 4px 14px -4px rgba(var(--c-rgb),.55);
  transition: transform .55s var(--spring), width .45s var(--spring), opacity .3s, background .4s ease, box-shadow .4s ease;
  pointer-events: none;
}
.lens.is-moving { animation: squish .55s var(--ease); }
@keyframes squish {
  35% { scale: 1.12 .9; }
  70% { scale: .97 1.03; }
}

/* =========================================================
   SHELL E SFONDO ANIMATO
   ========================================================= */
.app {
  position: relative;
  height: 100%;
  max-width: var(--app-max);
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}
@media (min-width: 520px) {
  .app { box-shadow: 0 0 0 1px rgba(92,68,28,.08), 0 30px 120px rgba(92,68,28,.25); }
}
.marble {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.marble.is-ready { opacity: 1; }
.marble.is-off { display: none; } /* senza WebGL resta il fondo avorio */

@keyframes fade { from { opacity: 0; } }

/* =========================================================
   MAPPA
   ========================================================= */
.stage {
  position: absolute;
  left: 0; right: 0;
  top: var(--area-top, 150px);
  height: var(--area-h, 520px);
  touch-action: none;
  cursor: grab;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.stage.is-grabbing { cursor: grabbing; }

.plane {
  position: absolute;
  left: var(--map-x, 40px);
  top: var(--map-y, 10px);
  width: var(--map-w, 340px);
  height: var(--map-h, 446px);
  transform-origin: 50% 50%;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(var(--k, 1));
  transition: transform .7s var(--ease);
  will-change: transform;
}
.stage.is-grabbing .plane, .plane.no-anim { transition: none; }

.borders {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  /* ombra morbida sotto l'Italia: sembra appoggiata sul foglio */
  filter: drop-shadow(0 14px 18px rgba(92,68,28,.22)) drop-shadow(0 2px 3px rgba(92,68,28,.18));
}

.region {
  stroke: rgba(255,255,255,.95);
  stroke-width: calc(.7px / var(--k, 1));
  stroke-linejoin: round;
  cursor: pointer;
  outline: none;                 /* niente riquadro del browser al tocco */
  transition: fill .35s ease, opacity .35s ease;
}
.region.is-on  { fill: url(#g-on); }
.region.is-off { fill: url(#g-off); }
.region:focus { outline: none; }
.region:focus-visible { stroke: var(--ink); stroke-width: calc(1.6px / var(--k, 1)); }
@media (hover: hover) { .region:hover { opacity: .88; } }

.selected-layer path {
  stroke: #fff;
  stroke-width: calc(2px / var(--k, 1));
  stroke-linejoin: round;
  pointer-events: none;
  animation: fade .3s var(--ease);
}
.selected-layer path.is-on  { fill: url(#g-on-sel); }
.selected-layer path.is-off { fill: url(#g-off-sel); }

/* onda di luce (cambio filtro, tocco su una regione): passa sotto i pannelli di vetro */
.ripple {
  position: absolute;
  z-index: 5;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--c-rgb), 0) 52%, rgba(var(--c-rgb), .55) 64%, rgba(var(--c-rgb), .12) 72%, rgba(var(--c-rgb), 0) 80%);
  animation: wave 1.1s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes wave {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(60); opacity: 0; }
}
.region.is-pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop .6s var(--spring) both;
  animation-delay: var(--wd, 0ms);
}
@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.07); filter: brightness(1.15); }
  100% { transform: scale(1); }
}
/* regione toccata: si solleva */
.selected-layer path {
  transform-box: fill-box;
  transform-origin: center;
  animation: lift .55s var(--spring) both !important;
}
@keyframes lift { from { transform: scale(1); } 60% { transform: scale(1.06); } to { transform: scale(1.035); } }

/* punto del locale cercato (resta della stessa misura con lo zoom) */
.pins { position: absolute; inset: 0; pointer-events: none; }
.spot { position: absolute; width: 0; height: 0; }
.spot::before, .spot::after {
  content: "";
  position: absolute;
  left: -6px; top: -6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  transform: scale(var(--inv, 1));
  transition: transform .7s var(--ease);
}
.spot::before { background: #fff; box-shadow: 0 0 0 3px var(--gold), 0 2px 8px rgba(92,68,28,.5); }
.spot::after { border: 2px solid var(--gold); animation: ping 1.8s ease-out infinite; }
@keyframes ping { from { opacity: 1; scale: 1; } to { opacity: 0; scale: 3.2; } }

/* =========================================================
   INTERFACCIA: griglia verticale
   ========================================================= */
.chrome {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  row-gap: var(--s3);
  padding: calc(var(--safe-t) + var(--s2)) var(--s4) calc(var(--safe-b) + var(--s3));
  pointer-events: none;
  /* niente opacità/animazioni qui: renderebbero "cieco" il vetro (backdrop-filter) */
}
.chrome > * { pointer-events: auto; min-width: 0; }
.chrome > .map-area { pointer-events: none; }

/* --- header --- */
.header {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 64px;
}
.btn-round {
  width: var(--ctl); height: var(--ctl);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.btn-round svg { width: 20px; height: 20px; }
.btn-round.btn-lg { width: var(--ctl-lg); height: var(--ctl-lg); }

.brand { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.brand-crown { width: 20px; height: 12px; fill: var(--gold); margin-bottom: var(--s1); }
.logo {
  font-family: var(--f-logo);
  font-size: 34px;
  line-height: 32px;
  height: 32px;
  padding: 0 var(--s2);
  background: linear-gradient(100deg, #7d5412 0%, #c9963e 40%, #e8bf6a 52%, #9a6a1c 70%, #7d5412 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sheen 8s ease-in-out infinite;
}
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }
.tagline {
  margin-top: var(--s1);
  font-size: var(--t-cap);
  font-weight: 500;
  line-height: 14px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-right: -.32em;
}

/* --- dati --- */
.stats { display: flex; gap: var(--s2); }
.stats-main {
  flex: 1;
  height: 52px;
  border-radius: 999px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 0 var(--s2);
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
.stats-main .stat + .stat { box-shadow: -1px 0 0 var(--hair); }
.stat-top {
  height: 20px;
  display: flex;
  align-items: center;
  gap: var(--s1);
  font: 600 var(--t-head)/20px var(--f-ui);
  color: var(--gold-text);
  letter-spacing: -.01em;
}
.stat-top svg { width: 18px; height: 18px; fill: var(--gold); }
.stat-label {
  display: flex;
  align-items: center;
  gap: var(--s1);
  font-size: var(--t-cap);
  line-height: 14px;
  color: var(--ink-2);
  white-space: nowrap;
}
.live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: live 2.2s ease-out infinite;
}
.live-sm { width: 6px; height: 6px; }
.live.is-off { background: #b5aea2; animation: none; }
@keyframes live {
  0%   { box-shadow: 0 0 0 0 rgba(31,184,102,.45); }
  100% { box-shadow: 0 0 0 6px rgba(31,184,102,0); }
}
.stats-visits {
  height: 52px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s4) 0 var(--s3);
}
.stats-visits > svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.stats-visits .stat { align-items: flex-start; }

/* --- area mappa --- */
.map-area { position: relative; min-height: 0; }
.map-area > * { pointer-events: auto; }

.rail-left {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s2);
  pointer-events: none !important;
}
.rail-left > * { pointer-events: auto; }
.rail-spacer { flex: 1; pointer-events: none !important; }
.popover-anchor { position: relative; }

.ico-slot { width: var(--ctl); height: var(--ctl); display: grid; place-items: center; flex: none; }
.ico-slot svg { width: 20px; height: 20px; }

/* barre verticali (filtri, zoom): larghe 44, icone centrate a 22 */
.rail {
  width: var(--ctl);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rail-btn {
  position: relative;
  z-index: 1;
  width: var(--ctl); height: var(--ctl);
  display: grid;
  place-items: center;
  color: var(--ink);
}
.rail-btn svg { width: 20px; height: 20px; }
.rail-sep { height: 1px; margin: 0 var(--s3); background: var(--hair); flex: none; }

/* filtri: la barra si allarga per mostrare le etichette */
.filters { transition: width .45s var(--spring); }
.filters.is-open { width: 136px; --glass-tint: rgba(255, 252, 245, .80); }
.filter {
  position: relative;
  z-index: 1;
  height: var(--ctl);
  display: flex;
  align-items: center;
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 500;
  white-space: nowrap;
  transition: color .25s ease;
}
.filter[aria-checked="true"] { color: var(--ink); }
.f-badge {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, rgba(var(--c-rgb), .78), var(--c));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 3px 8px -2px rgba(var(--c-rgb), .55);
  transition: transform .35s var(--spring), box-shadow .35s ease;
}
.f-badge svg { width: 17px; height: 17px; stroke-width: 1.9; }
.filter[aria-checked="true"] .f-badge {
  transform: scale(1.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 3px rgba(255,255,255,.9), 0 0 0 4.5px rgba(var(--c-rgb), .5), 0 6px 16px -4px rgba(var(--c-rgb), .8);
}

/* micro-animazioni delle icone (al tocco) */
.f-badge.is-playing.a-tutti svg    { animation: crown .7s var(--spring); }
.f-badge.is-playing.a-vip svg      { animation: gem .8s var(--ease); }
.f-badge.is-playing.a-delivery svg { animation: drive .8s var(--ease); }
.f-badge.is-playing.a-meetup svg   { animation: shake .7s var(--ease); }
.f-badge.is-playing { animation: badgePop .6s var(--spring); }
@keyframes badgePop { 40% { transform: scale(1.25); } }
@keyframes crown { 30% { transform: translateY(-4px) rotate(-12deg); } 60% { transform: translateY(0) rotate(8deg); } }
@keyframes gem   { 30% { transform: scale(1.3) rotate(10deg); filter: drop-shadow(0 0 4px #fff); } 60% { transform: scale(.9) rotate(-6deg); } }
@keyframes drive { 30% { transform: translateX(6px); } 45% { transform: translateX(-8px); opacity: 0; } 46% { transform: translateX(-8px); opacity: 0; } 70% { transform: translateX(0); opacity: 1; } }
@keyframes shake { 20% { transform: rotate(-14deg) scale(1.1); } 40% { transform: rotate(10deg) scale(1.1); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } }
.f-label { opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .3s var(--ease); }
.filters.is-open .f-label { opacity: 1; transform: none; transition-delay: .15s; }
#filter-lens { left: 4px; top: 4px; width: 36px; height: 36px; }
.filters.is-open #filter-lens { width: 128px; }

/* --- card --- */
.card {
  position: absolute;
  top: 0; right: 0;
  z-index: 20;
  width: 176px;
  padding: var(--s2);
  transform-origin: top right;
  animation: cardIn .5s var(--spring);
}
@keyframes cardIn { from { opacity: 0; transform: scale(.88); } }
.card-photo {
  height: 104px;
  border-radius: var(--r-inner);
  overflow: hidden;
  background-color: #efe7d8;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(92,68,28,.08);
}
.card-photo.is-map {
  display: grid;
  place-items: center;
  padding: var(--s2);
  background: radial-gradient(90% 90% at 50% 35%, #fffaf0, #ece2cf);
}
.card-photo { position: relative; }
.card-photo.is-map svg {
  position: absolute;
  inset: var(--s3);
  width: calc(100% - 2 * var(--s3));
  height: calc(100% - 2 * var(--s3));
  overflow: visible;
  filter: drop-shadow(0 4px 6px rgba(92,68,28,.25));
}
.card-photo.is-map path { stroke: #fff; stroke-linejoin: round; }
.card-photo.is-map .is-on  { fill: url(#g-on); }
.card-photo.is-map .is-off { fill: url(#g-off); }
.card-photo.is-map circle.here { fill: #fff; stroke: var(--gold); }
.card-photo.is-map circle.ring { fill: none; stroke: var(--gold); opacity: .7; }
.card-close {
  position: absolute;
  top: var(--s4); right: var(--s4);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.75);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(92,68,28,.12), 0 2px 6px rgba(92,68,28,.18);
}
.card-close svg { width: 14px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.card-body { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) var(--s1) 0; }
.card-title { font-size: var(--t-head); line-height: 22px; font-weight: 600; letter-spacing: -.01em; }
.card-meta {
  font-size: var(--t-sm);
  line-height: 18px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-check { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); line-height: 18px; }
.check {
  width: 16px; height: 16px; flex: none;
  border-radius: 50%;
  background: var(--live) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.check.is-soon { background: rgba(31,27,20,.18); }
.btn-gold {
  margin-top: var(--s2);
  height: 40px;
  border-radius: 999px;
  padding: 0 var(--s3) 0 var(--s4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--gold-ink);
  background: linear-gradient(180deg, #f6dc9c 0%, #dcab52 55%, #c18f36 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 -1px 0 rgba(0,0,0,.08), 0 6px 16px -6px rgba(150,105,30,.6);
}
.btn-gold svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --- legenda --- */
.legend {
  position: absolute;
  right: 0; bottom: 0;
  height: 32px;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 0 var(--s3);
  font-size: var(--t-cap);
  font-weight: 500;
  color: var(--ink);
  pointer-events: none !important;
}
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.dot-on  { background: linear-gradient(135deg, var(--on-1), var(--on-2)); }
.dot-off { background: linear-gradient(135deg, var(--off-1), var(--off-2)); }

/* --- avviso --- */
.toast {
  position: absolute;
  top: 0; left: 50%;
  z-index: 30;
  translate: -50% 0;
  width: max-content;
  max-width: calc(100% - 104px);
  padding: var(--s3) var(--s4);
  font-size: var(--t-sm);
  text-align: center;
  --glass-tint: rgba(255, 252, 245, .85);
  animation: toastIn .45s var(--spring);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(.96); } }

/* --- ricerca --- */
.search-row { display: flex; gap: var(--s2); }
.search-anchor { flex: 1; min-width: 0; }
.search {
  height: var(--ctl-lg);
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 0 var(--s4);
  color: var(--ink);
}
.search svg { width: 20px; height: 20px; }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: none;
  font-size: 16px; /* 16px: niente zoom automatico su iPhone */
}
.search input::placeholder { color: var(--ink-2); }
.search input::-webkit-search-cancel-button { display: none; }

/* --- pannelli a comparsa --- */
.popover {
  position: absolute;
  z-index: 40;
  padding: var(--s2);
  max-height: 46vh;
  overflow-y: auto;
  scrollbar-width: none;
  --glass-tint: rgba(255, 252, 245, .86);
  animation: popIn .35s var(--spring);
}
.popover::-webkit-scrollbar { display: none; }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } }
.results { left: 0; right: 0; bottom: calc(var(--ctl-lg) + var(--s2)); transform-origin: bottom center; }

.option {
  width: 100%;
  min-height: var(--ctl);
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3);
  border-radius: var(--r-inner);
  text-align: left;
  transition: background-color .2s ease;
}
.option:active { background: rgba(201,150,62,.14); }
@media (hover: hover) { .option:hover { background: rgba(201,150,62,.10); } }
.option-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.option-name { font-size: var(--t-body); font-weight: 500; }
.option-sub { font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.option-ico {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(201,150,62,.16);
  color: var(--gold-text);
  flex: none;
}
.option-ico svg { width: 18px; height: 18px; fill: currentColor; }
.option-ico.is-line svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty { padding: var(--s3); font-size: var(--t-sm); color: var(--ink-2); }

/* --- tab bar --- */
.tabbar {
  height: var(--tabbar-h);
  margin-top: var(--s3);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 0 6px;
}
.tab {
  position: relative;
  z-index: 1;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: var(--t-cap);
  font-weight: 500;
  color: var(--ink-2);
  touch-action: manipulation;
  transition: color .3s ease;
}
.tab svg { width: 24px; height: 24px; transition: transform .3s var(--spring); }
.tab:active svg { transform: scale(.86); }
.tab.is-active { color: var(--gold-ink); }
.tab-lens { top: 6px; left: 0; height: 52px; width: 64px; }

.tab-vip { height: var(--tabbar-h); }
.vip {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 60px; height: 60px;
  margin-left: -30px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--gold-ink);
  font-size: var(--t-cap);
  font-weight: 700;
  letter-spacing: .08em;
  background: radial-gradient(circle at 34% 26%, #fff6d8 0%, #edc66f 42%, #b9872f 100%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.9),
    inset 0 -3px 6px rgba(120,80,20,.3),
    0 0 0 4px rgba(255,252,245,.9),
    0 0 0 5px rgba(201,150,62,.45),
    0 10px 24px -6px rgba(150,105,30,.55);
  transition: transform .3s var(--spring);
}
.vip svg { width: 24px; height: 24px; fill: var(--gold-ink); stroke: none; margin-bottom: -1px; }
.tab-vip:active .vip { transform: scale(.92); }

/* =========================================================
   APERTURA CINEMATOGRAFICA (~2,6 s, un tocco la salta)
   1. una linea d'oro disegna l'Italia
   2. le regioni si colorano a onda da nord a sud
   3. il logo appare con un riflesso, i pannelli emergono dai bordi
   ========================================================= */
.app.intro .region {
  fill-opacity: 0;
  stroke: var(--gold);
  stroke-width: calc(1.1px / var(--k, 1));
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition:
    stroke-dashoffset 1.3s cubic-bezier(.45, 0, .2, 1) calc(var(--i) * 30ms),
    fill-opacity .6s ease calc(var(--i) * 55ms),
    stroke .6s ease calc(var(--i) * 55ms + .2s),
    stroke-width .6s ease calc(var(--i) * 55ms + .2s);
}
.app.intro.i-draw .region { stroke-dashoffset: 0; }
.app.intro.i-fill .region { fill-opacity: 1; stroke: rgba(255,255,255,.95); stroke-width: calc(.7px / var(--k, 1)); }
.app.intro .borders { filter: none; }
.app.intro.i-fill .borders { filter: drop-shadow(0 14px 18px rgba(92,68,28,.22)) drop-shadow(0 2px 3px rgba(92,68,28,.18)); transition: filter .8s ease; }

/* logo: compare dalla sfocatura, poi un lampo di luce lo attraversa */
.app.intro .brand { opacity: 0; transform: scale(.94); filter: blur(6px); }
.app.intro.i-brand .brand { opacity: 1; transform: none; filter: none; transition: opacity .9s var(--ease), transform 1.1s var(--ease), filter .9s var(--ease); }
.app.intro.i-brand .logo { animation: flash 1.4s .3s var(--ease) both, sheen 8s ease-in-out infinite; }
@keyframes flash {
  from { background-position: 160% 0; }
  to   { background-position: -60% 0; }
}

/* pannelli di vetro: emergono dai bordi */
.app.intro .header .btn-round,
.app.intro .stats > *,
.app.intro .rail-left > *,
.app.intro .legend,
.app.intro .search-row > *,
.app.intro .tabbar {
  opacity: 0;
  transform: var(--from, translateY(14px)) scale(.96);
}
.app.intro .header .btn-round, .app.intro .stats > * { --from: translateY(-14px); }
.app.intro .rail-left > * { --from: translateX(-18px); }
.app.intro.i-ui .header .btn-round,
.app.intro.i-ui .stats > *,
.app.intro.i-ui .rail-left > *,
.app.intro.i-ui .legend,
.app.intro.i-ui .search-row > *,
.app.intro.i-ui .tabbar {
  opacity: 1;
  transform: none;
  transition: opacity .6s var(--ease) var(--d, 0s), transform .8s var(--spring) var(--d, 0s);
}
.app.intro .stats > :nth-child(2) { --d: .06s; }
.app.intro .rail-left > :nth-child(3) { --d: .08s; }
.app.intro .search-row > * { --d: .1s; }
.app.intro .search-row > :nth-child(2) { --d: .16s; }
.app.intro .tabbar { --d: .2s; }
.app.intro .legend { --d: .26s; }

/* =========================================================
   PAGINA LISTA — tutti i venditori divisi per livello
   ========================================================= */
/* passando alla Lista, la mappa e i suoi comandi lasciano il posto alla pagina */
.stage, .chrome > .stats, .chrome > .map-area, .chrome > .search-row {
  transition: opacity .35s ease, transform .45s var(--ease);
}
.app.on-list .stage, .app.on-news .stage,
.app.on-list .chrome > .stats, .app.on-news .chrome > .stats,
.app.on-list .chrome > .map-area, .app.on-news .chrome > .map-area,
.app.on-list .chrome > .search-row, .app.on-news .chrome > .search-row { opacity: 0; transform: scale(.97); pointer-events: none; }

.page-list, .page-news {
  position: absolute;
  z-index: 12;
  left: 0; right: 0;
  top: calc(var(--safe-t) + var(--s2) + 64px + var(--s2));
  bottom: calc(var(--safe-b) + var(--s3) + var(--tabbar-h) + var(--s2));
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .35s ease, transform .5s var(--spring);
  pointer-events: none;
}
.app.on-list .page-list, .app.on-news .page-news { opacity: 1; transform: none; pointer-events: auto; }
.pl-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--s4) var(--s6);   /* niente spazio sopra: la barra dei livelli aderisce al bordo */
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(180deg, #000 calc(100% - 24px), transparent);
}
.pl-scroll::-webkit-scrollbar { display: none; }
.pl-head { padding: var(--s3) var(--s1) var(--s3); }
.pl-title { margin: 0; font-size: var(--t-title); line-height: 30px; font-weight: 700; letter-spacing: -.02em; }
.pl-sub { font-size: var(--t-sm); color: var(--ink-2); margin-top: 2px; }
.pl-search { margin-bottom: var(--s3); }

/* barra dei livelli: resta in alto mentre scorri */
.tier-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  height: var(--ctl);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px;
  margin-bottom: var(--s2);
  --glass-tint: rgba(255, 252, 245, .80);
}
.tier-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-2);
  transition: color .25s ease, opacity .25s ease;
}
.tier-tab.is-active { color: var(--ink); }
.tier-tab:disabled { opacity: .35; }
.tier-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--t);
  box-shadow: 0 0 0 2px rgba(var(--t-rgb), .2);
}
.tier-lens { top: 4px; left: 0; height: 36px; width: 80px; }

.pl-sections { display: flex; flex-direction: column; gap: var(--s6); padding-top: var(--s3); }
.tier-head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s3);
  padding: 0 var(--s1);
}
.tier-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, rgba(var(--t-rgb), .75), var(--t));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 10px -3px rgba(var(--t-rgb), .6);
}
.tier-badge svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tier-name { margin: 0; font-size: var(--t-head); font-weight: 700; letter-spacing: -.01em; }
.tier-count {
  min-width: 24px; height: 22px;
  padding: 0 var(--s2);
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: var(--t-cap);
  font-weight: 700;
  color: var(--t);
  background: rgba(var(--t-rgb), .12);
}
.tier-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(var(--t-rgb), .45), transparent); }
.pl-empty { padding: var(--s6) var(--s4); text-align: center; font-size: var(--t-sm); color: var(--ink-2); }

/* =========================================================
   PANNELLO VENDITORI (anteprime) — sale dal basso
   ========================================================= */
.app.is-dimmed .stage { filter: saturate(.85) brightness(.97); transition: filter .4s ease; }
.stage { transition: filter .4s ease, opacity .35s ease, transform .45s var(--ease); }

.scrim {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(31,27,20,.18);
  opacity: 0;
  transition: opacity .35s ease;
}
.scrim.is-open { opacity: 1; }

.sheet {
  --sheet-h: 64%;
  position: absolute;
  z-index: 51;
  left: var(--s2); right: var(--s2);
  bottom: calc(var(--safe-b) + var(--s2));
  height: var(--sheet-h);
  display: flex;
  flex-direction: column;
  --glass-tint: rgba(255, 252, 245, .84);
  transform: translateY(calc(100% + 40px));
  transition: transform .55s var(--spring), height .5s var(--spring), left .35s var(--ease), right .35s var(--ease), bottom .35s var(--ease), border-radius .35s var(--ease);
}
.sheet.is-open { transform: translateY(var(--drag, 0px)); }
/* Full (swipe su): stessa card flottante, solo più alta — niente buco vuoto laterale */
.sheet.is-full {
  left: var(--s2);
  right: var(--s2);
  bottom: calc(var(--safe-b) + var(--s2));
  --sheet-h: calc(100% - var(--safe-t) - var(--s2) - var(--safe-b) - var(--s2));
  border-radius: var(--r-panel);
}
.sheet.is-dragging { transition: height .5s var(--spring); }
.app.has-vip .sheet.is-open { transform: translateY(12px) scale(.96); opacity: 0; transition: transform .5s var(--ease), opacity .35s ease; }

.sheet-grab { padding: var(--s2) 0 var(--s1); display: grid; place-items: center; touch-action: none; cursor: grab; flex: none; }

/* due viste affiancate: elenco e scheda; scorrono di lato come le pagine di iOS */
.sheet-views { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 0 0 var(--r-panel) var(--r-panel); }
/* in scheda compatta lo scroll non si gonfia: il dock resta attaccato al contenuto */
.sheet.is-detail:not(.is-full) .sd-scroll { flex: 0 1 auto; }
.sv {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transition: transform .45s cubic-bezier(.32, .72, 0, 1), opacity .3s ease;
}
.sv-detail { transform: translateX(100%); }
.sheet.is-detail .sv-list { transform: translateX(-30%); opacity: 0; pointer-events: none; }
.sheet.is-detail .sv-detail { transform: none; }
.sheet:not(.is-detail) .sv-detail { pointer-events: none; }
.sheet.is-instant .sv { transition: none; }

.sd-head { gap: var(--s2); }
.sd-logo {
  flex: none;
  width: 64px; height: 64px;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 4px 10px -4px rgba(92,68,28,.4);
}
.sheet.is-detail .sd-logo { display: none; }
.sd-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-logo .mono { font-size: var(--t-body); }
.sd-name { display: flex; align-items: center; gap: var(--s1); }
.sd-name .vcard-name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-meta { display: flex; align-items: center; gap: var(--s1); }
.sd-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-scroll { padding: 0 var(--s4) var(--s4); }
.sd-points {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0 var(--s4) var(--s2); padding: 4px; border-radius: 999px; background: rgba(255,252,245,.72);
}
.sd-points[hidden] { display: none; }
.sd-point-arrow {
  width: 36px; height: 36px; border: 0; border-radius: 999px;
  display: grid; place-items: center; background: transparent; color: var(--ink);
}
.sd-point-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#sd-point-label { min-width: 8rem; text-align: center; font-size: var(--t-sm); font-weight: 700; }
.dos-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 12px; }
.dos-badges span {
  min-height: 26px; display: inline-flex; align-items: center; padding: 0 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  background: rgba(255,252,245,.8); box-shadow: inset 0 0 0 1px rgba(80,60,20,.12);
}
.dos-rank { color: var(--c, #8a7344); }
.sheet.is-detail .sheet-titles { text-align: center; }
.sheet.is-detail .sd-name,
.sheet.is-detail .sd-meta { justify-content: center; }
.dos-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
  align-items: center;
  margin-top: 10px;
  padding: 10px 0 6px;
  border-top: 1px solid rgba(80,60,20,.12);
  border-bottom: 1px solid rgba(80,60,20,.12);
}
.dos-side { min-width: 0; padding: 0 8px; }
.dos-side:first-child { border-right: 1px dashed rgba(80,60,20,.18); }
.dos-side:last-child { border-left: 1px dashed rgba(80,60,20,.18); }
.dos-label { margin: 0 0 6px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.dos-regions { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.3; }
.dos-place { margin: 4px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.3; }
.dos-ship { color: #b8873a; font-weight: 650; }
.dos-map { width: 72px; margin-top: 8px; }
.dos-portrait {
  width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; overflow: hidden; background: #111;
  box-shadow: 0 0 0 4px #fffaf2, 0 0 0 5px rgba(184,135,58,.55);
}
.dos-portrait img, .dos-portrait .mono { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.dos-service { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 8px; min-width: 0; }
.dos-svc-ico { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--c); }
.dos-svc-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.dos-service b { display: block; font-size: 12px; line-height: 1.2; color: var(--c); }
.dos-service em { display: block; margin-top: 1px; font-style: normal; color: var(--ink-2); font-size: 11px; line-height: 1.25; }
.dos-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
}
.dos-trust p { margin: 0; font-size: 12px; line-height: 1.35; }
.dos-trust > div + div { padding-left: 10px; border-left: 1px dashed rgba(80,60,20,.18); }
.dos-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 12px 0 0; padding: 0; }
.dos-tags li { padding: 6px 10px; border-radius: 999px; background: rgba(184,135,58,.12); font-size: 12px; font-weight: 650; }
.sd-dock {
  display: flex; align-items: center; gap: 6px;
  padding: 8px var(--s3) calc(8px + var(--safe-b));
  position: relative;
  z-index: 2;
}
.sd-dock[hidden] { display: none; }
.sd-cdir {
  flex: none;
  width: 44px; height: 44px;
  border: 0; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255,252,245,.85);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(80,60,20,.1);
  -webkit-tap-highlight-color: transparent;
}
.sd-cdir svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.sd-ccount {
  flex: none;
  min-width: 2.25rem;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  pointer-events: none;
}
.dos-contact {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 6px 14px 6px 6px; border-radius: 999px; text-decoration: none; color: inherit;
  background: linear-gradient(135deg, #fff1c6, #e2b657 55%, #b8873a);
}
.dos-contact em { display: block; font-style: normal; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.dos-contact strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 11rem; }

/* sezioni della scheda: stesse nel pannello e nella pagina VIP */
.vsections { display: flex; flex-direction: column; }
.vsections > :first-child { margin-top: 0; }
.sd-sections .vp-section { margin-top: var(--s4); }
.sd-sections .vp-desc { margin-top: var(--s3); }
.handle { width: 40px; height: 5px; border-radius: 999px; background: rgba(31,27,20,.18); }

.sheet-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s1) var(--s4) var(--s3);
  touch-action: none;
}
.sheet-shape {
  flex: none;
  width: 48px; height: 48px;
  border-radius: var(--r-inner);
  display: grid;
  place-items: center;
  background: radial-gradient(90% 90% at 50% 35%, #fffaf0, #ece2cf);
  box-shadow: inset 0 0 0 1px rgba(92,68,28,.08);
  padding: 6px;
}
.sheet-shape svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 3px rgba(92,68,28,.25)); }
.sheet-shape path { stroke: #fff; }
.sheet-shape .is-on  { fill: url(#g-on); }
.sheet-shape .is-off { fill: url(#g-off); }
.sheet-titles { flex: 1; min-width: 0; }
.sheet-title { font-size: var(--t-head); line-height: 22px; font-weight: 600; letter-spacing: -.01em; }
.sheet-sub { font-size: var(--t-sm); line-height: 18px; color: var(--ink-2); }
.icon-close {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(31,27,20,.06);
}
.icon-close svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }

/* pillole delle categorie con la lente che scivola */
.chips {
  position: relative;
  display: flex;
  gap: var(--s1);
  padding: 0 var(--s4) var(--s3);
  overflow-x: auto;
  scrollbar-width: none;
  flex: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  position: relative;
  z-index: 1;
  flex: none;
  height: 36px;
  padding: 0 var(--s3);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  transition: color .25s ease;
}
.chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chip small { font-size: var(--t-cap); color: var(--ink-2); font-weight: 600; }
.chip[aria-selected="true"] { color: var(--ink); }
.chip-lens { top: 0; left: 0; height: 36px; width: 60px; }

.sheet-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--s3) var(--s4);
  scrollbar-width: none;
}
.sheet-scroll::-webkit-scrollbar { display: none; }

/* card venditore (anteprima) */
.vlist { display: flex; flex-direction: column; gap: var(--s2); }
.vlist li { animation: rise .5s var(--spring) both; animation-delay: calc(var(--i) * 50ms + 120ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.vcard {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3) var(--s2) var(--s2);
  border-radius: var(--r-inner);
  text-align: left;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px rgba(92,68,28,.07), 0 4px 12px -6px rgba(92,68,28,.25);
  transition: transform .25s var(--spring), box-shadow .25s ease;
}
.vcard:active { transform: scale(.97); }
/* bordo e leggero riflesso nel colore del livello (VIP, MVP, Leggende, Premium) */
.vcard[style*="--t-rgb"] {
  background: linear-gradient(120deg, rgba(var(--t-rgb), .10), rgba(255,255,255,.78) 42%);
  box-shadow:
    inset 0 0 0 1.5px rgba(var(--t-rgb), .55),
    inset 3px 0 0 0 rgba(var(--t-rgb), .9),
    0 6px 16px -8px rgba(var(--t-rgb), .55);
}
.vcard-logo {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
}
.vcard-logo img, .vip-medal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mono {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(145deg, hsl(var(--h) 62% 62%), hsl(var(--h) 52% 40%));
  text-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.vcard-logo .mono { font-size: var(--t-head); }
.vcard-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vcard-name { display: flex; align-items: center; gap: var(--s1); font-size: var(--t-body); font-weight: 600; line-height: 20px; }
.vcard-name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verified { flex: none; width: 16px; height: 16px; }
.verified path:first-child { fill: #2f80ed; }
.verified .tick { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.vcard-meta { display: flex; align-items: center; gap: var(--s1); font-size: var(--t-sm); line-height: 18px; color: var(--ink-2); min-width: 0; }
.vcard-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-ico { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vcard-services { flex: none; display: flex; gap: var(--s1); }
.svc {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.svc svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vcard-chev { flex: none; width: 18px; height: 18px; fill: none; stroke: rgba(31,27,20,.35); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sheet-empty { padding: var(--s6) var(--s4); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.sheet-empty-title { font-size: var(--t-head); font-weight: 600; }
.sheet-empty-sub { font-size: var(--t-sm); color: var(--ink-2); max-width: 30ch; }
.sheet-empty .btn-gold { min-width: 160px; }

/* =========================================================
   SEZIONI DELLA SCHEDA VENDITORE (pannello e pagina VIP)
   ========================================================= */
.vp-contacts {
  display: grid;
  grid-template-columns: repeat(min(var(--n), 2), 1fr);
  gap: var(--s2);
}
.contact {
  height: var(--ctl-lg);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s4) 0 6px;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink);
}
.contact-ico {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 4px 10px -4px var(--c);
}
.contact-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-ico svg .solid { fill: currentColor; stroke: none; }

.vp-desc { margin-top: var(--s4); font-size: var(--t-body); line-height: 22px; color: var(--ink); max-width: 60ch; }

.vp-section { margin-top: var(--s6); }
.vp-h { font-size: var(--t-cap); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: var(--s2); }
.vp-services { display: flex; flex-wrap: wrap; gap: var(--s2); }
.service {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 var(--s3) 0 var(--s2);
  border-radius: 999px;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
}
.service svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vp-none { font-size: var(--t-sm); color: var(--ink-2); }
.vp-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
.vp-pill {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--c, var(--ink));
  background: color-mix(in srgb, var(--c, #c4a574) 14%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #c4a574) 28%, transparent);
}
.vp-svc-list { display: flex; flex-direction: column; gap: 8px; }
.vp-svc {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--c) 8%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent);
}
.vp-svc b { display: block; font-size: var(--t-sm); color: var(--c); }
.vp-svc small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 13px; line-height: 18px; }
.vp-svc-ico {
  width: 36px; height: 36px; flex: none; border-radius: 12px;
  display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, white);
}
.vp-svc-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vip-page .vp-pill { background: var(--v-glass); color: var(--v-ink); }
.vip-page .vp-svc { background: var(--v-glass); }
.vip-page .vp-svc small, .vip-page .vp-desc { color: var(--v-ink2); }

.vp-zones { display: flex; align-items: center; gap: var(--s4); padding: var(--s3) var(--s4); }
.vp-minimap { flex: none; width: 96px; }
.vp-minimap svg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 4px 6px rgba(92,68,28,.2)); }
.vp-minimap path { stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; }
.vp-minimap .is-on { fill: url(#g-on); }
.vp-minimap .is-off-mini { fill: #e4dccd; }
.vp-zone-list { display: flex; flex-direction: column; gap: var(--s2); font-size: var(--t-body); font-weight: 500; }
.vp-zone-list li { display: flex; align-items: center; gap: var(--s2); }

.vp-gallery { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--s4) * -1); padding: 0 var(--s4); }
.vp-gallery img { flex: none; width: 70%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-inner); }


/* =========================================================
   AVATAR, VELO, LEGENDA DEI SERVIZI
   ========================================================= */
.avatar {
  background-color: var(--glass-tint);
  background-size: cover;
  background-position: center;
  font-size: var(--t-body);
  font-weight: 700;
  color: var(--gold-text);
}
.avatar.has-photo { box-shadow: inset 0 0 0 2px rgba(255,255,255,.9), 0 6px 16px -8px rgba(92,68,28,.5); }
.avatar.has-photo::before, .avatar.has-photo::after { display: none; }

/* il marmo si calma dietro la Lista */
.veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(244,238,227,.55), rgba(244,238,227,.82) 30%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
.app.on-list .veil, .app.on-news .veil { opacity: 1; }

.svc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s3);
  padding: 0 var(--s1) var(--s3);
  font-size: var(--t-cap);
  font-weight: 500;
  color: var(--ink-2);
}
.svc-leg { display: inline-flex; align-items: center; gap: 6px; }
.svc-leg .svc { width: 18px; height: 18px; }
.svc-leg .svc svg { width: 11px; height: 11px; }
.svc-legend-foot { justify-content: center; padding: var(--s4) 0 0; }

/* =========================================================
   PANNELLO INFORMATIVO (menu, profilo, livelli, info)
   ========================================================= */
#info-scrim { z-index: 52; }
.info-sheet { z-index: 53; }
.info-body { padding: 0 var(--s4) var(--s4); }
.info-view.is-enter { animation: viewIn .4s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateX(18px); } }

.menu-list {
  border-radius: var(--r-inner);
  background: rgba(255,255,255,.7);
  box-shadow: inset 0 0 0 1px rgba(92,68,28,.07);
  overflow: hidden;
}
.menu-list li + li { box-shadow: inset 0 1px 0 var(--hair); }
.menu-item {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s3);
  text-align: left;
  transition: background-color .2s ease;
}
.menu-item:active { background: rgba(201,150,62,.10); }
@media (hover: hover) { .menu-item:hover { background: rgba(201,150,62,.06); } }
.mi-ico {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.mi-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mi-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mi-label { font-size: var(--t-body); font-weight: 600; }
.mi-sub { font-size: var(--t-sm); color: var(--ink-2); }
.mi-chev { flex: none; width: 18px; height: 18px; fill: none; stroke: rgba(31,27,20,.35); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.profile-card {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3);
  margin-bottom: var(--s3);
  border-radius: var(--r-inner);
  background: linear-gradient(135deg, rgba(242,211,144,.35), rgba(255,255,255,.7));
  box-shadow: inset 0 0 0 1px rgba(201,150,62,.25);
}
.profile-avatar {
  flex: none;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--t-title);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #e3b35a, #a8772a) center / cover no-repeat;
  box-shadow: 0 0 0 3px #fff, 0 6px 14px -6px rgba(92,68,28,.5);
}
.profile-text { flex: 1; min-width: 0; }
.profile-name { font-size: var(--t-head); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-sub { font-size: var(--t-sm); color: var(--ink-2); }
.profile-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  height: 26px;
  padding: 0 var(--s2);
  border-radius: 999px;
  font-size: var(--t-cap);
  font-weight: 600;
  color: #fff;
  background: #2aabee;
}
.profile-badge svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

.tier-rows { display: flex; flex-direction: column; gap: var(--s2); }
.tier-row {
  display: flex;
  gap: var(--s3);
  padding: var(--s3);
  border-radius: var(--r-inner);
  background: linear-gradient(120deg, rgba(var(--t-rgb), .10), rgba(255,255,255,.78) 45%);
  box-shadow: inset 0 0 0 1.5px rgba(var(--t-rgb), .45), inset 3px 0 0 0 rgba(var(--t-rgb), .9);
}
.tier-row .tier-badge { flex: none; }
.tier-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tier-row-head { display: flex; align-items: center; gap: var(--s2); }
.tier-row-name { font-size: var(--t-body); font-weight: 700; }
.tier-row-desc { font-size: var(--t-sm); line-height: 18px; color: var(--ink-2); }
.info-cta { margin-top: var(--s4); width: 100%; height: var(--ctl-lg); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); counter-reset: none; }
.steps li { display: flex; gap: var(--s3); font-size: var(--t-sm); line-height: 18px; color: var(--ink-2); }
.steps b { display: block; font-size: var(--t-body); color: var(--ink); margin-bottom: 2px; }
.step-n {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--gold-ink);
  background: linear-gradient(180deg, #f6dc9c, #dcab52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.info-text { font-size: var(--t-body); line-height: 22px; }
.perks { margin-top: var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.perks li { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); font-weight: 500; }
.perks svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--gold-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kv { border-radius: var(--r-inner); background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px rgba(92,68,28,.07); }
.kv li { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s3); font-size: var(--t-sm); }
.kv li + li { box-shadow: inset 0 1px 0 var(--hair); }
.kv span { color: var(--ink-2); }
.info-note { margin-top: var(--s3); font-size: var(--t-cap); color: var(--ink-2); }

/* =========================================================
   VIP — WALLET (finestrella con le tessere)
   ========================================================= */
.vw-scrim {
  position: absolute;
  inset: 0;
  z-index: 54;
  background: radial-gradient(120% 80% at 50% 100%, rgba(20,15,6,.55), rgba(20,15,6,.35));
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .4s ease;
}
.vw-scrim.is-open { opacity: 1; }

.vip-wallet {
  position: absolute;
  z-index: 55;
  left: var(--s3); right: var(--s3);
  bottom: calc(var(--safe-b) + var(--s3) + var(--tabbar-h) + var(--s4));
  padding: var(--s4) 0 var(--s4);
  border-radius: var(--r-panel);
  color: #f7f1e3;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(226,182,90,.18), transparent 70%),
    linear-gradient(165deg, #1d1912 0%, #0d0b08 100%);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,236,190,.12) inset;
  overflow: hidden;
  transform-origin: 50% 115%;            /* nasce dal pulsante VIP */
  transform: translateY(40px) scale(.55);
  opacity: 0;
  transition: transform .6s var(--spring), opacity .3s ease;
}
.vip-wallet.is-open { transform: none; opacity: 1; }
.vip-wallet::before {                    /* bordo d'oro */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255,226,160,.8), rgba(255,226,160,.08) 35%, rgba(255,226,160,.05) 65%, rgba(255,226,160,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
/* anello di luce che esplode all'apertura */
.vw-burst {
  position: absolute;
  left: 50%; bottom: -40px;
  width: 80px; height: 80px;
  margin-left: -40px;
  border-radius: 50%;
  border: 2px solid rgba(255,226,160,.8);
  opacity: 0;
  pointer-events: none;
}
.vip-wallet.is-open .vw-burst { animation: burst 1s .05s var(--ease) both; }
@keyframes burst {
  0%   { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(9); }
}

.vw-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 var(--s4); }
.vw-kicker { font-family: var(--f-logo); font-size: 22px; line-height: 22px; color: #e8c477; }
.vw-title { margin: 2px 0 0; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.01em; }
.vw-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.1);
}
.vw-close svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }

/* palco a ventaglio: la tessera scelta davanti, le altre ai lati */
.vw-stage {
  position: relative;
  height: 220px;
  margin-top: var(--s2);
  perspective: 900px;
  touch-action: pan-y;
}
.vw-card {
  --rel: 0; --abs: 0; --tx: 0; --ty: 0;
  position: absolute;
  left: 50%; top: 50%;
  width: 270px; height: 170px;
  margin: -85px 0 0 -135px;
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
  color: #1f1b14;
  z-index: calc(10 - var(--abs));
  opacity: calc(1 - var(--abs) * .28);
  transform:
    translateX(calc(var(--rel) * 58%))
    translateZ(calc(var(--abs) * -110px))
    rotateY(calc(var(--rel) * -26deg))
    rotateX(calc(var(--ty) * -9deg * (1 - min(var(--abs), 1))))
    rotateY(calc(var(--tx) * 12deg * (1 - min(var(--abs), 1))));
  box-shadow: 0 22px 40px -16px rgba(0,0,0,.75), inset 0 0 0 1px rgba(255,255,255,.18);
  transition: transform .65s var(--spring), opacity .4s ease;
  will-change: transform;
}
.vw-card.is-dark { color: #f7f1e3; }
.vw-card.is-active { transition: transform .12s linear, opacity .4s ease; }
.vip-wallet.is-open .vw-card { animation: cardIn .9s var(--spring) backwards; animation-delay: calc(var(--n) * 90ms + 120ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(160px) rotate(-10deg) scale(.7); } }

.vw-card-bg { position: absolute; inset: 0; background: var(--bg) center / cover no-repeat; }
/* pellicola olografica: i riflessi seguono l'inclinazione */
.vw-holo {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 25%, rgba(255,236,180,.55) 38%, rgba(170,220,255,.38) 45%,
    rgba(255,180,225,.38) 52%, rgba(255,236,180,.5) 59%, transparent 72%);
  background-size: 260% 260%;
  background-position: calc(50% + var(--tx) * 45%) calc(50% + var(--ty) * 45%);
  mix-blend-mode: soft-light;
  opacity: .9;
}
.vw-card.is-dark .vw-holo { mix-blend-mode: screen; opacity: .35; }
.vw-shine {
  position: absolute;
  inset: -40%;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.45) 50%, transparent 58%);
  transform: translateX(calc(var(--tx) * 30%)) translateY(calc(var(--ty) * 20%));
  mix-blend-mode: overlay;
}
.vw-card-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; }
.vw-logo { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px rgba(255,255,255,.7), 0 6px 12px -6px rgba(0,0,0,.5); background: #fff; }
.vw-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vw-logo .mono { font-size: var(--t-body); }
.vw-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: var(--t-cap);
  font-weight: 800;
  letter-spacing: .1em;
  color: #2a1d05;
  background: linear-gradient(135deg, #fff1c6, var(--accent) 60%, #a77a2c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 4px 10px -4px rgba(0,0,0,.5);
}
.vw-chip svg { width: 13px; height: 13px; fill: currentColor; }
.vw-card-name { position: absolute; left: 14px; right: 14px; bottom: 52px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 1px 8px rgba(0,0,0,.18); }
.vw-card-meta { position: absolute; left: 14px; bottom: 36px; font-size: var(--t-sm); opacity: .8; }
.vw-card-foot {
  position: absolute;
  left: 14px; right: 14px; bottom: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .7;
}

.vw-dots { display: flex; justify-content: center; gap: 6px; margin-top: var(--s2); }
.vw-dots span { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.25); transition: width .35s var(--spring), background-color .3s ease; }
.vw-dots span.is-on { width: 20px; background: #e8c477; }
.vw-hint { margin-top: var(--s2); text-align: center; font-size: var(--t-cap); color: rgba(247,241,227,.55); }

/* la tessera che si espande fino a diventare la pagina */
.vip-ghost {
  position: absolute;
  z-index: 70;
  border-radius: 18px;
  background: var(--bg) center / cover no-repeat;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  transition: left .52s cubic-bezier(.32,.72,0,1), top .52s cubic-bezier(.32,.72,0,1), width .52s cubic-bezier(.32,.72,0,1), height .52s cubic-bezier(.32,.72,0,1), border-radius .52s ease, opacity .45s ease;
}
.vip-ghost.is-full { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
.vip-ghost.is-out { opacity: 0; }

/* =========================================================
   VIP — PAGINA (colori dal marmo del venditore)
   ========================================================= */
.vip-page {
  --v-ink: #1f1b14;
  --v-ink2: rgba(31,27,20,.66);
  --v-glass: rgba(255,252,245,.55);
  --v-line: rgba(31,27,20,.1);
  position: absolute;
  inset: 0;
  z-index: 60;
  color: var(--v-ink);
  background: #f4eee3;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .55s var(--spring);
}
.vip-page.is-dark {
  --v-ink: #f7f2e8;
  --v-ink2: rgba(247,242,232,.7);
  --v-glass: rgba(20,18,15,.42);
  --v-line: rgba(255,255,255,.12);
  background: #0c0b09;
}
.vip-page.is-open { opacity: 1; pointer-events: auto; }
.vip-page.enter-rise { transform: translateY(40px); }
.vip-page.enter-rise.is-open { transform: none; }

.vip-bg, .vip-bg-img, .vip-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vip-bg-img { background: center / cover no-repeat; }
.vip-bg-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.45)); }

.vip-scroll {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: calc(var(--safe-t) + 64px) var(--s4) calc(var(--safe-b) + var(--s6) + var(--s6));
}
.vip-scroll::-webkit-scrollbar { display: none; }

/* --- copertina: medaglione, nome, motto --- */
.vip-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: var(--s3);
  transform: translateY(calc(var(--scroll, 0) * .35px));
  opacity: calc(1 - var(--scroll, 0) / 380);
}
.vip-medal {
  width: 112px; height: 112px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 0 3px var(--accent),
    0 0 0 9px rgba(var(--accent-rgb), .22),
    0 0 50px 6px rgba(var(--accent-rgb), .45),
    0 24px 40px -18px rgba(0,0,0,.6);
  transform: translate3d(calc(var(--tx, 0) * 10px), calc(var(--ty, 0) * 10px), 0) rotateY(calc(var(--tx, 0) * 14deg));
  transition: transform .2s linear;
}
.vip-medal .mono { font-size: 40px; }
.vip-page.is-open .vip-medal { animation: medalIn 1s .05s var(--spring) backwards; }
@keyframes medalIn { from { opacity: 0; transform: scale(.3) rotate(-30deg); } }

.vip-crest {
  margin-top: var(--s4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 var(--s3);
  border-radius: 999px;
  font-size: var(--t-cap);
  font-weight: 800;
  letter-spacing: .16em;
  color: #2a1d05;
  background: linear-gradient(135deg, #fff1c6, var(--accent) 55%, #a77a2c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 6px 16px -6px rgba(var(--accent-rgb), .8);
  position: relative;
  overflow: hidden;
}
.vip-crest svg { width: 14px; height: 14px; fill: currentColor; }
.vip-crest::after {                        /* lampo che attraversa lo stemma */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.85) 50%, transparent 65%);
  transform: translateX(-120%);
}
.vip-page.is-open .vip-crest { animation: rise .6s .35s var(--spring) backwards; }
.vip-page.is-open .vip-crest::after { animation: glint 1.2s 1.1s var(--ease) both; }
@keyframes glint { to { transform: translateX(120%); } }

.vip-name {
  margin: var(--s3) 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  line-height: 38px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.vip-name > span { display: inline-block; }
.vip-page.is-open .vip-name > span { animation: letterIn .7s var(--ease) backwards; animation-delay: calc(.4s + var(--i) * 32ms); }
@keyframes letterIn { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
.vip-name .verified { width: 24px; height: 24px; margin-left: 6px; }
.vip-page.is-open .vip-name .verified { animation: rise .6s 1s var(--spring) backwards; }
.vip-tagline { margin-top: var(--s2); font-family: var(--f-logo); font-size: 28px; line-height: 32px; color: var(--accent); text-shadow: 0 1px 14px rgba(255,250,240,.9); }
.vip-page.is-dark .vip-tagline { text-shadow: 0 2px 14px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.6); }
.vip-page.is-dark .vip-name { text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.vip-page.is-open .vip-tagline { animation: rise .8s .9s var(--ease) backwards; }
.vip-meta { margin-top: var(--s2); display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--v-ink2); }
.vip-points {
  margin-top: var(--s3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px;
  border-radius: 999px;
  background: var(--v-glass);
}
.vip-point-arrow {
  width: 36px; height: 36px;
  border: 0; border-radius: 999px;
  display: grid; place-items: center;
  color: var(--v-ink);
  background: transparent;
}
.vip-point-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#vip-point-label { min-width: 8rem; font-size: var(--t-sm); font-weight: 600; }
.vip-page.is-open .vip-meta { animation: rise .8s 1s var(--ease) backwards; }

/* --- sezioni che compaiono scorrendo --- */
.vip-stats, .vip-contacts, .vip-sec { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .8s var(--spring); }
.vip-stats.is-in, .vip-contacts.is-in, .vip-sec.is-in { opacity: 1; transform: none; }

.vip-stats {
  margin-top: var(--s6);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
}
.vip-stat {
  padding: var(--s3) var(--s2);
  border-radius: var(--r-inner);
  text-align: center;
  background: var(--v-glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
          backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 0 0 1px var(--v-line), inset 0 1px 0 rgba(255,255,255,.25);
}
.vip-stat strong { display: block; font-size: 22px; line-height: 28px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.vip-stat span { font-size: var(--t-cap); color: var(--v-ink2); }

.vip-contacts { margin-top: var(--s4); display: flex; flex-wrap: wrap; gap: var(--s2); }
.vip-contact {
  flex: 1 1 calc(50% - var(--s2));
  height: var(--ctl-lg);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s4) 0 6px;
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--v-ink);
  background: var(--v-glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
          backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 0 0 1px var(--v-line);
}
/* contatto principale: largo, dorato, con un riflesso che lo attraversa */
.vip-contact.is-main {
  flex-basis: 100%;
  height: 54px;
  justify-content: center;
  color: #2a1d05;
  background: linear-gradient(135deg, #fff1c6, var(--accent) 50%, #b8873a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 10px 26px -10px rgba(var(--accent-rgb), .9);
  position: relative;
  overflow: hidden;
}
.vip-contact.is-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.7) 50%, transparent 65%);
  animation: sweep 3.2s 1.5s ease-in-out infinite;
  transform: translateX(-120%);
}
@keyframes sweep { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
.vip-contact.is-main .contact-ico { position: absolute; left: 6px; }

.vip-sec { margin-top: var(--s6); }
.vip-home { display: flex; flex-direction: column; gap: var(--s6); }
.vip-home[hidden] { display: none; }
.vip-chapter { margin: 0; }
.vip-art { margin: 0; border-radius: 22px; overflow: hidden; background: rgba(255,255,255,.28); box-shadow: inset 0 0 0 1px var(--v-line); }
.vip-art img { width: 100%; max-height: 220px; object-fit: contain; display: block; margin: 0 auto; background: rgba(255,255,255,.55); }
.vip-facts-icons li { display: flex; align-items: flex-start; gap: 10px; }
.vip-facts-icons img { width: 36px; height: 36px; flex: none; object-fit: contain; }
.vip-facts-icons b { display: block; }
.vip-facts b { display: block; margin-bottom: 2px; }
.vip-steps { margin: 0 0 var(--s3); padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.vip-steps li { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--v-glass); font-size: var(--t-sm); }
.vip-steps b { display: block; margin-bottom: 2px; }
.vip-links { display: flex; flex-wrap: wrap; gap: 8px; }
.vip-inline {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; background: var(--v-glass); color: var(--v-ink);
  font-size: var(--t-sm); font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--v-line);
}
.vip-point-list { display: flex; flex-direction: column; gap: 8px; }
.vip-point-row {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 8px 12px; border: 0; border-radius: 16px; color: var(--v-ink);
  background: var(--v-glass); box-shadow: inset 0 0 0 1px var(--v-line);
}
.vip-point-row b { display: block; font-size: var(--t-sm); }
.vip-point-row small { color: var(--v-ink2); }
.vip-point-row-logo {
  width: 40px; height: 40px; border-radius: 12px; overflow: hidden; flex: none;
  display: grid; place-items: center; background: #111;
}
.vip-point-row-logo img { width: 100%; height: 100%; object-fit: cover; }
.vip-h { margin: 0 0 var(--s3); font-size: var(--t-cap); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

.vip-showcase { display: flex; gap: var(--s3); overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--s4) * -1); padding: 4px var(--s4) var(--s2); scroll-snap-type: x mandatory; scroll-padding-inline: var(--s4); }
.vip-showcase::-webkit-scrollbar { display: none; }
.vip-item { flex: none; width: 148px; margin: 0; scroll-snap-align: start; }
.vip-sec.is-in .vip-item { animation: rise .7s var(--spring) backwards; animation-delay: calc(var(--i) * 80ms + .1s); }
.vip-item-img {
  height: 148px;
  border-radius: var(--r-inner);
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(90% 90% at 30% 20%, rgba(255,255,255,.35), transparent 60%),
    linear-gradient(150deg, rgba(var(--accent-rgb), .55), rgba(var(--accent-rgb), .2));
  box-shadow: inset 0 0 0 1px var(--v-line), 0 12px 24px -14px rgba(0,0,0,.5);
}
.vip-item-img img { width: 100%; height: 100%; object-fit: cover; }
.vip-item-ico { width: 56px; height: 56px; fill: none; stroke: rgba(255,255,255,.85); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.vip-item figcaption { margin-top: var(--s2); display: flex; flex-direction: column; font-size: var(--t-sm); }
.vip-item figcaption span { font-weight: 600; }
.vip-item figcaption b { color: var(--accent); font-weight: 700; }

.vip-story { font-size: var(--t-body); line-height: 24px; color: var(--v-ink); max-width: 60ch; }
.vip-story::first-letter { float: left; font-family: var(--f-logo); font-size: 56px; line-height: 44px; padding: 4px 8px 0 0; color: var(--accent); }
.vip-lead { margin: 0 0 var(--s3); font-size: var(--t-body); line-height: 22px; color: var(--v-ink); }
.vip-facts { list-style: none; margin: 0 0 var(--s4); padding: 0; display: flex; flex-direction: column; gap: 8px; }
.vip-facts li { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--v-glass, rgba(255,252,245,.55)); font-size: var(--t-sm); }

/* sezioni condivise (servizi, zone) adattate al tema della pagina */
.vip-more .vp-section { margin-top: 0; }
.vip-more .vp-section + .vp-section { margin-top: var(--s6); }
.vip-more .vp-h { color: var(--accent); letter-spacing: .14em; font-weight: 700; }
.vip-more .vp-zones { --glass-tint: var(--v-glass); }
.vip-page.is-dark .vp-zone-list { color: var(--v-ink); }
.vip-page.is-dark .vp-minimap .is-off-mini { fill: rgba(255,255,255,.18); }
.vip-page.is-dark .service { background: rgba(255,255,255,.08); color: color-mix(in srgb, var(--c) 55%, white); }
.vip-page.is-dark .vp-zones {
  background: var(--v-glass);
  box-shadow: inset 0 0 0 1px var(--v-line);
}
.vip-page.is-dark .vp-zones::before, .vip-page.is-dark .vp-zones::after { display: none; }

/* --- barra in alto --- */
.vip-bar {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: calc(var(--safe-t) + var(--s2)) var(--s4) var(--s2);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.vip-back {
  width: var(--ctl); height: var(--ctl);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--v-ink);
  background: var(--v-glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
          backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 0 0 1px var(--v-line);
}
.vip-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vip-bar-title { font-size: var(--t-head); font-weight: 700; opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s var(--ease); }
.vip-page.is-scrolled .vip-bar {
  background: var(--v-glass);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
          backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 1px 0 var(--v-line);
}
.vip-page.is-scrolled .vip-bar-title { opacity: 1; transform: none; }

/* =========================================================
   NEWS — anteprime a busta con sigillo di ceralacca
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tab-dot {
  position: absolute;
  top: 8px; left: calc(50% + 6px);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #c4362b;
  box-shadow: 0 0 0 2px rgba(255,252,245,.95);
  animation: live 2.2s ease-out infinite;
}

/* filtri per tipo (scorrevoli) */
.pn-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  height: var(--ctl);
  display: flex;
  gap: 2px;
  padding: 4px;
  margin: var(--s4) 0 var(--s2);
  overflow-x: auto;
  scrollbar-width: none;
  --glass-tint: rgba(255, 252, 245, .80);
}
.pn-tabs::-webkit-scrollbar { display: none; }
.pn-tab {
  position: relative;
  z-index: 1;
  flex: none;
  height: 36px;
  padding: 0 var(--s3);
  border-radius: 999px;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-2);
  transition: color .25s ease;
}
.pn-tab.is-active { color: var(--ink); }
.pn-lens { top: 4px; left: 0; height: 36px; width: 70px; }

.pn-group { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s4); }
.pn-day { margin: 0; padding: 0 var(--s1); font-size: var(--t-cap); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }

/* la busta (anteprima) */
.letter-card {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s4) 84px var(--s4) var(--s4);
  border-radius: var(--r-inner);
  text-align: left;
  overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .47 0 0 0 0 .32 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #fffaf0, #f4ead6);
  box-shadow: inset 0 0 0 1px rgba(150,110,40,.18), 0 10px 22px -14px rgba(92,68,28,.55);
  transition: transform .3s var(--spring), opacity .3s ease;
  animation: rise .55s var(--spring) backwards;
  animation-delay: calc(var(--i, 0) * 45ms + 80ms);
}
.letter-card:active { transform: scale(.98); }
.letter-card.is-lifted { opacity: 0; }
/* il lembo della busta: due linee che scendono dagli angoli */
.lc-flap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom right, transparent calc(50% - .6px), rgba(150,110,40,.16) 50%, transparent calc(50% + .6px)) left top / 50% 58% no-repeat,
    linear-gradient(to bottom left,  transparent calc(50% - .6px), rgba(150,110,40,.16) 50%, transparent calc(50% + .6px)) right top / 50% 58% no-repeat;
}
.lc-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.lc-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 var(--s2);
  border-radius: 999px;
  font-size: var(--t-cap);
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 11%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent);
}
.lc-type svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lc-when { font-size: var(--t-cap); color: var(--ink-2); white-space: nowrap; }
.lc-title { position: relative; margin-top: var(--s1); font-size: var(--t-head); line-height: 22px; font-weight: 700; letter-spacing: -.01em; }
.lc-excerpt { position: relative; font-size: var(--t-sm); line-height: 18px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-link { position: relative; margin-top: var(--s2); display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.lc-logo { width: 26px; height: 26px; border-radius: 8px; overflow: hidden; }
.lc-logo .mono { font-size: var(--t-cap); }
.lc-shape { width: 26px; height: 26px; display: grid; place-items: center; }
.lc-shape svg { width: 100%; height: 100%; overflow: visible; }
.lc-shape path { stroke: #fff; stroke-width: 1.5; }
.lc-shape .is-on { fill: url(#g-on); }
.lc-shape .is-off { fill: url(#g-off); }
.letter-card.is-read .lc-title { color: rgba(31,27,20,.78); }

/* sigillo nell'anteprima: intatto = da leggere, spezzato = letta */
.lc-seal {
  position: absolute;
  right: var(--s3);
  top: 50%;
  width: 60px; height: 60px;
  margin-top: -30px;
  filter: drop-shadow(0 4px 5px rgba(92,40,10,.35));
}
.letter-card.is-hero { padding-right: 96px; min-height: 150px; justify-content: center; }
.letter-card.is-hero .lc-title { font-size: 20px; line-height: 26px; }
.letter-card.is-hero .lc-seal { width: 72px; height: 72px; margin-top: -36px; }
.seal-half, .seal-whole { position: absolute; inset: 0; transition: transform .5s var(--ease); }
.seal-half .wax, .seal-whole .wax { width: 100%; height: 100%; display: block; }
/* crepa frastagliata al centro */
.seal-half.l { clip-path: polygon(0 0, 54% 0, 46% 22%, 56% 44%, 45% 66%, 55% 84%, 49% 100%, 0 100%); }
.seal-half.r { clip-path: polygon(54% 0, 100% 0, 100% 100%, 49% 100%, 55% 84%, 45% 66%, 56% 44%, 46% 22%); }
.letter-card.is-read .seal-half.l { transform: translate(-3px, 2px) rotate(-9deg); }
.letter-card.is-read .seal-half.r { transform: translate(3px, 3px) rotate(8deg); }

/* =========================================================
   NEWS — apertura della lettera
   ========================================================= */
.letter-layer { position: absolute; inset: 0; z-index: 58; }
.ll-scrim {
  position: absolute;
  inset: 0;
  background: rgba(31,24,12,.42);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .4s ease;
}
.letter-layer.is-on .ll-scrim { opacity: 1; }

.envelope {
  position: absolute;
  perspective: 1000px;
  transition: left .5s cubic-bezier(.32,.72,0,1), top .5s cubic-bezier(.32,.72,0,1), width .5s cubic-bezier(.32,.72,0,1), height .5s cubic-bezier(.32,.72,0,1), opacity .4s ease, transform .5s var(--ease);
}
.env-back, .env-pocket, .env-flap {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(165deg, #f7eedb, #eadcbf);
}
.env-back { box-shadow: 0 30px 60px -20px rgba(40,25,5,.6); }
.env-letter {
  position: absolute;
  left: 7%; right: 7%; top: 8%; bottom: 10%;
  border-radius: 6px;
  background: linear-gradient(180deg, #fffdf7, #faf3e3);
  box-shadow: 0 2px 6px rgba(92,68,28,.2);
  transition: transform .45s cubic-bezier(.32,.72,0,1);
  z-index: 1;
}
.env-letter-lines {
  position: absolute;
  left: 12%; right: 12%; top: 18%; bottom: 30%;
  background: repeating-linear-gradient(180deg, rgba(120,95,50,.22) 0 1px, transparent 1px 12px);
}
.env-pocket {   /* parte anteriore della busta, sopra la lettera */
  z-index: 2;
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(170deg, #f9f1df, #e9dab9);
  box-shadow: inset 0 0 0 1px rgba(150,110,40,.15);
}
.env-flap {     /* lembo superiore: si ribalta all'indietro */
  z-index: 3;
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  background: linear-gradient(180deg, #efe2c6, #e3d1ab);
  transform-origin: 50% 0;
  transition: transform .4s cubic-bezier(.5,0,.3,1), z-index 0s .2s;
}
.env-seal {
  position: absolute;
  z-index: 4;
  left: 50%; top: 58%;
  width: 66px; height: 66px;
  margin: -33px 0 0 -33px;
  filter: drop-shadow(0 5px 6px rgba(92,40,10,.4));
}
.env-crumbs { position: absolute; left: 50%; top: 58%; z-index: 5; }
.env-crumbs span {
  position: absolute;
  width: var(--sz); height: var(--sz);
  border-radius: 40%;
  background: #b8872c;
  opacity: 0;
}
.env-seal.is-alert ~ .env-crumbs span { background: #a8322a; }

/* 1. il sigillo si spezza */
.letter-layer.is-crack .env-seal .seal-half { transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .5s ease .25s; }
.letter-layer.is-crack .env-seal .seal-half.l { transform: translate(-26px, 26px) rotate(-38deg); opacity: 0; }
.letter-layer.is-crack .env-seal .seal-half.r { transform: translate(24px, 32px) rotate(34deg); opacity: 0; }
.letter-layer.is-crack .env-crumbs span { animation: crumb .7s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes crumb {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}
/* 2. il lembo si apre */
.letter-layer.is-flap .env-flap { transform: rotateX(180deg); z-index: 0; filter: brightness(.92); }
/* 3. la lettera esce */
.letter-layer.is-rise .env-letter { transform: translateY(-62%); z-index: 3; }
/* 4. la busta scende e sparisce, il foglio si distende */
.letter-layer.is-paper .envelope { opacity: 0; transform: translateY(60px) scale(.9); }

/* il foglio con la notizia intera */
.paper {
  position: absolute;
  z-index: 6;
  left: var(--s3); right: var(--s3);
  top: 50%;
  translate: 0 -50%;                     /* centrato e alto quanto serve */
  display: flex;
  flex-direction: column;
  max-height: calc(100% - var(--safe-t) - var(--safe-b) - 2 * var(--s6));
  border-radius: 6px;
  overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .47 0 0 0 0 .32 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #fffdf6, #f8efdc);
  box-shadow: 0 40px 80px -24px rgba(40,25,5,.65), inset 0 0 0 1px rgba(150,110,40,.15);
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 38%;
  transform: translateY(18%) scale(.5);
  transition: transform .6s var(--spring), opacity .35s ease;
}
.letter-layer.is-paper .paper { opacity: 1; transform: none; pointer-events: auto; }
.letter-layer.is-closing .paper { opacity: 0; transform: translateY(30px) scale(.94); transition: transform .35s var(--ease), opacity .3s ease; }
.letter-layer.is-closing .ll-scrim { opacity: 0; }
.letter-layer.is-closing .envelope { opacity: 0; }

.paper-close {
  position: absolute;
  z-index: 2;
  top: var(--s3); right: var(--s3);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(31,27,20,.06);
}
.paper-close svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.paper-scroll { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: var(--s6) var(--s6) var(--s6); scrollbar-width: none; }
.paper-scroll::-webkit-scrollbar { display: none; }
.paper-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: var(--s4); border-bottom: 1px solid rgba(150,110,40,.25); }
.paper-crown { width: 22px; height: 14px; fill: var(--gold); }
.paper-brand { font-family: var(--f-logo); font-size: 30px; line-height: 32px; color: var(--gold-text); }
.paper-dateline { margin-top: var(--s4); font-size: var(--t-sm); color: var(--ink-2); font-style: italic; }
.paper-type {
  margin-top: var(--s3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-cap);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c);
}
.paper-type svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.paper-title { margin: var(--s2) 0 0; font-size: var(--t-title); line-height: 30px; font-weight: 800; letter-spacing: -.02em; }
.paper-cover { margin-top: var(--s4); height: 180px; border-radius: 8px; background: center / cover no-repeat; }
.paper-body { margin-top: var(--s4); display: flex; flex-direction: column; gap: var(--s3); }
.paper-body p { font-size: var(--t-body); line-height: 24px; color: #2b2519; }
.paper-body p:first-child::first-letter { float: left; font-family: var(--f-logo); font-size: 56px; line-height: 44px; padding: 4px 8px 0 0; color: var(--gold-text); }
.letter-layer.is-paper .paper-title,
.letter-layer.is-paper .paper-dateline,
.letter-layer.is-paper .paper-type { animation: rise .6s .15s var(--ease) backwards; }
.letter-layer.is-paper .paper-body p { animation: rise .6s var(--ease) backwards; animation-delay: calc(.25s + var(--i) * 90ms); }
.paper-sign { margin-top: var(--s6); text-align: right; font-family: var(--f-logo); font-size: 26px; color: var(--gold-text); }
.letter-layer.is-paper .paper-sign { animation: sign 1.2s .7s var(--ease) backwards; }
@keyframes sign { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.paper-actions { margin-top: var(--s6); display: flex; flex-direction: column; gap: var(--s2); }
.paper-btn { width: 100%; height: var(--ctl-lg); }
.paper-btn-ghost {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s3) 0 var(--s4);
  border-radius: 999px;
  font-size: var(--t-sm);
  font-weight: 600;
  background: rgba(255,255,255,.6);
  box-shadow: inset 0 0 0 1px rgba(150,110,40,.3);
}
.paper-btn-ghost svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================
   Schermi stretti
   ========================================================= */
@media (max-width: 374px) {
  :root { --s4: 12px; }
  .logo { font-size: 30px; }
  .stats-visits { padding-right: var(--s3); }
  .stats-visits > svg { display: none; }
  .card { width: 160px; }
}

/* =========================================================
   Accessibilità
   ========================================================= */
@media (prefers-reduced-transparency: reduce) {
  .glass { background: #fffaf1; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.app.on-giveaway .stage,
.app.on-giveaway .chrome > .stats,
.app.on-giveaway .chrome > .map-area,
.app.on-giveaway .chrome > .search-row { opacity: 0; transform: scale(.97); pointer-events: none; }
.page-giveaway {
  position: absolute;
  z-index: 12;
  left: 0; right: 0;
  top: calc(var(--safe-t) + var(--s2) + 64px + var(--s2));
  bottom: calc(var(--safe-b) + var(--s3) + var(--tabbar-h) + var(--s2));
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .35s ease, transform .5s var(--spring);
  pointer-events: none;
}
.app.on-giveaway .page-giveaway { opacity: 1; transform: none; pointer-events: auto; }
.gw-list { display: flex; flex-direction: column; gap: 16px; }
.gw-card { overflow: hidden; border-radius: 24px; }
.gw-card.is-ended { opacity: .72; }
.gw-photo { height: 180px; background: center / cover no-repeat, linear-gradient(160deg, #f4ead4, #d9c7a2); }
.gw-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.gw-kicker { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); }
.gw-body h2 { margin: 0; font-size: 24px; font-weight: 600; }
.gw-sub { margin: 0; color: var(--ink-2); }
.gw-actions { display: flex; flex-direction: column; gap: 8px; }
.gw-actions .btn-gold { text-decoration: none; justify-content: center; }
.gw-tabs { display: flex; gap: 8px; margin: 4px 0 8px; }
.gw-tabs button {
  flex: 1; min-height: 40px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2); font-weight: 700;
}
.gw-tabs button.is-on { background: #fff; color: var(--ink); box-shadow: 0 6px 16px -10px rgba(80,60,20,.45); }
.gw-tabs em { font-style: normal; opacity: .6; margin-left: 4px; }
.gw-card { position: relative; }
.gw-card h2 { margin: 0; font-size: 22px; }
.gw-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  background: #fff; color: #1c6b3a;
}
.gw-badge.is-end { color: #6b6256; }
.gw-count {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800;
  background: rgba(20,16,10,.72); color: #fff;
}
.gw-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--ink-2); font-size: 13px; }
.gw-open {
  align-self: flex-start; border: 0; border-radius: 999px; min-height: 42px; padding: 0 16px;
  font-weight: 800; color: #2a1d05;
  background: linear-gradient(135deg, #fff1c6, #e2b657 55%, #b8873a);
}
.gw-back {
  align-self: flex-start; border: 0; background: transparent; color: var(--ink-2);
  font-weight: 700; padding: 0; min-height: 32px;
}
.gw-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gw-step { display: flex; gap: 10px; padding: 12px; border-radius: 16px; background: rgba(255,252,245,.7); }
.gw-step b { display: block; }
.gw-step p { margin: 4px 0 8px; color: var(--ink-2); font-size: 14px; }
.gw-step a, .gw-step span.gw-req {
  display: inline-flex; min-height: 36px; align-items: center; padding: 0 12px;
  border-radius: 999px; background: #1f1b14; color: #fff; font-size: 12px; font-weight: 800; text-decoration: none;
}
.gw-prize { display: flex; gap: 12px; align-items: center; }
.gw-prize img { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; background: #111; }
.gw-prose { white-space: pre-wrap; margin: 0; font-size: 14px; line-height: 22px; }
.vp-notes { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.vp-note { margin: 0; color: var(--ink-2); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
