/* Floating Telegram support button: large screens only. It fades in 5 s after the page opens,
   with a CSS animation delay and no script. Phones and tablets have the button in the header. */
.tg-float {
  display: none;
}

@media (min-width: 992px) {
  .tg-float {
    position: fixed;
    right: max(24px, env(safe-area-inset-right, 0px));
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px 6px 6px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    color: #212122;
    /* Liquid glass: a translucent white layer that blurs and saturates the page behind it. */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.42) 100%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset 0 -1px 0 rgba(33, 33, 34, 0.06),
      0 10px 30px rgba(33, 33, 34, 0.16);
    text-decoration: none;
    animation: tg-float-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) 5s backwards;
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .tg-float {
      background: rgba(255, 255, 255, 0.94);
    }
  }

  .tg-float:hover,
  .tg-float:focus-visible {
    color: #212122;
    transform: translateY(-2px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset 0 -1px 0 rgba(33, 33, 34, 0.06),
      0 14px 36px rgba(33, 33, 34, 0.22);
  }

  .tg-float:focus-visible {
    outline: 3px solid rgba(33, 33, 34, 0.35);
    outline-offset: 3px;
  }

  .tg-float-icon {
    display: grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    background: #212122;
    font-size: 18px;
  }

  .tg-float-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
  }

  .tg-float-copy strong {
    color: #212122;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
  }

  /* The game page is dark throughout, where white glass turns muddy grey, so the glass there is smoky with white text. */
  .game-page-body .tg-float,
  .game-page-body .tg-float:hover,
  .game-page-body .tg-float:focus-visible {
    border-color: rgba(255, 255, 255, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.35),
      inset 0 -1px 0 rgba(255, 255, 255, 0.06),
      0 10px 30px rgba(0, 0, 0, 0.4);
  }

  .game-page-body .tg-float:focus-visible {
    outline-color: rgba(255, 255, 255, 0.45);
  }

  .game-page-body .tg-float-copy strong {
    color: #fff;
  }

  .game-page-body .tg-float-icon {
    color: #212122;
    background: #fff;
  }

  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .game-page-body .tg-float,
    .game-page-body .tg-float:hover,
    .game-page-body .tg-float:focus-visible {
      background: rgba(33, 33, 34, 0.92);
    }
  }
}

@keyframes tg-float-in {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

@keyframes tg-float-show {
  from {
    visibility: hidden;
  }

  to {
    visibility: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tg-float {
    animation-name: tg-float-show;
    animation-duration: 1ms;
    transition: none;
  }
}

@media print {
  .tg-float {
    display: none !important;
  }
}
