/* Alba in basso a destra (tutte le pagine tranne "Parliamone") */
.alba-fab-wrap {
  position: fixed; right: 24px; bottom: 24px; z-index: 99990;
  font-family: 'Syne', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.alba-fab-wrap .alba-fab {
  position: relative; display: block; width: 64px; height: 64px; border-radius: 50%;
  text-decoration: none; border: 0; outline: none; background: none; box-shadow: none;
}
.alba-fab-wrap .alba-fab:focus-visible { outline: 2px solid #232323; outline-offset: 6px; }
.alba-fab-halo {
  position: absolute; inset: -16px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(251, 201, 160, .55) 0%, rgba(242, 168, 177, .22) 46%, rgba(254, 253, 246, 0) 70%);
  animation: alba-fab-glow 4.5s ease-in-out infinite;
  transition: opacity .6s ease;
}
.alba-fab-sun {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #FFF3DC 0%, #FEE2C0 32%, #FBC9A0 64%, #F2A8B1 100%);
  box-shadow: 0 8px 22px rgba(232, 150, 160, .32), inset 0 -5px 12px rgba(242, 168, 177, .45), inset 0 4px 10px rgba(255, 255, 255, .5);
  animation: alba-fab-breathe 5s ease-in-out infinite;
  transform-origin: 50% 70%;
}
.alba-fab-eyes {
  position: absolute; left: 50%; top: 40%; width: 30px; height: 13px; margin-left: -15px;
  transform: translate(var(--fx, 0px), var(--fy, 0px)); transition: transform .16s ease-out;
}
.alba-fab-eyes i {
  position: absolute; top: 0; width: 7px; height: 11px; border-radius: 50%; background: #5C3D3A;
  transform-origin: 50% 55%; transition: transform .09s ease-in, height .25s ease, top .25s ease, border-radius .25s ease, background-color .2s ease;
}
.alba-fab-eyes i:first-child { left: 4px; }
.alba-fab-eyes i:last-child { right: 4px; }
.alba-fab-eyes i::after {
  content: ''; position: absolute; left: 1.3px; top: 2px; width: 2.6px; height: 2.6px; border-radius: 50%;
  background: #fff; opacity: .92; transition: opacity .2s ease;
}
.alba-fab-cheeks b {
  position: absolute; top: 58%; width: 11px; height: 7px; border-radius: 50%;
  background: #F29EA8; opacity: .38; filter: blur(1.5px); transition: opacity .3s ease;
}
.alba-fab-cheeks b:first-child { left: 9px; }
.alba-fab-cheeks b:last-child { right: 9px; }

/* sbatte le palpebre */
.alba-fab-wrap.is-blink .alba-fab-eyes i { transform: scaleY(.12); }

/* dorme: occhi chiusi, respiro lento, zeta */
.alba-fab-wrap.is-asleep .alba-fab-eyes { transform: translate(0, 2px); }
.alba-fab-wrap.is-asleep .alba-fab-eyes i {
  top: 4px; height: 6px; width: 9px; background: transparent; border-radius: 0 0 9px 9px;
  border-bottom: 2.2px solid #5C3D3A; box-sizing: border-box;
}
.alba-fab-wrap.is-asleep .alba-fab-eyes i:first-child { left: 2px; }
.alba-fab-wrap.is-asleep .alba-fab-eyes i:last-child { right: 2px; }
.alba-fab-wrap.is-asleep .alba-fab-eyes i::after { opacity: 0; }
.alba-fab-wrap.is-asleep .alba-fab-sun { animation: alba-fab-snooze 4.2s ease-in-out infinite; }
.alba-fab-wrap.is-asleep .alba-fab-halo { opacity: .45; }
.alba-fab-z { position: absolute; right: -6px; top: -10px; width: 28px; height: 34px; pointer-events: none; }
.alba-fab-z em {
  position: absolute; left: 0; bottom: 0; font-style: normal; font-weight: 400; color: #8A8678; line-height: 1;
  opacity: 0; transform: translate(0, 0) scale(.6);
}
.alba-fab-z em:nth-child(1) { font-size: 11px; }
.alba-fab-z em:nth-child(2) { font-size: 13px; }
.alba-fab-z em:nth-child(3) { font-size: 16px; }
.alba-fab-wrap.is-asleep .alba-fab-z em { animation: alba-fab-z 3.6s ease-in infinite; }
.alba-fab-wrap.is-asleep .alba-fab-z em:nth-child(2) { animation-delay: 1.2s; }
.alba-fab-wrap.is-asleep .alba-fab-z em:nth-child(3) { animation-delay: 2.4s; }

/* si sveglia: piccolo sobbalzo */
.alba-fab-wrap.is-wake .alba-fab-sun { animation: alba-fab-wake .7s cubic-bezier(.3, 1.6, .5, 1) both; }

/* clic: occhi felici e saltello */
.alba-fab-wrap.is-happy .alba-fab-eyes { transform: translate(0, 1px); }
.alba-fab-wrap.is-happy .alba-fab-eyes i {
  top: 2px; height: 6px; width: 9px; background: transparent; border-radius: 9px 9px 0 0;
  border-top: 2.2px solid #5C3D3A; box-sizing: border-box;
}
.alba-fab-wrap.is-happy .alba-fab-eyes i:first-child { left: 2px; }
.alba-fab-wrap.is-happy .alba-fab-eyes i:last-child { right: 2px; }
.alba-fab-wrap.is-happy .alba-fab-eyes i::after { opacity: 0; }
.alba-fab-wrap.is-happy .alba-fab-cheeks b { opacity: .7; }
.alba-fab-wrap.is-happy .alba-fab-sun { animation: alba-fab-hop .75s cubic-bezier(.3, 1.5, .5, 1) both; }
.alba-fab-wrap.is-happy .alba-fab-halo { animation: alba-fab-burst .75s ease-out both; }

/* etichetta al passaggio del mouse */
.alba-fab-tip {
  position: absolute; right: 78px; bottom: 19px; white-space: nowrap; pointer-events: none;
  background: #232323; color: #FEFDF6; font-size: 13px; line-height: 1; padding: 9px 13px; border-radius: 999px;
  opacity: 0; transform: translateX(6px); transition: opacity .2s ease, transform .2s ease;
}
.alba-fab-wrap:hover .alba-fab-tip, .alba-fab-wrap .alba-fab:focus-visible + .alba-fab-tip { opacity: 1; transform: none; }
.alba-fab-wrap.is-asleep:hover .alba-fab-tip { opacity: 0; }

@keyframes alba-fab-breathe { 50% { transform: scale(1.035); } }
@keyframes alba-fab-snooze { 0%, 100% { transform: rotate(-7deg) scale(.985); } 50% { transform: rotate(-7deg) scale(1.02); } }
@keyframes alba-fab-glow { 50% { transform: scale(1.08); opacity: .8; } }
@keyframes alba-fab-z { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 20% { opacity: .9; } 100% { opacity: 0; transform: translate(14px, -26px) scale(1); } }
@keyframes alba-fab-wake { 0% { transform: rotate(-7deg) scale(.98); } 35% { transform: translateY(-6px) scale(1.12, .94); } 65% { transform: translateY(0) scale(.96, 1.05); } 100% { transform: none; } }
@keyframes alba-fab-hop { 0% { transform: none; } 30% { transform: translateY(-12px) scale(1.06); } 55% { transform: translateY(0) scale(1.08, .92); } 75% { transform: translateY(-4px) scale(.98, 1.03); } 100% { transform: none; } }
@keyframes alba-fab-burst { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

@media (max-width: 640px) {
  .alba-fab-wrap { right: 16px; bottom: 16px; }
  .alba-fab-wrap .alba-fab { width: 56px; height: 56px; }
  .alba-fab-eyes { width: 26px; margin-left: -13px; }
  .alba-fab-cheeks b:first-child { left: 7px; } .alba-fab-cheeks b:last-child { right: 7px; }
  .alba-fab-tip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .alba-fab-wrap *, .alba-fab-wrap.is-asleep .alba-fab-sun, .alba-fab-wrap.is-asleep .alba-fab-z em { animation: none !important; }
  .alba-fab-wrap.is-asleep .alba-fab-z em:nth-child(3) { opacity: .8; transform: translate(10px, -14px); }
}
@media print { .alba-fab-wrap { display: none !important; } }
