@media screen and (max-width: 768px) {
  .cookies-banner {
    right: 8px;
    bottom: 8px;
    width: min(360px, calc(100vw - 16px));
    padding: 12px 14px;
    gap: 10px;
  }

  .cookies-banner__copy {
    font-size: 0.82rem;
  }

  .cookies-banner__image {
    width: 40px;
    height: 40px;
  }

  .cookies-banner__btn {
    font-size: 0.68rem;
    padding: 5px 9px;
  }

  .desktop_device {
    display: none !important;
  }

  .mobile_device_380,
  .mobile_device_480 {
    display: block !important;
  }

  .the_background {
    position: static;
    min-height: 100dvh;
    padding: 12px 0 calc(24px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .mobile_device_480 {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
  }

  .mobile_device_480 .mainbox {
    display: block !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    margin: 0 12px 12px;
    padding: 3px;
    min-width: 0;
    max-width: none;
    width: auto;
    font-size: clamp(0.92rem, 3.4vw, 1rem);
    resize: none;
    overflow: hidden;
    box-sizing: border-box;
  }

  .mobile_device_480 .topbar {
    font-size: 0.95rem !important;
    line-height: 1.3;
    padding: 6px;
    align-items: center;
  }

  .mobile_device_480 .buttons {
    gap: 6px;
  }

  .mobile_device_480 .topbarButton {
    width: 20px;
    min-width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .mobile_device_480 .content,
  .mobile_device_480 .properties {
    font-size: inherit;
    line-height: 1.45;
  }

  #projects-mobile-content,
  #about-mobile-content,
  #contact-mobile-content {
    text-align: left !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #projects-mobile-content .gamelink {
    display: inline;
    padding: 0;
  }

  #contact-mobile-content a,
  #projects-mobile-content a {
    display: inline-block;
    margin-bottom: 4px;
  }

  .clickable,
  .windowslink,
  .gamelink,
  .topbarButton,
  .buttons {
    cursor: pointer !important;
  }
}

@media screen and (max-width: 420px) {
  .cookies-banner {
    right: 6px;
    bottom: 6px;
    width: min(330px, calc(100vw - 12px));
  }

  .the_background {
    padding-top: 8px;
  }

  .mobile_device_480 .mainbox {
    margin: 0 8px 10px;
  }
}
