/* Ludola, sito base: stessi token dell'app (DESIGN.md §1, ludola_tokens.dart).
   Font locali (SIL OFL 1.1, licenza in /fonts/OFL.txt), niente CDN. */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/fredoka-600.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/fredoka-700.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/nunito-700.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/nunito-800.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 900; font-display: swap; src: url(/fonts/nunito-900.woff2) format('woff2'); }

:root {
  --red: #D64B3A; --red-t: #F8DCD8;
  --green: #1E8E5A; --green-t: #D4ECDF;
  --yellow: #F2B634; --yellow-t: #FCEFC9;
  --blue: #2E6BD8; --blue-t: #D8E3F8;
  --ink: #171A21; --cream: #FFF4DF; --paper: #FFFDF8;
  --text-2: #4A4338; --body: #2B2A26; --line: #E6DCC6; --dash: #8C8370;
  --off: #E9E3D6; --off-t: #6B6455;
  --display: Fredoka, Nunito, system-ui, sans-serif;
  --sans: Nunito, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 700 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -.005em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--yellow); border: 3px solid var(--ink);
  border-radius: 14px; padding: 10px 16px; font-family: var(--display); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { flex-shrink: 0; }
.wordmark { display: inline-flex; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 2px 0 var(--ink); }
.wordmark span { display: inline-block; }
.wordmark span:nth-child(1) { color: var(--red); transform: rotate(-5deg); }
.wordmark span:nth-child(2) { color: var(--green); transform: rotate(3deg) translateY(2px); }
.wordmark span:nth-child(3) { color: var(--yellow); transform: rotate(-3deg); }
.wordmark span:nth-child(4) { color: var(--blue); transform: rotate(4deg) translateY(1px); }
.wordmark span:nth-child(5) { color: var(--red); transform: rotate(-4deg); }
.wordmark span:nth-child(6) { color: var(--green); transform: rotate(3deg) translateY(1px); }

/* ---------- pulsanti (premuto: scende e l'ombra sparisce) ---------- */
.btn {
  --sh: 5px; --bg: var(--paper); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px; border-radius: 18px; border: 3px solid var(--ink);
  background: var(--bg); color: var(--fg); box-shadow: 0 var(--sh) 0 var(--ink);
  font: 700 19px/1 var(--display); text-decoration: none; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { background: color-mix(in srgb, var(--bg) 88%, #fff); }
.btn:active { transform: translateY(var(--sh)); box-shadow: 0 0 0 var(--ink); }
.btn-red { --bg: var(--red); --fg: #fff; }
.btn-yellow { --bg: var(--yellow); }
.btn-lg { min-height: 62px; font-size: 21px; padding: 0 28px; }
.btn-sm { min-height: 44px; font-size: 16px; padding: 0 16px; border-radius: 14px; --sh: 4px; }
.btn svg { flex-shrink: 0; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--cream) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 2px solid transparent; transition: border-color .2s ease; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.nav { display: none; gap: 4px; }
.nav a { padding: 10px 12px; border-radius: 12px; text-decoration: none; font-weight: 800; color: var(--body); }
.nav a:hover { background: var(--paper); color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 10px;
  border-radius: 50%; border: 2.5px solid var(--ink); background: var(--paper); box-shadow: 0 3px 0 var(--ink);
  font: 700 14px/1 var(--display); text-decoration: none; }
.lang:active { transform: translateY(3px); box-shadow: none; }
@media (min-width: 900px) { .nav { display: flex; } }

/* ---------- coriandoli ---------- */
.confetti { position: absolute; pointer-events: none; }
.cf { position: absolute; width: 14px; height: 14px; border: 2px solid var(--ink); }
.cf.c { border-radius: 50%; }
.cf.s { border-radius: 3px; }
.cf.d { border-radius: 2px; transform: rotate(45deg); }
.cf.t { width: 0; height: 0; border: 0; border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-bottom: 14px solid currentColor; filter: drop-shadow(0 0 0 var(--ink)) drop-shadow(1px 1px 0 var(--ink)); }

/* ---------- hero ---------- */
@media (max-width: 899px) { .hero > .confetti { display: none; } }
.hero { position: relative; padding: clamp(20px, 4vw, 48px) 0 clamp(48px, 7vw, 88px); }
.hero .wrap { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.02fr .98fr; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; align-self: start; justify-self: start;
  padding: 7px 14px 7px 10px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper);
  box-shadow: 0 3px 0 var(--ink); font-weight: 900; font-size: 14px; transform: rotate(-2deg); }
.eyebrow i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid var(--ink); }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero h1 { isolation: isolate; font-size: clamp(40px, 7.4vw, 74px); line-height: .98; }
.hero h1 .hl { position: relative; white-space: nowrap; }
.hero h1 .hl::after { content: ''; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .26em; z-index: -1;
  background: var(--yellow); border-radius: 6px; transform: rotate(-1.5deg); }
.lead { font-size: clamp(17px, 1.9vw, 20px); color: var(--body); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ticks { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--text-2); list-style: none; padding: 0; margin: 0; }
.ticks li { display: inline-flex; align-items: center; gap: 6px; }
.ticks li::before { content: ''; width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }

/* store */
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 16px 6px 12px;
  border-radius: 14px; border: 2.5px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--ink) 55%, var(--cream)); line-height: 1.1; }
