/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[13].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"src/app/crea-la-tua-favola-della-buonanotte/layout.tsx","import":"Fredoka","arguments":[{"variable":"--font-kids","subsets":["latin"],"weight":["400","500","600","700"]}],"variableName":"fredoka"} ***!
  \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* hebrew */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/3e5302f118d6bde7-s.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* latin-ext */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/bb36247b0b027bd1-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/bca7023bf625e650-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* hebrew */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/3e5302f118d6bde7-s.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* latin-ext */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/bb36247b0b027bd1-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/bca7023bf625e650-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* hebrew */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/3e5302f118d6bde7-s.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* latin-ext */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/bb36247b0b027bd1-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/bca7023bf625e650-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* hebrew */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/3e5302f118d6bde7-s.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
/* latin-ext */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/bb36247b0b027bd1-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/_next/static/media/bca7023bf625e650-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Fredoka Fallback';src: local("Arial");ascent-override: 95.64%;descent-override: 23.17%;line-gap-override: 0.00%;size-adjust: 101.84%
}.__className_a21090 {font-family: 'Fredoka', 'Fredoka Fallback';font-style: normal
}.__variable_a21090 {--font-kids: 'Fredoka', 'Fredoka Fallback'
}

/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[13].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"src/app/crea-la-tua-favola-della-buonanotte/layout.tsx","import":"Playball","arguments":[{"variable":"--font-fiaba","subsets":["latin"],"weight":"400"}],"variableName":"playball"} ***!
  \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* vietnamese */
@font-face {
  font-family: 'Playball';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/49b7abf1b3b10221-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Playball';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/aacaa07f4c4d1ce9-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Playball';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/93ed22edef6e70f7-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Playball Fallback';src: local("Arial");ascent-override: 110.87%;descent-override: 35.01%;line-gap-override: 0.00%;size-adjust: 85.69%
}.__className_ef9fc7 {font-family: 'Playball', 'Playball Fallback';font-weight: 400;font-style: normal
}.__variable_ef9fc7 {--font-fiaba: 'Playball', 'Playball Fallback'
}

/*!*******************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./src/app/kids/kids.css ***!
  \*******************************************************************************************************************************************************************************************************************************************************************/
/* Kids App M3mora: animazioni e stile "app nativa" (solo sotto /kids). */

.kids-app {
  font-family: var(--font-kids), ui-rounded, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
.kids-app input,
.kids-app textarea {
  -webkit-user-select: text;
  user-select: text;
}
.kids-sicuro-alto {
  padding-top: max(env(safe-area-inset-top), 0.75rem);
}
.kids-sicuro-basso {
  padding-bottom: max(env(safe-area-inset-bottom), 0.75rem);
}

.kids-avatar-respira {
  animation: kids-respira 3.2s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes kids-respira {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-4px) scale(1.01, 0.99); }
}
.kids-avatar-saluta {
  animation: kids-saluta 2.4s ease-in-out infinite;
}
@keyframes kids-saluta {
  0%, 55%, 100% { transform: rotate(0deg); }
  65% { transform: rotate(-16deg); }
  75% { transform: rotate(10deg); }
  85% { transform: rotate(-12deg); }
}
.kids-avatar-occhi {
  animation: kids-sbatti 4.5s infinite;
}
@keyframes kids-sbatti {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}
.kids-fiamma {
  animation: kids-fiamma 0.25s ease-in-out infinite alternate;
  transform-origin: 50% 0;
  transform-box: fill-box;
}
@keyframes kids-fiamma {
  from { transform: scaleY(0.7); opacity: 0.8; }
  to { transform: scaleY(1.2); opacity: 1; }
}
.kids-bacchetta {
  animation: kids-bacchetta 1.6s ease-in-out infinite;
  transform-origin: 52px 188px;
}
@keyframes kids-bacchetta {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-12deg); }
}
.kids-animale {
  animation: kids-saltello 1.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
@keyframes kids-saltello {
  0%, 60%, 100% { transform: translateY(0); }
  70% { transform: translateY(-14px) rotate(-6deg); }
  80% { transform: translateY(0); }
}

.kids-galleggia {
  animation: kids-galleggia 4s ease-in-out infinite;
}
@keyframes kids-galleggia {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}
.kids-dondola {
  animation: kids-dondola 2.2s ease-in-out infinite;
}
@keyframes kids-dondola {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}
.kids-pulsa {
  animation: kids-pulsa 1.6s ease-in-out infinite;
}
@keyframes kids-pulsa {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
/* Entrata morbida: solo dissolvenza e un leggerissimo zoom, niente salti dal basso. */
.kids-entra {
  animation: kids-entra 0.25s ease-out both;
}
@keyframes kids-entra {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: none; }
}
.kids-premi:active {
  transform: scale(0.94);
}
/* Il dito che invita a toccare un pulsante non ancora scoperto: piccola spinta + cerchio che si espande. */
.kids-dito-tocca { animation: kids-dito-tocca 1.3s ease-in-out infinite; }
@keyframes kids-dito-tocca {
  0%, 18% { transform: translate(0, 0) scale(1); }
  32% { transform: translate(-8%, 10%) scale(0.88); }
  46%, 100% { transform: translate(0, 0) scale(1); }
}
.kids-dito-onda { animation: kids-dito-onda 1.3s ease-in-out infinite; }
@keyframes kids-dito-onda {
  0%, 30% { transform: scale(0.6); opacity: 0; }
  42% { transform: scale(1); opacity: 0.7; }
  60%, 100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .kids-dito-tocca, .kids-dito-onda { animation: none; } }
/* ═══════════ Il video "attivo" della casa ═══════════ */
.kids-luccica { animation: kids-luccica 2.4s ease-in-out infinite; }
@keyframes kids-luccica {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.15); }
}
.kids-ruota-lento { animation: kids-ruota-lento 18s linear infinite; }
@keyframes kids-ruota-lento { to { transform: rotate(360deg); } }
.kids-piove { animation: kids-piove 2.2s ease-in infinite; }
@keyframes kids-piove {
  0% { opacity: 0; transform: translateY(-20px) rotate(0deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translateY(260px) rotate(200deg); }
}
.kids-avanza { width: 0; animation: kids-avanza linear forwards; }
@keyframes kids-avanza { to { width: 100%; } }
.kids-azione-rapida { animation: kids-azione-rapida 2.6s ease-in-out infinite; }
@keyframes kids-azione-rapida {
  0%, 100% { box-shadow: 0 10px 22px -8px rgba(0,0,0,0.5), 0 0 0 0 rgba(251,191,36,0.55); }
  50% { box-shadow: 0 10px 22px -8px rgba(0,0,0,0.5), 0 0 0 7px rgba(251,191,36,0); }
}
@media (prefers-reduced-motion: reduce) {
  .kids-luccica, .kids-ruota-lento, .kids-piove, .kids-azione-rapida { animation: none; }
}

/* Il fumetto-nuvoletta di Lia: entra con un piccolo "pop" per farsi notare dai bimbi. */
.kids-pop-fumetto {
  animation: kids-pop-fumetto 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes kids-pop-fumetto {
  0% { opacity: 0; transform: scale(0.75); }
  60% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

/* Le cose che volano via quando si tocca l'amico (baci, cuori, arcobaleni…) */
.kids-vola {
  position: fixed;
  pointer-events: none;
  z-index: 80;
  animation: kids-vola 1.6s ease-out forwards;
}
@keyframes kids-vola {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  15% { opacity: 1; transform: translate(calc(var(--dx) * 0.2), calc(var(--dy) * 0.2)) scale(1.2); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.9) rotate(var(--rot)); }
}

/* Coriandoli */
.kids-coriandolo {
  position: fixed;
  top: -20px;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 90;
  animation: kids-cadi linear forwards;
}
@keyframes kids-cadi {
  to { transform: translateY(110vh) rotate(720deg); }
}

/* Le orecchie della TV */
.kids-orecchio {
  animation: kids-orecchio 2.6s ease-in-out infinite;
}
@keyframes kids-orecchio {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-10deg); }
}
.kids-orecchio-dx {
  animation-delay: 0.4s;
}

