:root {
  /* Pop napoletano: un colore pieno per prodotto, testo inchiostro, fondo bianco caldo */
  --paper: oklch(0.985 0.006 95);
  --paper-2: oklch(0.955 0.012 95);
  --paper-3: oklch(0.915 0.02 95);
  --ink: oklch(0.2 0.03 265);
  --ink-2: oklch(0.36 0.03 265);
  --muted: oklch(0.5 0.025 265);
  --line: oklch(0.9 0.012 265);
  --red: oklch(0.601 0.216 27.3);
  --lemon: oklch(0.91 0.16 102);
  --blue: oklch(0.55 0.16 255);
  --pink: oklch(0.89 0.06 15);
  --accent: var(--red);
  --accent-ink: oklch(0.53 0.2 27);
  --accent-soft: oklch(0.93 0.05 27);
  --moss: oklch(0.58 0.14 150);
  --moss-soft: oklch(0.93 0.06 150);
  --gold: var(--lemon);
  --gold-soft: oklch(0.96 0.08 102);
  --sky: var(--blue);
  --sea: oklch(0.78 0.09 240);
  --cream: oklch(0.995 0.003 95);
  --wa: oklch(0.66 0.16 150);
  --tg: oklch(0.64 0.13 235);
  /* colore del prodotto della variante (parte alta) */
  --hl: var(--red);
  --hl-ink: var(--cream);

  --font-display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --gutter: 18px;
  --max: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--accent-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 900; font-stretch: 70%; text-transform: uppercase; letter-spacing: -0.005em; margin: 0; }
body[data-v=adozioni] { --hl: var(--lemon); --hl-ink: var(--ink); }
body[data-v=passeggiate] { --hl: var(--blue); --hl-ink: var(--cream); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- top ---------- */
/* barra in alto, fissa: logo + "Iscriviti alla lista" quando il modulo non è sullo schermo */
.top { position: sticky; top: 0; z-index: 40; background: var(--paper); transition: box-shadow .25s; }
.top.scrolled { box-shadow: 0 1px 0 var(--line); }
.top-in {
  max-width: var(--max); margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 10px;
  display: flex; align-items: center; gap: 12px; min-height: 60px;
}
.top-in .logo { margin-right: auto; }
.top-cta { height: 42px; padding: 0 18px; font-size: 15px; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .25s var(--ease-out), transform .25s var(--ease-out); }
.top.show-cta .top-cta { opacity: 1; transform: none; pointer-events: auto; }
.top-cta[data-joined] { opacity: 1; transform: none; pointer-events: auto; background: var(--ink); }
@media (max-width: 559px) { .top .pill { display: none; } }
html { scroll-padding-top: 76px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.logo img { display: block; height: 38px; width: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700;
  background: var(--ink); color: var(--paper); border: 0;
  padding: 7px 12px; border-radius: 99px; white-space: nowrap;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--moss); box-shadow: 0 0 0 0 var(--moss); animation: ping 2.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 oklch(0.58 0.12 145 / 0.5); } 70%, 100% { box-shadow: 0 0 0 7px oklch(0.58 0.12 145 / 0); } }

.notice {
  max-width: calc(var(--max) - 2 * var(--gutter)); margin: 8px var(--gutter) 0;
  background: var(--moss-soft); color: var(--ink); border-radius: 14px;
  padding: 12px 16px; font-weight: 600; font-size: 15px;
}
@media (min-width: 1152px) { .notice { margin: 8px auto 0; } }