.store:active { transform: translateY(4px); box-shadow: none; }
.store small { display: block; font: 700 11px/1.1 var(--sans); opacity: .85; }
.store b { display: block; font: 700 18px/1.1 var(--display); }

/* codice */
.code-card { position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 22px;
  box-shadow: 0 6px 0 var(--ink); padding: 16px 16px 14px 18px; max-width: 460px; }
.code-card form { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; }
.code-card label { grid-column: 1 / -1; font: 700 19px/1.2 var(--display); }
.tiles { position: relative; display: flex; gap: 8px; }
.tile { width: 44px; height: 50px; border-radius: 12px; border: 3px dashed var(--dash); background: var(--paper);
  display: flex; align-items: center; justify-content: center; font: 700 24px/1 var(--display); color: var(--ink);
  transition: transform .12s ease; }
.tile.on { border-style: solid; border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.tile.on:nth-child(1) { background: var(--red-t); transform: rotate(-3deg); }
.tile.on:nth-child(2) { background: var(--green-t); transform: rotate(2deg); }
.tile.on:nth-child(3) { background: var(--yellow-t); transform: rotate(-2deg); }
.tile.on:nth-child(4) { background: var(--blue-t); transform: rotate(3deg); }
.tile.on:nth-child(5) { background: var(--red-t); transform: rotate(-2deg); }
.tile.cur { border-style: solid; border-color: var(--ink); }
.tile.cur::after { content: ''; width: 3px; height: 24px; background: var(--ink); border-radius: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* L'input vero sta sopra le tessere: tastiera, incolla e lettori di schermo
   lavorano su un campo normale. */
.tiles input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; margin: 0;
  font-size: 16px; color: transparent; background: transparent; caret-color: transparent; cursor: text; }
.go { width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--ink); background: var(--yellow);
  box-shadow: 0 4px 0 var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.go:disabled { background: var(--off); cursor: not-allowed; }
.go:disabled svg { stroke: var(--off-t); }
.go:not(:disabled):active { transform: translateY(4px); box-shadow: none; }
.code-help { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 14px; color: var(--text-2); }
.code-help.err { color: #B23A2C; }
.linkish { background: none; border: 0; padding: 6px 0; font: 800 14px/1.2 var(--sans); color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 400px) { .tile { width: 38px; height: 46px; font-size: 21px; } .tiles { gap: 6px; } .go { width: 52px; height: 52px; } }

/* illustrazione */
.stage { position: relative; justify-self: center; width: min(100%, 500px); aspect-ratio: 1 / 1.02; margin-top: 18px; }
.stage .board { position: absolute; inset: 6% 4% 2% 4%; width: 92%; height: auto; transform: rotate(-3deg);
  filter: drop-shadow(0 2px 0 rgba(23,26,33,.04)); }
.chip { position: absolute; z-index: 2; left: 50%; top: -1%; transform: translateX(-50%) rotate(-2deg);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 10px 16px; border-radius: 16px;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-weight: 900; font-size: clamp(14px, 2.6vw, 17px); }
.die { position: absolute; z-index: 3; width: 22%; height: auto; overflow: visible; }
.die.a { left: -3%; bottom: 2%; transform: rotate(-12deg); }
.die.b { right: 0; top: 10%; width: 16%; transform: rotate(14deg); }
@media (prefers-reduced-motion: no-preference) {
  .die.a { animation: bob 5s ease-in-out infinite; }
  .die.b { animation: bob 6s ease-in-out -2s infinite; }
  @keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
}

/* ---------- sezioni ---------- */
section { position: relative; }
.sec { padding: clamp(56px, 8vw, 104px) 0; }
.sec-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head h2 { font-size: clamp(32px, 4.8vw, 52px); }
.sec-head p { margin-top: 14px; font-size: clamp(17px, 1.8vw, 19px); color: var(--body); }
.kicker { display: inline-block; margin-bottom: 12px; font: 900 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.card { background: var(--paper); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); }

/* passi */
.steps { display: grid; gap: 22px; list-style: none; padding: 0; margin: 0; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 24px 22px 26px; display: flex; flex-direction: column; gap: 12px; }
.step .num { width: 52px; height: 52px; border-radius: 14px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  display: flex; align-items: center; justify-content: center; font: 700 26px/1 var(--display); color: #fff; }
.step:nth-child(1) .num { background: var(--red); transform: rotate(-4deg); }
.step:nth-child(2) .num { background: var(--green); transform: rotate(3deg); }
.step:nth-child(3) .num { background: var(--blue); transform: rotate(-2deg); }
.step h3 { font-size: 24px; }
.step p { color: var(--body); }
.bubble { margin-top: 6px; align-self: flex-start; padding: 10px 14px; border-radius: 16px 16px 16px 4px; border: 2.5px solid var(--ink);
  background: var(--green-t); font-size: 14px; line-height: 1.35; }
.bubble b { font-weight: 900; text-decoration: underline; text-underline-offset: 2px; }

/* dado */
.dice-sec { background: var(--blue-t); border-top: 3px dashed var(--ink); border-bottom: 3px dashed var(--ink); }
.dice-grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .dice-grid { grid-template-columns: 1fr 1fr; } }
.dice-grid .sec-head { margin-bottom: 0; }
.quote { margin-top: 22px; display: inline-block; padding: 10px 16px; border-radius: 14px; background: var(--paper);
  border: 2.5px solid var(--ink); transform: rotate(-1.5deg); font-weight: 900; }
.stats { padding: 20px 20px 18px; transform: rotate(1deg); }
.stats-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 12px;
  border-bottom: 2px dashed var(--line); }
.stats-head b { font: 700 21px/1.1 var(--display); }
.stats-head span { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 2px dashed var(--line); }
.row:last-of-type { border-bottom: 0; }
.dot { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--ink); }
.row b { display: block; font: 700 18px/1.15 var(--display); }
.row small { display: block; font-size: 13px; color: var(--text-2); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.bars i { width: 11px; border: 1.5px solid var(--ink); border-radius: 3px; }
.stats p { font-size: 13px; color: var(--text-2); margin-top: 8px; }

/* modi */
.modes { display: grid; gap: 20px; }
@media (min-width: 640px) { .modes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .modes { grid-template-columns: repeat(4, 1fr); } }
.mode { border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: 22px 20px 24px;
  display: flex; flex-direction: column; gap: 10px; color: #fff; }
.mode:nth-child(1) { background: var(--red); transform: rotate(-1deg); }
.mode:nth-child(2) { background: var(--blue); transform: rotate(1deg); }
.mode:nth-child(3) { background: var(--green); transform: rotate(-.6deg); }
.mode:nth-child(4) { background: var(--yellow); color: var(--ink); transform: rotate(.8deg); }
.mode .ic { width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper);
  display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.mode h3 { font-size: 25px; }
.mode p { font-size: 19px; line-height: 1.45; font-weight: 800; }
.levels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; padding: 0; list-style: none; }
.levels li { padding: 4px 10px; border-radius: 999px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); font-size: 13px; font-weight: 900; }