/* Intro dei M3moriani */
.kids-cammina {
  animation: kids-cammina 0.5s ease-in-out infinite alternate;
}
@keyframes kids-cammina {
  from { transform: translateY(0) rotate(-3deg); }
  to { transform: translateY(-6px) rotate(3deg); }
}
.kids-spazzola {
  animation: kids-spazzola 0.25s ease-in-out infinite alternate;
}
@keyframes kids-spazzola {
  from { transform: translateX(-6px); }
  to { transform: translateX(6px); }
}
.kids-bolla {
  animation: kids-bolla 2.4s ease-in infinite;
}
@keyframes kids-bolla {
  from { transform: translateY(0); opacity: 0.9; }
  to { transform: translateY(-120px); opacity: 0; }
}
.kids-nuvola {
  animation: kids-nuvola 18s linear infinite;
}
@keyframes kids-nuvola {
  from { transform: translateX(-30%); }
  to { transform: translateX(130%); }
}
.kids-strada {
  animation: kids-strada 1.2s linear infinite;
}
@keyframes kids-strada {
  from { background-position: 0 0; }
  to { background-position: -80px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .kids-app *,
  .kids-app *::before,
  .kids-app *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@keyframes kids-barra {
  from { width: 0%; }
  to { width: 100%; }
}

/* L'app sta ferma come un'app vera: niente spostamenti di lato, niente zoom.
   Niente "overscroll-behavior: none" qui: su Android blocca del tutto lo scorrimento verticale
   delle stanze (bug noto di Chrome quando questa proprietà sta su un antenato della pagina che scorre davvero). */
html:has(.kids-app),
html:has(.kids-app) body {
  overflow-x: hidden;
  max-width: 100%;
}
.kids-app {
  overflow-x: clip;
  max-width: 100vw;
}
.kids-app img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* Il salto vero di un M3moriano quando è da solo: si accovaccia, salta, atterra morbido. */
.kids-salterello {
  animation: kids-salterello 3.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes kids-salterello {
  0%, 46%, 100% { transform: translateY(0) rotate(0deg) scale(1, 1); }
  52% { transform: translateY(3px) rotate(0deg) scale(1.06, 0.92); }
  64% { transform: translateY(-22px) rotate(-5deg) scale(0.97, 1.05); }
  76% { transform: translateY(-20px) rotate(4deg) scale(0.97, 1.05); }
  88% { transform: translateY(0) rotate(0deg) scale(1.05, 0.93); }
}

/* I gesti che un M3moriano fa da solo, prima che tu tocchi una stanza: arcobaleni, bacini, cuoricini… */
.kids-gesto {
  position: absolute;
  pointer-events: none;
  animation: kids-gesto 1.5s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}
@keyframes kids-gesto {
  0% { opacity: 0; transform: translateY(6px) scale(0.3) rotate(-8deg); }
  22% { opacity: 1; transform: translateY(-6px) scale(1.15) rotate(6deg); }
  70% { opacity: 1; transform: translateY(-22px) scale(1) rotate(-4deg); }
  100% { opacity: 0; transform: translateY(-38px) scale(0.85) rotate(4deg); }
}

/* Il timbro dell'M3moriano che si stampa sul foglio dei compiti */
.kids-timbro {
  animation: kids-timbro 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes kids-timbro {
  0% { opacity: 0; transform: scale(2.4); }
  60% { opacity: 1; transform: scale(0.88); }
  100% { opacity: 1; transform: scale(1); }
}

/* ═══════════ La barra a card in basso (come nella prova Kids sul sito) ═══════════ */
.kids-app { --kids-barra: max(env(safe-area-inset-bottom), 0.6rem); }
.kids-barra-riga { scrollbar-width: none; touch-action: pan-x; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.kids-barra-riga::-webkit-scrollbar { display: none; }
/* Stanza adattata allo schermo: niente altezza minima né grande spazio in fondo, così si misura il contenuto vero
   e lo zoom la rimpicciolisce quanto basta per vederla tutta senza scorrere. */
.kids-adatta > * { min-height: 0 !important; padding-bottom: max(env(safe-area-inset-bottom), 0.75rem) !important; }
.kids-card-nav { min-height: 82px; transition: transform 0.3s cubic-bezier(0.25, 1.5, 0.4, 1), box-shadow 0.3s ease, background 0.3s ease; }
/* Le card stanno ferme: si muovono solo quando le tocchi (vedi .kids-premi:active). */
.kids-card-accesa { transform: translateY(-4px); }
@keyframes kids-card-accesa {
  0% { transform: translateY(0) scale(0.9); }
  55% { transform: translateY(-7px) scale(1.08) rotate(-2deg); }
  100% { transform: translateY(-4px) scale(1); }
}

@keyframes kids-card-emoji {
  0% { transform: scale(0.6) rotate(-20deg); }
  60% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}
.kids-card-invito { animation: none; }
@keyframes kids-card-invito {
  0%, 100% { transform: none; box-shadow: 0 0 0 0 rgb(255 255 255 / 0); }
  50% { transform: translateY(-2px) scale(1.04); box-shadow: 0 0 0 3px rgb(255 255 255 / 0.35); }
}
.kids-suggerimento { animation: kids-suggerimento-entra 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes kids-suggerimento-entra {
  from { opacity: 0; transform: translate(-50%, 14px) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* ═══════════ I riquadri della casa: entrano saltellando uno dopo l'altro, l'emoji ogni tanto si scuote ═══════════ */
.kids-riquadro { transition: transform 0.2s cubic-bezier(0.25, 1.5, 0.4, 1); }
@keyframes kids-riquadro-entra {
  from { opacity: 0; }
  to { opacity: 1; }
}
.kids-riquadro-emoji { animation: none; }
@keyframes kids-riquadro-emoji {
  0%, 78%, 100% { transform: none; }
  84% { transform: scale(1.18) rotate(-12deg); }
  90% { transform: scale(1.12) rotate(10deg); }
  95% { transform: scale(1.05) rotate(-4deg); }
}

/* ═══════════ Cambio pagina: dissolvenza con un piccolo scorrimento laterale ═══════════ */
.kids-cambio-avanti, .kids-cambio-indietro { animation: none; }
@keyframes kids-cambio-avanti {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes kids-cambio-indietro {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: none; }
}
/* Ogni pagina si apre dall'inizio, subito: niente scorrimento animato dal fondo. */
html:has(.kids-app) { scroll-behavior: auto !important; }

/* ═══════════ Ogni tocco: un'onda di colore; sui tasti scoppiano le emoji ═══════════ */
.kids-onda {
  position: fixed;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle, rgb(236 72 153 / 0.55), rgb(139 92 246 / 0) 70%);
  animation: kids-onda 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes kids-onda {
  from { transform: translate(-50%, -50%) scale(0.2); opacity: 0.8; }
  to { transform: translate(-50%, -50%) scale(5); opacity: 0; }
}
.kids-scoppio {
  position: fixed;
  line-height: 1;
  animation: kids-scoppio 0.85s cubic-bezier(0.15, 0.8, 0.3, 1) forwards;
}
@keyframes kids-scoppio {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15) rotate(25deg); opacity: 0; }
}

/* ═══════════ Parla con Lia: palco a colori che si muove piano (stile assistenti IA) ═══════════ */
.lia-palco { background: linear-gradient(180deg, #fef3c7 0%, #fbcfe8 45%, #ddd6fe 100%); }
.lia-aurora { position: absolute; border-radius: 999px; filter: blur(42px); opacity: 0.75; pointer-events: none; }
.lia-aurora-1 { width: 18rem; height: 18rem; left: -5rem; top: 2rem; background: #facc15; animation: lia-aurora 9s ease-in-out infinite; }
.lia-aurora-2 { width: 16rem; height: 16rem; right: -5rem; top: 9rem; background: #f472b6; animation: lia-aurora 11s ease-in-out -3s infinite reverse; }
.lia-aurora-3 { width: 20rem; height: 20rem; left: 15%; bottom: -6rem; background: #60a5fa; animation: lia-aurora 13s ease-in-out -6s infinite; }
@keyframes lia-aurora {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2.5rem, -1.5rem) scale(1.15); }
  66% { transform: translate(-1.5rem, 1.5rem) scale(0.9); }
}
.lia-anello {
  background: conic-gradient(from 0deg, #facc15, #f472b6, #a78bfa, #38bdf8, #4ade80, #facc15);
  opacity: 0.35;
  filter: blur(10px);
  transition: transform 0.12s linear;
  animation: lia-gira 8s linear infinite;
}
.lia-anello-2 { opacity: 0.25; animation-duration: 5s; animation-direction: reverse; }
.lia-anello-parla { opacity: 0.6; animation: lia-gira 2.5s linear infinite, lia-respiro 0.9s ease-in-out infinite; }
.lia-anello-pensa { opacity: 0.5; animation: lia-gira 1.2s linear infinite; }
@keyframes lia-gira { to { rotate: 360deg; } }
@keyframes lia-respiro {
  0%, 100% { scale: 1; }
  50% { scale: 1.12; }
}
.lia-parla { animation: lia-parla 0.45s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes lia-parla {
  from { transform: translateY(0) scale(1, 1); }
  to { transform: translateY(-5px) scale(1.03, 0.98); }
}
.lia-microfono { animation: lia-microfono 2.2s ease-in-out infinite; }
@keyframes lia-microfono {
  0%, 100% { box-shadow: 0 0 0 0 rgb(168 85 247 / 0.45), 0 20px 40px -12px rgb(124 58 237 / 0.7); }
  50% { box-shadow: 0 0 0 16px rgb(168 85 247 / 0), 0 20px 40px -12px rgb(124 58 237 / 0.7); }
}

@media (prefers-reduced-motion: reduce) {
  .kids-card-accesa, .kids-card-accesa .kids-card-emoji, .kids-card-invito, .kids-cambio-avanti, .kids-cambio-indietro,
  .kids-onda, .kids-scoppio, .kids-riquadro, .kids-riquadro-emoji, .lia-aurora, .lia-anello, .lia-parla, .lia-microfono, .kids-suggerimento { animation: none; }
}

/* ═══════════ Il corpo umano: battito, respiro, navicella di Tobi ═══════════ */
.corpo-battito { animation: corpo-battito var(--battito, 0.85s) ease-in-out infinite; }
@keyframes corpo-battito {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.2); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  60% { transform: scale(1); }
}
.corpo-respira { animation: corpo-respira 3.2s ease-in-out infinite; }
@keyframes corpo-respira {
  0%, 100% { transform: scale(0.88); }
  50% { transform: scale(1.16); }
}
.corpo-trema { animation: corpo-trema 0.4s ease-in-out; }
@keyframes corpo-trema {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ═══════════ La scritta che scorre sul video in testata, come i titoli di una TV ═══════════ */
.kids-marquee { display: inline-block; animation: kids-marquee 13s linear infinite; }
@keyframes kids-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Il trill (ti penso 💭): cuori che salgono su tutto lo schermo */
@keyframes kids-trill-cuore {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-105dvh) scale(1.3) rotate(20deg); opacity: 0; }
}
.kids-trill-cuore {
  animation: kids-trill-cuore 2.6s ease-in infinite;
}

/* ═══════════ Il pupazzo della prima pagina: tranquillo, si guarda intorno e manda baci ═══════════ */
.kids-pupazzo-guarda { transform-origin: 50% 92%; }
@keyframes kids-pupazzo-guarda {
  0%, 18%, 100% { transform: rotate(0deg) translateX(0); }
  28%, 40% { transform: rotate(-3.5deg) translateX(-1.5%); }
  52%, 62% { transform: rotate(0deg) translateX(0); }
  72%, 84% { transform: rotate(3.5deg) translateX(1.5%); }
}
.kids-pupazzo-bacio { animation: kids-pupazzo-bacio 1.1s ease-in-out both; transform-origin: 50% 92%; }
@keyframes kids-pupazzo-bacio {
  0%, 100% { transform: scale(1) rotate(0deg); }
  30%, 60% { transform: scale(1.04) rotate(-4deg); }
}
.kids-bacio-vola { opacity: 0; animation: kids-bacio-vola 1.6s ease-out both; }
@keyframes kids-bacio-vola {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  20% { opacity: 1; transform: translate(6px, -6px) scale(1.15); }
  100% { opacity: 0; transform: translate(34px, -46px) scale(0.9) rotate(12deg); }
}
/* Coriandoli che cadono SOLO dentro la card del personaggio (la card li taglia col suo "overflow-hidden"). */
.kids-coriandolo-card {
  top: -14px;
  width: 8px;
  height: 11px;
  border-radius: 2px;
  animation: kids-cadi-card linear forwards;
}
@keyframes kids-cadi-card {
  to { transform: translateY(260px) rotate(540deg); }
}
@media (prefers-reduced-motion: reduce) {
  .kids-pupazzo-guarda, .kids-pupazzo-bacio, .kids-bacio-vola, .kids-coriandolo-card { animation-duration: 0.01ms; }
}

/* ═══════════ Effetti delle card (metallo) e favole della buonanotte ═══════════ */
.kids-riflesso { animation: kids-riflesso 3.2s ease-in-out infinite; }
@keyframes kids-riflesso {
  0% { background-position: 120% 0; }
  60%, 100% { background-position: -120% 0; }
}
.favola-stella { animation: favola-stella 2.6s ease-in-out infinite; }
@keyframes favola-stella {
  0%, 100% { opacity: 0.25; transform: scale(0.75); }
  50% { opacity: 1; transform: scale(1.1); }
}
.favola-onda { animation: favola-onda 1.6s ease-out infinite; }
@keyframes favola-onda {
  from { transform: scale(1); opacity: 0.55; }
  to { transform: scale(1.9); opacity: 0; }
}
.favola-tv:focus-visible, .favola-tv:hover {
  outline: none;
  transform: scale(1.04);
  box-shadow: 0 0 0 4px #fde68a, 0 0 28px 6px rgba(250, 204, 21, 0.75), 0 0 60px 12px rgba(129, 140, 248, 0.6);
}
@media (prefers-reduced-motion: reduce) {
  .kids-riflesso, .favola-stella, .favola-onda { animation: none; }
}

/* ───── Card superiore: cartone animato giorno/notte e videomessaggio ───── */
.scena-sorge { animation: scena-sorge 2.2s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes scena-sorge { from { transform: translateY(70px) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.scena-nuvola { animation: scena-nuvola 40s linear infinite; }
@keyframes scena-nuvola { from { transform: translateX(-120px); } to { transform: translateX(110vw); } }
.scena-farfalla { animation: scena-farfalla 7s ease-in-out infinite; }
@keyframes scena-farfalla {
  0%, 100% { transform: translate(0, 0) rotate(-8deg) scaleX(1); }
  25% { transform: translate(28px, -14px) rotate(8deg) scaleX(0.7); }
  50% { transform: translate(52px, 4px) rotate(-4deg) scaleX(1); }
  75% { transform: translate(22px, 12px) rotate(10deg) scaleX(0.7); }
}
.scena-cadente { opacity: 0; transform-origin: right center; animation: scena-cadente 7s ease-in infinite; }
@keyframes scena-cadente {
  0%, 80% { opacity: 0; transform: translate(0, 0) rotate(-25deg); }
  84% { opacity: 1; }
  100% { opacity: 0; transform: translate(-140px, 60px) rotate(-25deg); }
}
.scena-altalena { transform-origin: top center; animation: scena-altalena 3.6s ease-in-out infinite; }
@keyframes scena-altalena { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
.scena-arriva { animation: scena-arriva 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
@keyframes scena-arriva { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.scena-fumetto { animation: scena-fumetto 1.4s ease-in-out infinite; }
@keyframes scena-fumetto { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.05); } }
.scena-busta { animation: scena-busta 1.1s ease-in-out infinite; }
@keyframes scena-busta {
  0%, 100% { transform: scale(1) rotate(-4deg); filter: brightness(1); }
  50% { transform: scale(1.14) rotate(4deg); filter: brightness(1.25); }
}
@media (prefers-reduced-motion: reduce) {
  .scena-sorge, .scena-nuvola, .scena-farfalla, .scena-cadente, .scena-altalena, .scena-arriva, .scena-fumetto, .scena-busta { animation: none; }
  .scena-cadente { display: none; }
}

/* ═══════════ Lia toccata: sorride e lancia baci, stelle e arcobaleni ═══════════ */
.kids-felice { animation: kids-felice 1.1s cubic-bezier(.3,1.6,.5,1) both; transform-origin: 50% 100%; }
@keyframes kids-felice {
  0% { transform: scale(1) translateY(0); }
  20% { transform: scale(1.08, 0.9) translateY(4px); }
  45% { transform: scale(0.95, 1.08) translateY(-22px) rotate(-4deg); }
  70% { transform: scale(1.04, 0.97) translateY(-8px) rotate(3deg); }
  100% { transform: scale(1) translateY(0) rotate(0); }
}
.kids-sorriso-pop { animation: kids-sorriso-pop 1.8s ease-out both; }
@keyframes kids-sorriso-pop {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.3); }
  18% { opacity: 1; transform: translate(-50%, -6px) scale(1.25); }
  35% { transform: translate(-50%, 0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -14px) scale(0.9); }
}
.kids-scoppio { animation: kids-scoppio 1.5s cubic-bezier(.15,.7,.35,1) both; }
@keyframes kids-scoppio {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(0); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15) rotate(var(--giro)); }
}
@media (prefers-reduced-motion: reduce) {
  .kids-felice, .kids-sorriso-pop, .kids-scoppio { animation-duration: 0.01ms; }
}

/* ───────── I cuccioli di M3mora ───────── */
.cucciolo-respira { animation: cucciolo-respira 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes cucciolo-respira { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, 0.975); } }
.cucciolo-salta { animation: cucciolo-salta 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) 3; transform-origin: 50% 100%; }
@keyframes cucciolo-salta { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-22%) scale(0.96, 1.05); } 75% { transform: translateY(0) scale(1.06, 0.94); } }
.cucciolo-coccola { animation: cucciolo-coccola 0.45s ease-in-out 4; transform-origin: 50% 100%; }
@keyframes cucciolo-coccola { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-6deg) scale(1.04); } 75% { transform: rotate(6deg) scale(1.04); } }
.cucciolo-triste { animation: cucciolo-triste 3.5s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes cucciolo-triste { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(2deg) translateY(2%); } }
.cucciolo-sale { animation: cucciolo-sale 1.6s ease-out forwards; }
@keyframes cucciolo-sale { 0% { opacity: 0; transform: translateY(0) scale(0.6); } 15% { opacity: 1; transform: translateY(-10%) scale(1.15); } 100% { opacity: 0; transform: translateY(-220%) scale(0.9); } }
.cucciolo-angelo { animation: cucciolo-angelo 4s ease-in-out infinite; }
@keyframes cucciolo-angelo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6%); } }
.cucciolo-ala-sx { animation: cucciolo-ala-sx 1.4s ease-in-out infinite; transform-origin: 100% 60%; }
.cucciolo-ala-dx { animation: cucciolo-ala-dx 1.4s ease-in-out infinite; transform-origin: 0% 60%; }
@keyframes cucciolo-ala-sx { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(-14deg); } }
@keyframes cucciolo-ala-dx { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(14deg); } }
.cucciolo-zzz { animation: cucciolo-zzz 2.4s ease-in-out infinite; }
@keyframes cucciolo-zzz { 0% { opacity: 0; transform: translate(0, 0) scale(0.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(40%, -160%) scale(1.2); } }

/* ───────── Cuccioli: macchina a stati delle animazioni (IDLE, EATING, DRINKING, BATHING, SLEEPING, PLAYING…) ───────── */
.pet-corpo { transform-origin: 50% 100%; will-change: transform; }
.pet-idle { animation: cucciolo-respira 2.6s ease-in-out infinite; }
/* A riposo ogni animale si muove a modo suo: coda, orecchie, ali… solo con transform, leggere e in loop. */
.pet-idle-cane { animation: pet-idle-cane 3.2s ease-in-out infinite; }
@keyframes pet-idle-cane {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  8% { transform: translateY(0) rotate(-3deg); }
  16% { transform: translateY(0) rotate(3deg); }
  24% { transform: translateY(0) rotate(-3deg); }
  32% { transform: translateY(0) rotate(0deg); }
  70% { transform: translateY(-1.5%) rotate(0deg); }
  78% { transform: translateY(-1.5%) rotate(5deg); }
  86% { transform: translateY(0) rotate(0deg); }
}
.pet-idle-gatto { animation: pet-idle-gatto 4.6s ease-in-out infinite; }
@keyframes pet-idle-gatto {
  0%, 100% { transform: rotate(0deg) scale(1, 1); }
  18% { transform: rotate(-2deg) scale(1, 1); }
  36% { transform: rotate(2deg) scale(1, 1); }
  52% { transform: rotate(0deg) scale(1, 1); }
  68% { transform: rotate(0deg) scale(1.025, 0.975); }
  76% { transform: rotate(0deg) scale(1, 1); }
  88% { transform: rotate(3deg) scale(1, 1); }
  94% { transform: rotate(0deg) scale(1, 1); }
}
.pet-idle-maialino { animation: pet-idle-maialino 2.8s ease-in-out infinite; }
@keyframes pet-idle-maialino {
  0%, 100% { transform: translateY(0) scale(1, 1) rotate(0deg); }
  22% { transform: translateY(-1.2%) scale(1.018, 0.982) rotate(0deg); }
  44% { transform: translateY(0) scale(1, 1) rotate(0deg); }
  62% { transform: translateY(0) scale(1, 1) rotate(-3deg); }
  68% { transform: translateY(0) scale(1, 1) rotate(3deg); }
  74% { transform: translateY(0) scale(1, 1) rotate(0deg); }
}
.pet-idle-coniglio { animation: pet-idle-coniglio 3.6s ease-in-out infinite; }
@keyframes pet-idle-coniglio {
  0%, 100% { transform: translateY(0) scale(1, 1) rotate(0deg); }
  10% { transform: translateY(0) scale(1, 1) rotate(4deg); }
  16% { transform: translateY(0) scale(1, 1) rotate(-4deg); }
  22% { transform: translateY(0) scale(1, 1) rotate(0deg); }
  60% { transform: translateY(0) scale(1, 1) rotate(0deg); }
  66% { transform: translateY(-11%) scale(1.06, 0.92) rotate(0deg); }
  72% { transform: translateY(-13%) scale(0.97, 1.05) rotate(0deg); }
  80% { transform: translateY(0) scale(1.05, 0.95) rotate(0deg); }
  86% { transform: translateY(0) scale(1, 1) rotate(0deg); }
}
.pet-idle-uccellino { animation: pet-idle-uccellino 1.4s ease-in-out infinite; }
@keyframes pet-idle-uccellino {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-4.5%) scale(1.045, 0.96); }
}
.pet-idle-topolino { animation: pet-idle-topolino 2.4s ease-in-out infinite; }
@keyframes pet-idle-topolino {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  8% { transform: translateX(0) rotate(-3deg); }
  12% { transform: translateX(0) rotate(3deg); }
  16% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(1.8%) rotate(0deg); }
  58% { transform: translateX(-1.8%) rotate(0deg); }
  66% { transform: translateX(0) rotate(0deg); }
}
.pet-saltello { animation: pet-saltello 0.9s cubic-bezier(0.3, 1.5, 0.5, 1) 1; }
@keyframes pet-saltello { 0%, 100% { transform: translateY(0) scale(1); } 20% { transform: translateY(0) scale(1.08, 0.9); } 50% { transform: translateY(-12%) scale(0.95, 1.06); } 80% { transform: translateY(0) scale(1.06, 0.94); } }
.pet-dondola { animation: pet-dondola 1.2s ease-in-out 2; }
@keyframes pet-dondola { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.pet-mastica { animation: pet-mastica 0.32s ease-in-out infinite; }
@keyframes pet-mastica { 0%, 100% { transform: rotate(calc(var(--lato, 1) * 5deg)) scale(1, 1); } 50% { transform: rotate(calc(var(--lato, 1) * 7deg)) translateY(1.5%) scale(1.03, 0.95); } }
.pet-ingoia { animation: pet-ingoia 0.7s ease-in-out 1; }
@keyframes pet-ingoia { 0%, 100% { transform: scale(1); } 30% { transform: scale(0.94, 1.08); } 60% { transform: scale(1.08, 0.93); } }
.pet-beve { animation: pet-beve 0.5s ease-in-out infinite; }
@keyframes pet-beve { 0%, 100% { transform: rotate(calc(var(--lato, 1) * 8deg)) translateY(2%); } 50% { transform: rotate(calc(var(--lato, 1) * 12deg)) translateY(5%) scale(1.02, 0.96); } }
.pet-bagno { animation: pet-bagno 0.6s ease-in-out infinite; }
@keyframes pet-bagno { 0%, 100% { transform: rotate(-2deg) scale(1.01, 0.99); } 50% { transform: rotate(2deg) scale(0.99, 1.01); } }
.pet-scrolla { animation: pet-scrolla 0.09s linear 12; }
@keyframes pet-scrolla { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
.pet-sbadiglia { animation: pet-sbadiglia 1.3s ease-in-out 1; }
@keyframes pet-sbadiglia { 0%, 100% { transform: scale(1); } 45% { transform: scale(0.96, 1.1); } 70% { transform: scale(1.04, 0.95); } }
.pet-dorme { animation: pet-dorme 4.2s ease-in-out infinite; }
@keyframes pet-dorme { 0%, 100% { transform: translateY(6%) rotate(-5deg) scale(1.06, 0.86); } 50% { transform: translateY(6%) rotate(-5deg) scale(1.09, 0.83); } }
.pet-gioca { animation: cucciolo-salta 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; }
.pet-coccola { animation: cucciolo-coccola 0.45s ease-in-out infinite; }
.pet-verso { animation: pet-verso 0.3s ease-out 3; }
@keyframes pet-verso { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.1, 1.06) translateY(-3%); } }
.pet-triste { animation: cucciolo-triste 3.5s ease-in-out infinite; }
.pet-gira { transition: transform 0.35s ease; }