/* ---------- hero ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.hero { display: grid; gap: 28px; padding: 22px 0 40px; align-items: center; }
.kicker { margin: 0 0 12px; font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
h1 { font-size: clamp(44px, 12.5vw, 88px); line-height: 0.9; text-wrap: balance; }
h1 em { font-style: normal; background: var(--hl); color: var(--hl-ink); padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sub { font-size: 17px; color: var(--ink-2); margin: 16px 0 22px; max-width: 34em; text-wrap: pretty; }
.sub.small { font-size: 15px; margin: 8px 0 18px; }

.join { display: grid; gap: 10px; max-width: 520px; }
.join-row { display: grid; gap: 10px; }
.join input[type=email], .field input, .field select, .share-link input {
  width: 100%; height: 54px; padding: 0 16px;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 99px;
  font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.join input[type=email]:focus, .field input:focus, .field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.hp { position: absolute; left: -9999px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); line-height: 1.4; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.micro { margin: 0; font-size: 13px; color: var(--muted); }
.form-error { margin: 0; min-height: 0; font-size: 14px; font-weight: 600; color: var(--red); }
.form-error:empty { display: none; }
.already, .count { margin: 14px 0 0; font-size: 15px; color: var(--ink-2); }
.count::before { content: '🐾 '; }

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 24px; border-radius: 99px; border: 0;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease-out), background .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--cream); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: var(--cream); color: var(--ink); border: 2px solid var(--ink); }
.btn-wa { background: var(--wa); color: white; }
.btn-tg { background: var(--tg); color: white; }
.btn.wide { width: 100%; }
.btn .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.loading .spinner { display: inline-block; }
.btn.loading { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
.linklike { background: none; border: 0; padding: 0; color: var(--accent-ink); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---------- phone mockup ---------- */
.hero-visual { position: relative; display: grid; place-items: center; padding: 26px 0 10px; }
.hero-visual::before {
  content: ''; position: absolute; left: 50%; top: 52%; width: min(400px, 96vw); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: var(--hl); z-index: -1;
}
.phone {
  width: min(300px, 78vw); aspect-ratio: 9 / 19;
  background: var(--ink); border-radius: 46px; padding: 10px;
  box-shadow: 0 40px 80px -30px oklch(0.25 0.035 45 / 0.55), 0 0 0 1.5px oklch(0.35 0.03 45);
  position: relative; transform: rotate(-2deg);
}
.notch { position: absolute; top: 18px; left: 50%; translate: -50% 0; width: 84px; height: 24px; background: var(--ink); border-radius: 20px; z-index: 3; }
.screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: var(--paper); font-size: 12px; }
.scr { position: absolute; inset: 0; padding: 48px 14px 16px; display: none; flex-direction: column; gap: 10px; animation: fadein .5s var(--ease-out); }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen[data-screen=swipe] .scr-swipe,
.screen[data-screen=adozioni] .scr-adozioni,
.screen[data-screen=passeggiate] .scr-passeggiate { display: flex; }

.scr-head { display: flex; align-items: center; justify-content: space-between; }
.scr-head b { font-family: var(--font-display); font-weight: 900; font-stretch: 75%; text-transform: uppercase; font-size: 22px; }
.muted { color: var(--muted); font-size: 11px; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 99px; padding: 3px; font-size: 10px; font-weight: 600; }
.seg i { font-style: normal; padding: 4px 8px; border-radius: 99px; color: var(--muted); }
.seg i.on { background: var(--cream); color: var(--ink); box-shadow: 0 1px 3px oklch(0 0 0 / .1); }

.card-stack { position: relative; flex: 1; }
.dogcard { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: var(--paper-3); box-shadow: 0 12px 30px -14px oklch(0.25 0.035 45 / .5); animation: wiggle 5s ease-in-out infinite; transform-origin: 50% 100%; }
.dogcard.back { transform: scale(.94) translateY(10px) rotate(3deg); animation: none; opacity: .7; }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-3deg) translateX(-6px); } 88% { transform: rotate(2deg) translateX(4px); } }
.dogcard img { width: 100%; height: 100%; object-fit: cover; }
.dogcard::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, oklch(0.2 0.03 45 / .85)); }
.match { position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--cream); color: var(--ink); font-size: 11px; font-weight: 600; padding: 5px 9px; border-radius: 99px; }
.match b { color: var(--accent-ink); }
.dogcard-info { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; color: var(--cream); display: grid; gap: 2px; }
.dogcard-info b { font-family: var(--font-display); font-weight: 900; font-stretch: 75%; text-transform: uppercase; font-size: 24px; line-height: 1; }
.dogcard-info span { font-size: 11px; opacity: .9; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chips i { font-style: normal; font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 99px; background: oklch(1 0 0 / .2); backdrop-filter: blur(6px); }
.actions { display: flex; justify-content: center; gap: 22px; }
.act { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); box-shadow: 0 6px 16px -8px oklch(0.25 0.035 45 / .5); font-size: 18px; color: var(--muted); }
.act.yes { background: var(--accent); color: var(--cream); width: 54px; height: 54px; }
.act.yes svg { width: 24px; height: 24px; }