/* schermate */
.shots-sec { overflow: hidden; }
.shots { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--gutter) 22px;
  margin: 0 calc(var(--gutter) * -1); scrollbar-width: thin; scrollbar-color: var(--ink) transparent; list-style: none; }
.shots li { flex: 0 0 auto; width: clamp(200px, 26vw, 252px); scroll-snap-align: center; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; height: auto; border-radius: 22px; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); background: var(--paper); }
.shots figcaption { margin-top: 12px; font-size: 15px; text-align: center; color: var(--text-2); }
.shots-nav { display: none; gap: 10px; }
@media (min-width: 760px) { .shots-nav { display: flex; } }
.round { width: 48px; height: 48px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--paper);
  box-shadow: 0 3px 0 var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.round:active { transform: translateY(3px); box-shadow: none; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }

/* promesse */
.promises { display: grid; gap: 14px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .promises { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .promises { grid-template-columns: repeat(3, 1fr); } }
.promises li { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--paper);
  border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); }
.promises .pi { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; border: 2.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center; }
.promises b { display: block; font: 700 19px/1.2 var(--display); margin-bottom: 2px; }
.promises li > span:last-child > span { display: block; font-size: 15px; color: var(--text-2); }

/* domande */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; position: relative; font: 700 19px/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 16px; top: 50%; width: 28px; height: 28px; margin-top: -14px;
  border-radius: 50%; border: 2.5px solid var(--ink); background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23171A21' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
  transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details > div { padding: 0 20px 20px; color: var(--body); }
