body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #e6dfc3;

  /* notebook grid */
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.08) 1px, transparent 1px);

  background-size: 16px 16px;

  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin-top: 100px;
  text-align: center;
}

.grid {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 600px;
  gap: 20px;
}

.square {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e6dfc3;
  font-weight: bold;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
}


.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  overflow: hidden;
  transition: height 0.5s ease;
  display: flex;
  justify-content: center;
  align-items: flex-start;

}


.overlay::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(to right, rgba(255,255,255,0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.12) 1px, transparent 1px);

  background-size: 16px 16px;

  pointer-events: none;
  z-index: 0;
}

/* ensure overlay content sits above grid */
.overlay-content,
.close-btn {
  position: relative;
  z-index: 1;
}

.overlay-content {
  color: #e6dfc3;
  text-align: center;
  font-size: 24px;
  margin-top: 80px;
  max-height: 100vh;
  overflow-y: auto;
   padding: 0px 0px 80px 0px;
  width: 100%;
  box-sizing: border-box;

  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.overlay-content::-webkit-scrollbar {
  display: none;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0,0,0,0.3);
  border: none;
  color: white;
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
}

/* text block */
.text {
  flex: 1;
  text-align: left;
}



