body.has-floating-nav {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.puzzle-page.has-floating-nav #content-container,
body.has-floating-nav > #archive-container,
body.has-floating-nav > #leaderboardPage {
  flex: 1 0 auto;
  box-sizing: border-box;
}

.floating-nav-overlay[hidden],
.floating-nav-drawer[hidden] {
  display: none;
}

.floating-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 45, 67, 0.24);
  z-index: 700;
}

.floating-bottom-nav {
  position: relative;
  flex: 0 0 auto;
  width: 100vw;
  max-width: 100vw;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  padding: 0 20px 20px;
  z-index: 800;
}

.floating-nav-drawer,
.floating-bottom-bar {
  width: min(calc(100vw - 40px), 420px);
  background: #71BFEB;
  border-top: 1px solid #A2D9F8;
  border-radius: 20px;
  box-sizing: border-box;
}

.floating-nav-drawer {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  padding: 20px 20px 24px;
  color: #0B3750;
  box-shadow: 0 16px 36px rgba(11, 55, 80, 0.18);
}

.floating-drawer-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 64px;
  min-height: 44px;
  margin-bottom: 48px;
}

.floating-drawer-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.floating-drawer-date {
  margin: 0;
  font-family: "Merriweather", serif;
  font-size: 30px;
  font-weight: 600;
  color: #0B3750;
}

.floating-home-button,
.floating-drawer-cta,
.floating-drawer-link,
.floating-nav-button {
  font: inherit;
  color: inherit;
}

.floating-home-button {
  position: absolute;
  top: 20px;
  right: 20px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #0B3750;
  cursor: pointer;
}

.floating-home-button-label {
  display: none;
}

.floating-home-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #C1E9FF;
  border: 1px solid #E4F5FF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floating-drawer-section {
  margin-top: 16px;
}

.floating-drawer-section-label {
  margin: 24px 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: #0B3750;
}

.floating-drawer-cta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.floating-drawer-section:last-of-type .floating-drawer-cta-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.floating-drawer-cta {
  border: 0;
  border-radius: 10px;
  background: #C1E9FF;
  box-shadow: inset 0 0 0 2px #E4F5FF;
  padding: 16px 10px;
  color: #0B3750;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.floating-drawer-cta.active {
  background: #F7DA21;
  box-shadow: inset 0 0 0 2px #FFED79;
}

.floating-drawer-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 40px;
}

.floating-drawer-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #0B3750;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  text-transform: lowercase;
}

.floating-bottom-bar {
  position: relative;
  padding: 12px 40px;
  display: grid;
  grid-template-columns: repeat(3, 40px);
  justify-content: space-between;
  align-items: center;
}

.floating-nav-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #0B3750;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.floating-nav-button.active {
  background: #A0DBFC;
}

#floatingMenuButton {
  background-color:#71BFEB;
}

.floating-nav-button svg {
  width: 28px;
  height: 28px;
}

.floating-nav-icon-menu, .floating-nav-icon-close {
height: 28px;
}

.floating-nav-icon-close[hidden],
.floating-nav-icon-menu[hidden] {
  display: none;
}

@media (max-width: 420px) {
  .floating-bottom-nav {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 12px;
  }

  .floating-nav-drawer,
  .floating-bottom-bar {
    width: min(calc(100vw - 24px), 420px);
  }

  .floating-nav-drawer {
    padding: 18px 16px 22px;
  }

  .floating-drawer-header {
    padding-right: 56px;
  }

  .floating-home-button {
    top: 18px;
    right: 16px;
  }

  .floating-drawer-date {
    font-size: 26px;
  }

  .floating-drawer-cta-row,
  .floating-drawer-footer {
    gap: 10px;
  }
}