/* swipe: amicizia / accoppiamento */
.scr-swipe .seg i { transition: background .3s, color .3s; }
.scr-swipe[data-mode=amici] .m-amici, .scr-swipe[data-mode=amore] .m-amore { background: var(--cream); color: var(--ink); box-shadow: 0 1px 3px oklch(0 0 0 / .1); }
.scr-swipe[data-mode=amore] .m-amore { color: var(--accent-ink); }
.dogcard.c-amici, .dogcard.c-amore { transition: opacity .45s var(--ease-out); }
.scr-swipe[data-mode=amici] .c-amore, .scr-swipe[data-mode=amore] .c-amici { opacity: 0; }
.match.ok { color: var(--moss); }

/* tag */
.tag { justify-self: start; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; border-radius: 99px; }
.tag.green { background: var(--moss-soft); color: oklch(0.42 0.1 145); }
.b { flex: 1; text-align: center; font-size: 11px; font-weight: 700; padding: 9px 6px; border-radius: 12px; background: var(--paper-2); }
.b.primary { background: var(--accent); color: var(--cream); }
.b.wide { flex: none; display: block; margin-top: auto; }

/* adozioni */
.filters { display: flex; gap: 5px; overflow: hidden; }
.filters i { font-style: normal; white-space: nowrap; font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); }
.filters i.on { background: var(--ink); color: var(--cream); }
.adopt-hero { position: relative; flex: 1; min-height: 0; border-radius: 20px; overflow: hidden; background: var(--paper-3); box-shadow: 0 12px 30px -14px oklch(0.25 0.035 45 / .5); }
.adopt-hero img { width: 100%; height: 100%; object-fit: cover; }
.adopt-hero::after { content: ''; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, oklch(0.2 0.03 45 / .85)); }
.adopt-hero .tag { position: absolute; top: 10px; left: 10px; z-index: 2; }
.adopt-hero .dogcard-info b { font-size: 19px; }
.adopt-row { display: flex; align-items: center; gap: 9px; background: var(--cream); border-radius: 14px; padding: 6px 10px 6px 6px; }
.adopt-row img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.adopt-row div { flex: 1; min-width: 0; }
.adopt-row b { display: block; font-size: 12px; }
.adopt-row span { display: block; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adopt-row > i { font-style: normal; color: var(--accent); font-size: 15px; }
.scr-adozioni .b.wide { margin-top: 0; }

/* passeggiate */
.route {
  position: relative; flex: 1; min-height: 150px; border-radius: 18px; overflow: hidden;
  background:
    repeating-linear-gradient(28deg, transparent 0 30px, oklch(1 0 0 / .9) 30px 33px),
    repeating-linear-gradient(-62deg, transparent 0 40px, oklch(1 0 0 / .9) 40px 43px),
    var(--paper-2);
}
.route .sea { position: absolute; left: -20%; bottom: -40%; width: 90%; height: 70%; background: var(--sea); border-radius: 50%; }
.route .park { position: absolute; right: 8%; top: 12%; width: 30%; height: 26%; background: var(--moss-soft); border-radius: 40% 60% 50% 45%; }
.route svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.route path { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 2.4s var(--ease-out) .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.r-start { position: absolute; left: 8%; top: 77%; width: 12px; height: 12px; border-radius: 50%; background: var(--cream); border: 3px solid var(--accent); translate: -50% -50%; }
.r-end { position: absolute; left: 90%; top: 20%; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; border: 3px solid var(--cream); box-shadow: 0 4px 10px -3px oklch(0 0 0 / .35); translate: -50% -50%; animation: pop .5s var(--ease-out) 2.4s both; }
.r-end img { width: 100%; height: 100%; object-fit: cover; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stats div { background: var(--cream); border-radius: 12px; padding: 7px 8px; }
.stats b { display: block; font-family: var(--font-display); font-weight: 900; font-stretch: 80%; font-size: 24px; line-height: 1.1; }
.stats span { font-size: 10px; color: var(--muted); }
.rank { margin-top: auto; background: var(--gold-soft); border-radius: 16px; padding: 10px; }
.rank-t { margin: 0 0 6px; font-size: 11px; font-weight: 700; }
.rank ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rank li { display: grid; grid-template-columns: 14px 26px 1fr auto; align-items: center; gap: 7px; font-size: 12px; padding: 3px 6px; border-radius: 10px; }
.rank li span { font-weight: 800; color: var(--ink-2); }
.rank li img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.rank li em { font-style: normal; color: var(--ink-2); font-size: 11px; }
.rank li.me-row { background: var(--cream); }

/* toast */
.toast {
  position: absolute; z-index: 4; top: 4px; right: 50%; translate: 58% 0;
  display: flex; gap: 10px; align-items: center;
  background: var(--cream);
  border: 1px solid var(--line); border-radius: 18px; padding: 9px 14px 9px 9px;
  box-shadow: 0 16px 34px -18px oklch(0.25 0.035 45 / .55);
  animation: drop 5s var(--ease-out) infinite; width: max-content; max-width: 86vw;
}
.toast img { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; }
.toast strong { display: block; font-size: 13.5px; }
.toast span { font-size: 12px; color: var(--muted); }
@keyframes drop { 0% { opacity: 0; transform: translateY(-14px); } 8%, 82% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateY(-6px); } }

/* ---------- blocks ---------- */
.block { padding: 46px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(38px, 10vw, 64px); line-height: 0.92; text-wrap: balance; }
.lead { font-size: 17px; color: var(--ink-2); margin: 14px 0 0; max-width: 40em; }

/* ---------- capitoli prodotto ---------- */
.chapters { width: 100vw; margin-left: calc(50% - 50vw); counter-reset: ch; }
.ch { counter-increment: ch; }
.ch-lab::before { content: '0' counter(ch) ' · '; }
.ch-intro { max-width: var(--max); margin: 0 auto; padding: 52px var(--gutter) 34px; }
.ch { position: relative; overflow: hidden; padding: 38px var(--gutter) 46px; }
.ch-in { max-width: var(--max); margin: 0 auto; display: grid; gap: 26px; }
.ch-swipe { background: var(--red); color: var(--cream); }
.ch-adozioni { background: var(--lemon); color: var(--ink); }
.ch-passeggiate { background: var(--blue); color: var(--cream); }
.ch-lab { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.ch h3 { margin: 12px 0 0; font-size: clamp(50px, 14vw, 96px); line-height: .86; }
.ch-txt > p:not(.ch-lab) { margin: 16px 0 0; font-size: 17px; line-height: 1.45; max-width: 30em; }
.ch-pts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; max-width: 30em; }
.ch-pts li { font-size: 16.5px; line-height: 1.4; }
.ch-pts b { display: block; font-family: var(--font-display); font-weight: 900; font-stretch: 75%; text-transform: uppercase; font-size: 20px; letter-spacing: .01em; }
.soon { position: absolute; right: var(--gutter); top: 34px; font-family: var(--font-display); font-weight: 900; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border: 2px solid currentColor; padding: 6px 10px; border-radius: 99px; rotate: 8deg; }

.pair { position: relative; height: 330px; max-width: 420px; width: 100%; }
.pc { position: absolute; margin: 0; width: 58%; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; border: 5px solid var(--cream); box-shadow: 0 22px 34px -18px oklch(0.2 0.03 265 / .6); }
.pc img { width: 100%; height: 100%; object-fit: cover; }
.pc.a { left: 0; top: 18px; rotate: -6deg; }
.pc.b { right: 0; top: 0; rotate: 5deg; }
.pc figcaption { position: absolute; left: 10px; right: 10px; top: 10px; color: var(--cream); font-weight: 700; font-size: 14px; text-shadow: 0 1px 8px oklch(0 0 0 / .6); }
.stk { position: absolute; z-index: 3; font-family: var(--font-display); font-weight: 900; font-stretch: 85%; text-transform: uppercase; font-size: 16px; letter-spacing: .03em; padding: 9px 13px; border-radius: 8px; }
.stk.s1 { background: var(--lemon); color: var(--ink); left: -2px; bottom: 34px; rotate: -8deg; }
.stk.s2 { background: var(--ink); color: var(--lemon); right: -2px; bottom: 58px; rotate: 6deg; }

.pols { display: flex; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pols::-webkit-scrollbar { display: none; }
.pol { flex: none; width: 150px; margin: 0; background: var(--cream); padding: 7px 7px 12px; border-radius: 6px; rotate: var(--r); box-shadow: 0 14px 22px -14px oklch(0.2 0.03 265 / .55); scroll-snap-align: start; }
.pol img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
.pol b { display: block; margin-top: 8px; font-family: var(--font-display); font-weight: 900; font-stretch: 80%; text-transform: uppercase; font-size: 19px; line-height: 1; }
.pol span { font-size: 12px; color: var(--muted); }

.walk { display: grid; gap: 8px; max-width: 460px; }
/* mappa dell'uscita */
.walkcard { background: var(--cream); color: var(--ink); border-radius: 22px; padding: 8px; box-shadow: 0 22px 34px -20px oklch(0.2 0.03 265 / .7); rotate: -1.5deg; }
.wmap { position: relative; aspect-ratio: 340 / 220; border-radius: 16px; overflow: hidden; }
.wmap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.w-land { fill: oklch(0.955 0.012 90); }
.w-blocks path { fill: oklch(0.915 0.016 80); stroke: oklch(0.915 0.016 80); stroke-width: 3; stroke-linejoin: round; }
.w-roads path { fill: none; stroke: oklch(0.995 0.003 95); stroke-width: 5; stroke-linecap: round; }
.w-major { fill: none; stroke: oklch(0.93 0.09 95); stroke-width: 8; stroke-linecap: round; }
.w-park { fill: oklch(0.86 0.09 145); }
.w-trees circle { fill: oklch(0.72 0.12 145); }
.w-path { fill: none; stroke: oklch(0.95 0.03 120); stroke-width: 2.5; stroke-dasharray: 1 4; stroke-linecap: round; }
.w-sea { fill: oklch(0.8 0.085 235); }
.w-waves path { fill: none; stroke: oklch(0.9 0.05 235); stroke-width: 1.6; stroke-linecap: round; }
.w-lab { font: 700 7.5px var(--font-body); fill: oklch(0.48 0.03 70); letter-spacing: .03em; paint-order: stroke; stroke: oklch(0.97 0.01 90 / .9); stroke-width: 2.5px; }
.w-lab.park { fill: oklch(0.38 0.1 150); stroke: oklch(0.86 0.09 145 / .9); }
.w-lab.sea { fill: oklch(0.4 0.1 240); font-style: italic; font-size: 9px; stroke: none; }
.w-lab.road { fill: oklch(0.45 0.03 70); }
.w-route-bg { fill: none; stroke: var(--cream); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.w-route { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 2.2s var(--ease-out) .2s forwards; }
.w-start { fill: var(--cream); stroke: var(--red); stroke-width: 4; }
.w-end { position: absolute; width: 34px; height: 34px; translate: -50% -50%; border-radius: 50%; overflow: hidden; border: 3px solid var(--cream); box-shadow: 0 4px 10px -3px oklch(0 0 0 / .4); }
.w-end img { width: 100%; height: 100%; object-fit: cover; }
.w-tag { position: absolute; left: 10px; top: 10px; font-family: var(--font-display); font-weight: 900; font-stretch: 85%; text-transform: uppercase; font-size: 13px; background: var(--lemon); color: var(--ink); padding: 6px 9px; border-radius: 7px; rotate: -3deg; }
.wstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px 6px 4px; }
.wstats b { display: block; font-family: var(--font-display); font-weight: 900; font-stretch: 80%; font-size: 26px; line-height: 1; }
.wstats span { font-size: 12px; color: var(--muted); }
.walk .lb { margin-top: 10px; }
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.lb li { display: grid; grid-template-columns: 22px 38px 1fr auto; gap: 12px; align-items: center; background: oklch(0.995 0.003 95 / .14); border-radius: 14px; padding: 7px 14px 7px 12px; font-weight: 700; }
.lb li.me { background: var(--lemon); color: var(--ink); }
.lb i { font-family: var(--font-display); font-weight: 900; font-style: normal; font-size: 20px; }
.lb img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }

/* come funziona: tre tessere colorate, ognuna con un pezzetto di interfaccia */
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.st { position: relative; border-radius: 24px; padding: 20px 20px 22px; display: grid; gap: 4px; }
.st1 { background: var(--red); color: var(--cream); rotate: -1deg; }
.st2 { background: var(--lemon); color: var(--ink); rotate: .8deg; }
.st3 { background: var(--blue); color: var(--cream); rotate: -.6deg; }
.st-n { position: absolute; right: 16px; top: 8px; font-family: var(--font-display); font-weight: 900; font-stretch: 70%; font-size: 76px; line-height: 1; opacity: .9; }
.st b { font-family: var(--font-display); font-weight: 900; font-stretch: 72%; text-transform: uppercase; font-size: 30px; line-height: 1; margin-top: 14px; }
.st > span:last-child { font-size: 16px; line-height: 1.45; max-width: 26em; }
.st-ui { display: grid; justify-items: start; gap: 8px; max-width: 76%; min-height: 96px; align-content: start; }
/* passo 1: tessera socio fondatore */
.fcard { width: 220px; background: var(--ink); color: var(--cream); border-radius: 16px; padding: 12px 14px; display: grid; gap: 6px; box-shadow: 0 12px 22px -12px oklch(0.2 0.03 265 / .7); rotate: -3deg; }
.fc-top { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.fc-top img { border-radius: 5px; }
.fcard b { font-family: var(--font-display); font-weight: 900; font-stretch: 75%; text-transform: uppercase; font-size: 24px !important; line-height: 1; margin: 0 !important; color: var(--lemon); }
.fc-row { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; }
.fc-row span:last-child { background: var(--lemon); color: var(--ink); padding: 2px 8px; border-radius: 99px; }
/* passo 2: sondaggio */
.poll { width: min(250px, 100%); background: var(--cream); color: var(--ink); border-radius: 16px; padding: 12px; display: grid; gap: 6px; box-shadow: 0 12px 22px -12px oklch(0.2 0.03 265 / .5); rotate: 2deg; }
.poll-q { font-size: 13px; font-weight: 700; }
.poll-o { position: relative; display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; padding: 6px 9px; border-radius: 9px; background: var(--paper-2); overflow: hidden; }
.poll-o i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: oklch(0.91 0.16 102 / .55); }
.poll-o.on i { background: var(--lemon); }
.poll-o em { position: relative; font-style: normal; font-weight: 800; }
.poll-o { isolation: isolate; } .poll-o i { z-index: -1; }
/* passo 3: livelli */
.levels { display: flex; flex-wrap: wrap; gap: 5px; }
.lv { font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 99px; background: oklch(0.995 0.003 95 / .16); color: var(--cream); }
.lv.done { background: oklch(0.995 0.003 95 / .3); }
.lv.now { background: var(--lemon); color: var(--ink); }
.lv-bar { width: min(250px, 100%); display: grid; gap: 5px; margin-top: 4px; }
.lv-bar i { height: 8px; border-radius: 99px; background: linear-gradient(to right, var(--lemon) var(--w), oklch(0.995 0.003 95 / .25) var(--w)); }
.lv-bar span { font-size: 12px; opacity: .9; }
/* livello nella finestra dopo l'iscrizione */
.lv-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; background: var(--blue); color: var(--cream); border-radius: var(--r-md); padding: 14px 16px; font-size: 14.5px; }
.lv-now b { font-family: var(--font-display); font-weight: 900; font-stretch: 80%; text-transform: uppercase; font-size: 20px; color: var(--lemon); }

/* cucciolo in pixel art: compare al centro dello schermo (.intro), poi scende e resta come barra in basso */
.pet-veil { position: fixed; inset: 0; z-index: 59; background: oklch(0.25 0.035 45 / .45); backdrop-filter: blur(3px); animation: fade .25s ease; }
.petbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--lemon); border: 0 solid var(--ink); border-top-width: 3px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transition: bottom .75s var(--ease-out), transform .75s var(--ease-out), left .75s var(--ease-out), right .75s var(--ease-out), border-radius .75s var(--ease-out), box-shadow .75s;
  animation: fade .3s ease;
}
.petbar.intro { bottom: 50%; transform: translateY(50%); left: max(14px, calc(50% - 230px)); right: max(14px, calc(50% - 230px)); border-width: 3px; border-radius: 24px; box-shadow: 7px 7px 0 var(--ink); padding-bottom: 0; }
.petbar-in { max-width: 560px; margin: 0 auto; height: 92px; padding: 0 12px; display: flex; align-items: center; }
.petbar canvas { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.pet-pick, .pet-play { display: flex; align-items: center; gap: 10px; width: 100%; }
.pet-pick-t { flex: 1; display: grid; gap: 6px; }
.pet-pick b { font-family: var(--font-display); font-weight: 900; font-stretch: 75%; text-transform: uppercase; font-size: 21px; line-height: 1; }
.pet-pick-t span { display: none; font-size: 15px; color: var(--ink-2); }
.pet-opts { display: flex; gap: 6px; }
.pet-opts button { border: 2px solid var(--ink); background: var(--cream); border-radius: 14px; padding: 7px 6px; cursor: pointer; transition: transform .15s var(--ease-out); }
.pet-opts button:active { transform: scale(.92); }
.pet-opts canvas { width: 60px; height: auto; }
.petbar.intro .petbar-in { height: auto; padding: 22px 16px; }
.petbar.intro .pet-pick { flex-direction: column; align-items: stretch; gap: 16px; text-align: center; }
.petbar.intro .pet-pick b { font-size: 32px; }
.petbar.intro .pet-pick-t span { display: block; }
.petbar.intro .pet-opts { justify-content: center; gap: 10px; }
.petbar.intro .pet-opts canvas { width: 84px; }
#pet-cv { flex: none; width: 120px; height: 66px; }
.pet-side { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pet-meters { margin: 0; display: flex; gap: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pet-meters i { font-style: normal; letter-spacing: 1px; color: var(--red); }
.pet-meters s { text-decoration: none; color: oklch(0.2 0.03 265 / .22); }
#pet-age { margin-left: auto; color: var(--ink-2); font-weight: 600; }
.pet-msg { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pet-acts { display: flex; gap: 4px; }
.pet-acts button { flex: 1; height: 34px; padding: 0 4px; border-radius: 99px; border: 2px solid var(--ink); background: var(--cream); font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; touch-action: manipulation; }
.pet-acts button:active { transform: scale(.95); }
.pet-acts button:disabled { opacity: .45; cursor: default; }
.pet-acts button.need { background: var(--red); border-color: var(--red); color: var(--cream); animation: nudge .9s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .pet-acts button.need { animation: none; } .petbar { transition: none; } }
body.has-petbar { padding-bottom: calc(95px + env(safe-area-inset-bottom, 0px)); }
body.has-petbar .overlay { padding-bottom: calc(95px + env(safe-area-inset-bottom, 0px)); }
body.has-petbar .dialog { max-height: calc(92dvh - 95px); }

/* dopo l'iscrizione: invito a dare consigli */
.ask-box { display: grid; gap: 6px; background: var(--lemon); border-radius: var(--r-md); padding: 18px; }
.ask-box b { font-family: var(--font-display); font-weight: 900; font-stretch: 75%; text-transform: uppercase; font-size: 24px; line-height: 1; }
.ask-box > span { font-size: 15px; color: var(--ink-2); }
.ask-box .btn { margin-top: 8px; }

.community { display: grid; gap: 22px; width: 100vw; margin-left: calc(50% - 50vw); background: var(--ink); color: var(--cream); border-top: 0; padding: 60px max(var(--gutter), calc(50vw - var(--max) / 2 + var(--gutter))); }
.community h2 { color: var(--lemon); }
.community .lead { color: oklch(0.87 0.015 265); }
.community .btn-ghost { background: transparent; color: var(--cream); border-color: var(--cream); }
.chapters + .block { border-top: 0; }
.community-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.community-btns .btn { flex: 1 1 220px; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq details:first-of-type { margin-top: 14px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent-ink); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--ink-2); margin: 10px 0 0; }

.final { text-align: center; padding: 56px 0 64px; display: grid; gap: 22px; justify-items: center; }
.final h2 { max-width: 14em; }

.foot {
  max-width: var(--max); margin: 0 auto;
  padding: 22px var(--gutter) calc(26px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between;
  font-size: 13px; color: var(--muted);
}
.foot a { color: var(--ink-2); margin-left: 14px; }
.foot a:first-child { margin-left: 0; }

/* ---------- dialog ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: oklch(0.25 0.035 45 / .45); backdrop-filter: blur(3px);
  display: grid; align-items: end;
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }
.dialog {
  position: relative; background: var(--paper);
  border-radius: 28px 28px 0 0; padding: 26px var(--gutter) calc(22px + env(safe-area-inset-bottom, 0px));
  max-height: 92dvh; overflow-y: auto; width: 100%;
  animation: up .4s var(--ease-out);
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.dialog h2 { font-size: 28px; }
.dialog .kicker { padding-right: 40px; }
.close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--paper-2); cursor: pointer; font-size: 15px; }
.step { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.field > span, .field legend { font-weight: 700; font-size: 14.5px; padding: 0; }
.field legend em { font-style: normal; font-weight: 500; color: var(--muted); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pick label { cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 99px; background: var(--cream); border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; transition: all .15s; }
.pick input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--cream); }
.pick input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-soft); }
.pick input:disabled + span { opacity: .45; }
.skip { justify-self: center; font-weight: 600; color: var(--muted); }
.hl { color: var(--accent-ink); }
.share-link { display: flex; gap: 8px; }
.share-link input { font-size: 14px; color: var(--ink-2); }
.share-link .btn { flex: none; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btns .btn { flex: 1 1 160px; }
.group-box { display: grid; gap: 6px; background: var(--moss-soft); border-radius: var(--r-md); padding: 16px; margin-top: 4px; }
.group-box > span { color: var(--ink-2); font-size: 14px; }
.group-box .share-btns { margin-top: 6px; }

/* ---------- desktop ---------- */
@media (min-width: 560px) {
  .join-row { grid-template-columns: 1fr auto; }
  .dialog { max-width: 520px; margin: auto; border-radius: 28px; align-self: center; }
  .overlay { align-items: center; padding: 16px; }
}
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .hero { grid-template-columns: 1.1fr .9fr; padding: 40px 0 70px; gap: 40px; }
  .ch-in { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .ch { padding: 70px var(--gutter) 76px; }
  .ch-passeggiate .ch-in { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
  .st-ui { max-width: 100%; margin-top: 54px; }
  .community { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .toast { right: auto; left: -20px; translate: 0; top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
