/* «Torna su» e «Supporto», identici al sito di Digitato (regola di tutti i siti: ~/.claude/skills/safesite/modello).
   I colori sono di Digitato, non del sito. */
:root { --dg-lato: calc((100% - min(var(--wp--custom--larghezza, 1180px), 100% - 2 * 20px)) / 2); }
.dg-fisso { --dg-notte: #000538; --dg-lime: #C5FF1E; --dg-chiaro: #F6F7FB;
  position: fixed; bottom: calc(44px + env(safe-area-inset-bottom, 0px)); z-index: 900; width: 56px; height: 56px; border-radius: 16px; border: 0; padding: 0;
  display: grid; place-items: center; text-decoration: none; color: #fff; cursor: pointer; background: var(--dg-notte);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--dg-lime) 22%, transparent), 0 0 16px color-mix(in srgb, var(--dg-lime) 12%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .34), inset 0 -10px 16px -12px rgba(0, 5, 56, .8), 0 18px 34px -10px rgba(0, 5, 56, .65), 0 4px 10px -2px rgba(0, 5, 56, .35);
  opacity: 0; visibility: hidden; translate: 0 14px; pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease, translate .3s ease, background .2s ease, scale .2s ease; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .dg-fisso { background: color-mix(in srgb, var(--dg-notte) 60%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(160%) brightness(1.05); backdrop-filter: blur(14px) saturate(160%) brightness(1.05); }
}
.dg-fisso.dg-visibile { opacity: 1; visibility: visible; translate: 0 0; pointer-events: auto;
  transition: opacity 1.1s ease, visibility 1.1s ease, translate .3s ease, background .2s ease, scale .2s ease; }
.dg-fisso:hover { background: color-mix(in srgb, var(--dg-notte) 86%, transparent); }
.dg-torna-su { left: var(--dg-lato); }
.dg-torna-su .dg-giro { position: absolute; inset: 5px; width: 46px; height: 46px; pointer-events: none; }
.dg-torna-su .dg-giro path { fill: none; stroke: color-mix(in srgb, var(--dg-chiaro) 62%, transparent); stroke-width: 2; stroke-linecap: butt; stroke-linejoin: round;
  stroke-dasharray: 170; stroke-dashoffset: calc(170 - 170 * var(--giu, 0)); }
.dg-torna-su .dg-freccia { width: 22px; height: 22px; display: block; }
.dg-torna-su:focus-visible { outline: 3px solid var(--dg-notte); outline-offset: 7px; box-shadow: 0 0 0 3px var(--dg-lime), 0 18px 34px -10px rgba(0, 5, 56, .65), 0 0 0 12px #fff; }
.dg-chat { right: var(--dg-lato); width: 66px; }
.dg-chat:hover { scale: 1.05; }
.dg-chat:focus-visible { outline: 3px solid var(--dg-lime); outline-offset: 3px; }
.dg-chat__dentro { display: grid; justify-items: center; align-content: center; gap: 4px; width: 100%; height: 100%; padding: 5px 4px; }
.dg-chat__segno { display: grid; place-items: center; width: 23px; height: 23px; color: #fff; }
.dg-chat__segno svg { width: 100%; height: 100%; display: block; }
.dg-chat__sotto { font-weight: 700; font-size: 7.5px; line-height: 1; letter-spacing: .08em; margin-right: -.08em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.dg-chat__punto { position: absolute; right: -4px; bottom: -4px; width: 13px; height: 13px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 2.5px #fff; }
@media (max-width: 760px) {
  .dg-fisso { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; border-radius: 13px;
    box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--dg-lime) 22%, transparent), 0 0 12px color-mix(in srgb, var(--dg-lime) 12%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, .3), 0 12px 24px -8px rgba(0, 5, 56, .6), 0 3px 8px -2px rgba(0, 5, 56, .3); }
  .dg-torna-su { left: calc(16px + env(safe-area-inset-left, 0px)); }
  .dg-chat { right: calc(16px + env(safe-area-inset-right, 0px)); width: 56px; }
  .dg-torna-su .dg-giro { inset: 4px; width: 38px; height: 38px; }
  .dg-torna-su .dg-freccia { width: 19px; height: 19px; }
  .dg-chat__dentro { gap: 3px; padding: 4px 3px; }
  .dg-chat__segno { width: 19px; height: 19px; }
  .dg-chat__sotto { font-size: 7px; letter-spacing: .06em; margin-right: -.06em; }
  .dg-chat__punto { width: 12px; height: 12px; right: -3px; bottom: -3px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dg-fisso, .dg-fisso.dg-visibile { transition: none; translate: 0 0; }
}
@media print { .dg-fisso { display: none; } }