/* Particelle: ognuna vola verso (--dx, --dy) in --t secondi */
.part { position: absolute; pointer-events: none; transform: translate(-50%, -50%); animation: part-vola var(--t, 1.2s) var(--curva, ease-out) forwards; }
@keyframes part-vola {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(calc(var(--s, 1) * 0.4)) rotate(0); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -60px))) scale(var(--s, 1)) rotate(var(--r, 0deg)); }
}
.bolla { position: absolute; pointer-events: none; border-radius: 9999px; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95) 0 12%, rgba(255,255,255,0.15) 30%, rgba(186,230,253,0.25) 60%, rgba(244,114,182,0.35) 85%, rgba(255,255,255,0.7) 100%); box-shadow: inset 0 0 6px rgba(255,255,255,0.8); animation: bolla-sale var(--t, 2.6s) ease-out forwards; }
@keyframes bolla-sale {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.3); }
  10% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  35% { transform: translate(calc(-50% + 10px), -60px) scale(1); }
  65% { transform: translate(calc(-50% - 10px), -130px) scale(1.05); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -200px) scale(1.3); }
}
.schiuma { position: absolute; pointer-events: none; border-radius: 9999px; transform: translate(-50%, -50%); background: radial-gradient(circle at 35% 35%, #fff 0 45%, #f0f9ff 60%, rgba(224,242,254,0.85) 100%); box-shadow: 0 2px 6px rgba(14,165,233,0.25), inset -3px -3px 6px rgba(186,230,253,0.8); animation: schiuma-appare 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }
@keyframes schiuma-appare { 0% { transform: translate(-50%, -50%) scale(0); } 100% { transform: translate(-50%, -50%) scale(1); } }
.schiuma-via { animation: schiuma-via 1.3s ease-in forwards; }
@keyframes schiuma-via { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, 140%) scale(0.6); } }
.goccia-doccia { position: absolute; top: 0; width: 3px; height: 18px; border-radius: 9999px; background: linear-gradient(#bae6fd00, #38bdf8); animation: goccia-doccia 0.55s linear infinite; }
@keyframes goccia-doccia { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(var(--caduta, 260px)); opacity: 0.2; } }
.goccia-pelo { position: absolute; width: 9px; height: 13px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 35%, #fff 0 18%, #7dd3fc 45%, #0284c7 100%); opacity: 0.9; animation: goccia-pelo 2.2s ease-in infinite; }
@keyframes goccia-pelo { 0%, 40% { transform: translateY(0) scale(1); opacity: 0.9; } 100% { transform: translateY(60px) scale(0.7); opacity: 0; } }
.spugna { position: absolute; pointer-events: none; transform: translate(-50%, -50%) rotate(-12deg); transition: left 0.06s linear, top 0.06s linear; filter: drop-shadow(0 6px 8px rgba(0,0,0,0.25)); }
.spugna-guida { animation: spugna-guida 2.4s ease-in-out infinite; }
@keyframes spugna-guida { 0%, 100% { transform: translate(-90%, -40%) rotate(-12deg); } 50% { transform: translate(-10%, -60%) rotate(8deg); } }
.cibo-arriva { animation: cibo-arriva 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
@keyframes cibo-arriva { 0% { transform: translate(-50%, -260%) scale(0.6); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.cibo-morso { animation: cibo-morso 0.25s ease-out 1; }
@keyframes cibo-morso { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(0.9) rotate(-6deg); } 100% { transform: translate(-50%, -50%) scale(1); } }
.onda-voce { position: absolute; pointer-events: none; border-radius: 9999px; border: 4px solid rgba(255,255,255,0.9); transform: translate(-50%, -50%); animation: onda-voce 0.9s ease-out forwards; }
@keyframes onda-voce { 0% { width: 10px; height: 10px; opacity: 1; } 100% { width: 160px; height: 160px; opacity: 0; } }
.palla-va { position: absolute; bottom: 8%; animation: palla-va 2.6s ease-in-out 1 forwards; }
@keyframes palla-va { 0% { left: -12%; } 45% { left: 78%; } 100% { left: 108%; } }
.palla-rimbalza { animation: palla-rimbalza 0.52s cubic-bezier(0.5, 0, 0.5, 1) infinite alternate; }
@keyframes palla-rimbalza { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(-140%) rotate(200deg); } }
.notte-velo { transition: opacity 1.2s ease; }

/* ───────── Trova il cucciolo ───────── */
.trova-sbircia { animation: trova-sbircia 2.8s ease-in-out infinite; }
@keyframes trova-sbircia { 0%, 55%, 100% { transform: translate(var(--ox, 0), var(--oy, 0)); } 70%, 85% { transform: translate(calc(var(--ox, 0) + var(--px, 0)), calc(var(--oy, 0) + var(--py, 0))); } }
.trova-scuoti { animation: trova-scuoti 0.45s ease-in-out 1; transform-origin: 50% 100%; }
@keyframes trova-scuoti { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.trova-esce { animation: trova-esce 1s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }
@keyframes trova-esce { 0% { transform: translate(var(--ox, 0), var(--oy, 0)) scale(1); } 60% { transform: translate(0, -45%) scale(1.25); } 100% { transform: translate(0, -25%) scale(1.15); } }
.trova-foglia { animation: part-vola 0.9s ease-out forwards; }

@media (prefers-reduced-motion: reduce) {
  .pet-corpo, .part, .bolla, .goccia-doccia, .goccia-pelo, .trova-sbircia { animation-duration: 0.01s !important; animation-iteration-count: 1 !important; }
}

/* ───── Favola raccontata: scrittura fiabesca, M3moriani sulla nuvola, buonanotte finale ───── */
.fiaba-testo { font-family: var(--font-fiaba), "Snell Roundhand", cursive; color: #f8eed6; text-shadow: 0 0 18px rgba(253, 224, 171, 0.55), 0 2px 0 rgba(120, 72, 20, 0.45); }
.fiaba-entra { animation: fiaba-entra 1.1s ease-out both; }
@keyframes fiaba-entra { from { opacity: 0; transform: translateY(14px) scale(0.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.fiaba-amico { animation: fiaba-amico 0.9s cubic-bezier(0.3, 1.5, 0.5, 1) both, fiaba-galleggia 3.4s ease-in-out 0.9s infinite; }
@keyframes fiaba-amico { from { opacity: 0; transform: translateY(40px) scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes fiaba-galleggia { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.fiaba-polvere { animation: fiaba-polvere 6s linear infinite; }
@keyframes fiaba-polvere { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.fiaba-dondola { animation: fiaba-dondola 3s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes fiaba-dondola { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.fiaba-dorme { transform: rotate(-14deg) translateY(4px); transition: transform 0.5s ease; }
.fiaba-reazione { animation: fiaba-reazione 1.9s ease-out forwards; }
@keyframes fiaba-reazione { 0% { opacity: 0; transform: translate(-50%, 0) scale(0.4); } 15% { opacity: 1; transform: translate(-50%, -14px) scale(1.15); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -90px) scale(0.9); } }
.fiaba-zzz { animation: fiaba-zzz 2.2s ease-out infinite; }
@keyframes fiaba-zzz { 0% { opacity: 0; transform: translate(0, 0) scale(0.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -34px) scale(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .fiaba-entra, .fiaba-amico, .fiaba-polvere, .fiaba-dondola, .fiaba-zzz { animation: none; }
}

/* ───── Cielo della favola: luna, nuvole, stelle in movimento ───── */
.favola-cielo-gira { animation: favola-cielo-gira 60s ease-in-out infinite alternate; }
@keyframes favola-cielo-gira { from { transform: translate(0, 0); } to { transform: translate(-2.5%, -3%); } }
.favola-stellona { animation: favola-stellona 3.4s ease-in-out infinite; }
@keyframes favola-stellona {
  0%, 100% { opacity: 0.65; transform: scale(0.85) rotate(-8deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(8deg); }
}
.favola-cadente { opacity: 0; transform: rotate(-30deg); animation: favola-cadente 12s ease-in infinite; }
@keyframes favola-cadente {
  0%, 88% { opacity: 0; transform: rotate(-30deg) translateX(0); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: rotate(-30deg) translateX(-260px); }
}
.favola-luna { animation: favola-luna 7s ease-in-out infinite; }
@keyframes favola-luna { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-3deg); } }
.favola-nuvola { animation: favola-nuvola 18s ease-in-out infinite; }
@keyframes favola-nuvola { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5%); } }
.favola-anello { animation: favola-anello 6s linear infinite; }
@keyframes favola-anello { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .favola-cielo-gira, .favola-stellona, .favola-cadente, .favola-luna, .favola-nuvola, .favola-anello { animation: none; }
}
.favola-cade { animation: favola-cade 8s linear infinite; }
@keyframes favola-cade { from { transform: translate(0, 0) rotate(0); } to { transform: translate(30px, 110vh) rotate(240deg); } }
@media (prefers-reduced-motion: reduce) { .favola-cade { animation: none; } }

/* ───── Intro per i genitori (prima apertura) ───── */
.intro-entra { animation: intro-entra 0.7s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
@keyframes intro-entra { from { opacity: 0; transform: translateY(30px) scale(0.85); } to { opacity: 1; transform: none; } }
.intro-testo { animation: intro-testo 0.6s ease-out 0.15s both; }
@keyframes intro-testo { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.intro-bolla { animation: intro-bolla 9s linear infinite; }
@keyframes intro-bolla { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-110vh); opacity: 0; } }
.intro-cuore { animation: intro-cuore 2.4s ease-in-out infinite; }
@keyframes intro-cuore { 0%, 100% { transform: scale(0.9) rotate(-8deg); } 50% { transform: scale(1.2) rotate(8deg); } }
.intro-vola { animation: intro-vola 2.6s ease-in-out infinite; }
@keyframes intro-vola {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
  15% { opacity: 1; }
  70% { transform: translate(90px, 110px) scale(1.1) rotate(15deg); opacity: 1; }
  100% { transform: translate(110px, 140px) scale(0.3); opacity: 0; }
}
.intro-card { animation: intro-card 2.6s ease-in-out infinite; }
@keyframes intro-card { 0%, 65% { transform: scale(1); } 78% { transform: scale(1.08); box-shadow: 0 0 40px 10px rgba(255,255,255,0.6); } 100% { transform: scale(1); } }
.intro-squilla { animation: intro-squilla 1.6s ease-in-out infinite; transform-origin: 50% 20%; }
@keyframes intro-squilla { 0%, 55%, 100% { transform: rotate(0); } 60%, 70%, 80%, 90% { transform: rotate(-12deg); } 65%, 75%, 85%, 95% { transform: rotate(12deg); } }
.intro-premio { animation: intro-premio 2.2s cubic-bezier(0.3, 1.6, 0.5, 1) infinite; }
@keyframes intro-premio { 0%, 60%, 100% { transform: translateY(0) scale(1); } 75% { transform: translateY(-22px) scale(1.15) rotate(-6deg); } }
.intro-barra { animation: intro-barra 2.8s ease-in-out infinite; }
@keyframes intro-barra { 0% { width: 8%; } 70%, 100% { width: 100%; } }
.intro-salta { animation: intro-salta 1.8s ease-in-out infinite; }
@keyframes intro-salta { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } }
.intro-play { animation: intro-play 1.4s ease-in-out infinite; }
@keyframes intro-play { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.intro-scudo { animation: intro-scudo 2.4s ease-in-out infinite; }
@keyframes intro-scudo { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  .intro-entra, .intro-testo, .intro-bolla, .intro-cuore, .intro-vola, .intro-card, .intro-squilla, .intro-premio, .intro-barra, .intro-salta, .intro-play, .intro-scudo { animation: none; }
}

/* I paesaggi disegnati dall'IA nelle favole: entrano in dissolvenza e si muovono piano (zoom e panoramica) */
.fiaba-paesaggio-entra { animation: fiaba-paesaggio-entra 1.6s ease-out both; }
@keyframes fiaba-paesaggio-entra { from { opacity: 0; } to { opacity: 1; } }
.fiaba-paesaggio { animation: fiaba-paesaggio 22s ease-in-out infinite alternate; transform-origin: 50% 60%; }
@keyframes fiaba-paesaggio { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.16) translate(-3%, -2%); } }
@media (prefers-reduced-motion: reduce) { .fiaba-paesaggio, .fiaba-paesaggio-entra { animation: none; } }

/* Android: le griglie piene di personaggi (Amici, Il mio amico, Peluche) restano ferme e leggere, così la pagina non si blocca. */
.kids-android .grid .kids-galleggia,
.kids-android .grid .kids-dondola,
.kids-android .grid .kids-pulsa { animation: none !important; }
.kids-android .grid img.drop-shadow,
.kids-android .grid img.drop-shadow-lg,
.kids-android .grid img.drop-shadow-xl { filter: none !important; }
.kids-android .kids-parata .kids-salterello { animation: none !important; }
.kids-android .kids-parata img { filter: none !important; }

/* Peluche come adesivi che fluttuano: solo transform (leggero), quindi resta acceso anche su Android. */
.kids-adesivo-vola { animation: kids-adesivo-vola 3.2s ease-in-out infinite; will-change: transform; }
@keyframes kids-adesivo-vola {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-9px) rotate(3deg); }
}
/* Uguali su iPhone e Android: adesivi puliti, senza ombra sfocata (pesante e diversa da un telefono all'altro). */
.kids-adesivo-vola img { filter: none !important; }
@media (prefers-reduced-motion: reduce) { .kids-adesivo-vola { animation: none; } }

/* I crediti di Lia: la stella M3 che si consuma vola via, quella nuova entra con un piccolo salto. */
.kids-stella-via {
  animation: kids-stella-via 0.9s ease-out both;
}
@keyframes kids-stella-via {
  0% { transform: scale(1.5) rotate(0deg); filter: brightness(1.4); }
  60% { transform: scale(0.8) translateY(-6px) rotate(-25deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.kids-meno-uno {
  animation: kids-meno-uno 1.3s ease-out both;
}
@keyframes kids-meno-uno {
  0% { opacity: 0; transform: translateY(6px) scale(0.8); }
  20% { opacity: 1; transform: translateY(0) scale(1.1); }
  100% { opacity: 0; transform: translateY(-26px) scale(1); }
}

/* ───── Gioca con il tuo amico: palloncini che salgono e scoppiano ───── */
.palloncino-sale { animation: palloncino-sale var(--t, 6s) linear forwards; }
@keyframes palloncino-sale { 0% { transform: translate(-50%, 0) rotate(-4deg); } 50% { transform: translate(calc(-50% + var(--dondolo, 12px)), -60vh) rotate(4deg); } 100% { transform: translate(-50%, -125vh) rotate(-4deg); } }
.palloncino-scoppia { animation: palloncino-scoppia 0.35s ease-out forwards; }
@keyframes palloncino-scoppia { 0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .palloncino-sale { animation-duration: 12s !important; } }

/* Le lucciole colorate sullo schermo bianco, prima che parta la favola */
.favola-lucciola { animation: favola-lucciola var(--dur, 5s) ease-in-out infinite; }
@keyframes favola-lucciola {
  0%, 100% { transform: translate(0, 0) scale(0.7); opacity: 0.25; }
  25% { transform: translate(var(--dx, 20px), calc(var(--dy, -30px) * 0.5)) scale(1.1); opacity: 1; }
  50% { transform: translate(calc(var(--dx, 20px) * -0.6), var(--dy, -30px)) scale(0.85); opacity: 0.5; }
  75% { transform: translate(calc(var(--dx, 20px) * 0.4), calc(var(--dy, -30px) * -0.4)) scale(1.2); opacity: 1; }
}
.favola-bianco-entra { animation: favola-bianco-entra 0.7s ease-out both; }
@keyframes favola-bianco-entra { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .favola-lucciola { animation: none; opacity: 0.9; } }

/* Il dito del tutorial che tocca ripetutamente il Microfono Magico, per spiegare come funziona */
.favola-dito { animation: favola-dito 1.3s ease-in-out infinite; }
@keyframes favola-dito {
  0%, 18% { transform: translate(14%, -34%) scale(1); }
  32% { transform: translate(14%, -16%) scale(0.88); }
  46%, 100% { transform: translate(14%, -34%) scale(1); }
}
.favola-dito-onda { animation: favola-dito-onda 1.3s ease-in-out infinite; }
@keyframes favola-dito-onda {
  0%, 30% { transform: scale(0.6); opacity: 0; }
  42% { transform: scale(1); opacity: 0.6; }
  60%, 100% { transform: scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .favola-dito, .favola-dito-onda { animation: none; } }

/* Nascondino, round 3: il nascondiglio giusto trema appena ogni tanto (il piccolo indizio). */
.nasc-trema { animation: nasc-trema 4.5s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes nasc-trema { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(-3deg); } 92% { transform: rotate(3deg); } 95% { transform: rotate(-2deg); } }