.faq details > div p + p { margin-top: 10px; }

/* chiusura */
.final { padding: clamp(40px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.final .card { background: var(--yellow); padding: clamp(28px, 5vw, 56px); display: grid; gap: 24px; align-items: center; overflow: hidden; position: relative; }
@media (min-width: 900px) { .final .card { grid-template-columns: 1.3fr 1fr; } }
.final h2 { font-size: clamp(34px, 5vw, 56px); }
.final p { margin-top: 12px; font-size: 19px; color: var(--body); }
.final .cta-col { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

/* piè di pagina */
.foot { background: var(--ink); color: #F5EFE3; padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); }
.foot .wrap { display: grid; gap: 28px; }
@media (min-width: 900px) { .foot .wrap { grid-template-columns: 1.2fr 1fr 1fr; } }
.foot .wordmark { -webkit-text-stroke: 3px var(--paper); text-shadow: 0 2px 0 var(--paper); }
.foot p { color: #D9D1C2; font-size: 15px; margin-top: 12px; max-width: 30em; }
.foot h2 { font: 700 16px/1 var(--display); color: #fff; margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot a, .foot button.linkish { color: #F5EFE3; text-decoration: none; font-weight: 800; font-size: 15px; padding: 6px 0; display: inline-block; }
.foot a:hover, .foot button.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot .legal { max-width: none; grid-column: 1 / -1; border-top: 1px solid #3A3D46; padding-top: 20px; font-size: 13px; color: #B9B1A2; }

/* barra in basso su telefono */
.sticky { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translateY(160%); transition: transform .25s ease; }
.sticky.show { transform: none; }
.sticky .btn { width: 100%; }
@media (min-width: 900px) { .sticky { display: none; } }

/* ---------- consenso ---------- */
.cc { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.cc-in { pointer-events: auto; max-width: 980px; margin: 0 auto; background: var(--paper); border: 3px solid var(--ink);
  border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: 18px 18px 16px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; }
.cc-copy { flex: 1 1 340px; min-width: 0; }
.cc h2 { font: 700 21px/1.2 var(--display); }
.cc p { font-size: 15px; color: var(--body); margin-top: 6px; }
.cc p a { font-weight: 900; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cc-actions .btn { min-height: 48px; font-size: 17px; min-width: 132px; }
@media (max-width: 560px) {
  .cc-actions { width: 100%; }
  .cc-actions .btn { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .cc-actions .linkish { flex: 1 1 100%; text-align: center; }
}
dialog.prefs { width: min(520px, calc(100vw - 24px)); max-height: min(88vh, 680px); padding: 0; border: 3px solid var(--ink);
  border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 8px 0 var(--ink); }
dialog.prefs::backdrop { background: rgba(23, 26, 33, .5); }
.prefs-in { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.prefs header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.prefs h2 { font: 700 24px/1.15 var(--display); }
.prefs .lead2 { font-size: 15px; color: var(--body); }
.cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cats li { border: 2.5px solid var(--ink); border-radius: 16px; padding: 14px; background: var(--cream); }
.cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cat-head b { font: 700 18px/1.2 var(--display); }
.cats p { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.pill { font-size: 12px; font-weight: 900; padding: 5px 10px; border-radius: 999px; border: 2px solid var(--ink); background: var(--off); white-space: nowrap; }
.switch { position: relative; display: inline-flex; width: 54px; height: 32px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .sl { position: absolute; inset: 0; border-radius: 999px; border: 2.5px solid var(--ink); background: var(--off); transition: background .15s ease; }
.switch .sl::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--ink); transition: transform .15s ease; }
.switch input:checked + .sl { background: var(--green); }
.switch input:checked + .sl::before { transform: translateX(22px); }
.switch input:focus-visible + .sl { outline: 3px solid var(--blue); outline-offset: 2px; }
.prefs-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.prefs-actions .btn { min-height: 48px; font-size: 17px; flex: 1 1 140px; }

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

/* ---------- 404 ---------- */
.nf { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 56px; padding: 32px var(--gutter); text-align: center; }
.nf-card { position: relative; max-width: 520px; padding: 48px 28px 32px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.nf-card h1 { font-size: clamp(32px, 6vw, 44px); }
.nf-card p { color: var(--body); }
.nf-card .cta-row { justify-content: center; margin-top: 6px; }
.die.nf-die { top: -40px; left: 50%; width: 76px; margin-left: -38px; transform: rotate(12deg); }
.nf-foot { font-size: 14px; color: var(--text-2); }
