html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Inter", sans-serif;
  background: #cfeef0;
}

/* Shared card style */
.gg-card {
  background: snow;
  border: 1px solid #e6efed;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
}

/* Input fields styling */
textarea,
input[type="text"] {
  font-family: inter;
  outline: none;
}

/* Make input text align like textarea */
input[type="text"] {
  text-align: left;
}

/* Focus style for textarea and input */
textarea:focus,
input[type="text"]:focus {
  outline: none;
  border-color: powderblue;
  box-shadow: 0 0 0 2px powderblue;
}

/* Landing + Select overlay cards (centered) */
#landing-wrap,
#username-wrap,
#select-wrap {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;          /* overlays in front of the garden */
  pointer-events: auto;
}

#garden-wrap {
  position: fixed;
  inset: 0;
  display: none;
  padding: 0;
  overflow: hidden;
  z-index: 0;
}


.gg-title {
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  color: #0f5132;
}
.gg-sub {
  font-size: 18px;
  text-align: center;
  color: #2c7a7b;
}
/* Buttons */
.gg-btn {
  background: mediumturquoise;
  color: snow;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 18px;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: transform .15s;
  pointer-events: auto;
}
.gg-btn:hover {
  transform: scale(1.03);
  background: turquoise;
}
.gg-back {
  background: #e5e7eb;
  color: #654321;
  border: none;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  margin-top: 12px;
  font-size: 18px;
  pointer-events: auto;
}
/* Species grid */
.gg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.gg-tile {
  background: white;
  border: 4px solid transparent;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; 
  gap: 6px;
  transition: border .15s;
  pointer-events: auto;
}
.gg-tile:hover {
  border: 4px solid powderblue;
}
.preview-holder {
  width: 160px;
  height: 110px;
}

.gg-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  pointer-events: auto;
}

#select-wrap .gg-card {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 28px;
  max-height: calc(100dvh - 40px);
}

#select-wrap {
  padding: 20px 12px;
  align-items: flex-start;
  overflow-y: auto;
}

#tips-card {
  position: absolute;
  left: 12px;
  bottom: 40px;              /* lower it closer to the bottom */
  width: calc(100% - 24px);
  max-width: 420px;

  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;

  z-index: 25;
  text-align: left;
  pointer-events: none;
}


#tips-card h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f5132;
}

#tips-card ul {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

#tips-card li {
  margin-bottom: 4px;
  font-size: 14px;
  color: #2f6f57;
}


#save-btn {
  background: #e8f6f3;
  border: 1px solid #cfe5e1;
  color: #654321;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  position: absolute;
  top: 50px;
  right: 12px;
  z-index: 20;
  pointer-events: auto;
  font-size: 14px;       /* new */
}


.gg-hue-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    hsl(0,   70%, 80%) 0%,
    hsl(60,  70%, 80%) 16.7%,
    hsl(120, 70%, 80%) 33.3%,
    hsl(180, 70%, 80%) 50%,
    hsl(240, 70%, 80%) 66.7%,
    hsl(300, 70%, 80%) 83.3%,
    hsl(360, 70%, 80%) 100%
  );
  outline: none;
  border: 0;
  pointer-events: auto;
}

.gg-hue-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: snow;
  border: 3px solid skyblue;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  margin-top: -4px;
}

.gg-hue-slider::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: transparent;
}

.gg-hue-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: snow;
  border: 3px solid skyblue;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

#garden-wrap canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

#gg-logo {
  position: absolute;
  bottom: 35px;
  right: 20px;
  width: 90px;
  cursor: pointer;
  z-index: 30;
  pointer-events: auto;
}

#gg-logo img {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
  transition: transform .2s ease;
}

#gg-logo:hover img {
  transform: scale(1.06);
}

/* Ensure overlays are above canvas */
.gg-card {
  pointer-events: auto !important;
}

.gg-card textarea,
.gg-card input,
.gg-card button {
  pointer-events: auto !important;
}

/* MOBILE FIX: make tiles smaller so page stops scrolling */
@media (max-width: 768px) {

  /* reduce tile padding + height */
.gg-tile {
  padding: 4px 4px 6px;
  min-height: 88px;
  overflow: visible;
}

.preview-holder {
  width: 95px;
  height: 65px;
  overflow: visible;
}

  /* tighten grid spacing */
  .gg-grid {
    gap: 10px;
  }

  /* tighten spacing below slider */
  #color-section {
    margin-bottom: 14px !important;
  }

  /* reduce text size for flower names */
  .gg-tile p {
    font-size: 15px;
  }

  .gg-tile {
  background: white;
  border: 4px solid transparent;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border .15s;
  pointer-events: auto;
  overflow: visible;
}

#select-wrap .gg-card {
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
#tips-card {
  
  bottom: 20px;              /* lower it closer to the bottom */

}
  #tips-card h3 {
  font-size: 14px;
}
  #tips-card li {
  font-size: 12px;
  }

.gg-title { font-size: 32px; }
  .gg-sub { font-size: 17px; line-height: 1.5; }
  .gg-btn { font-size: 18px; padding: 16px 20px; min-height: 52px; }
  .gg-back { font-size: 18px; padding: 16px; min-height: 48px; }
  .gg-card { padding: 28px 22px; }
  textarea, input[type="text"] { font-size: 16px; min-height: 48px; }
}