html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  overflow-y: visible;
  background: #fefeef;
}

body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

table {
  border-collapse: collapse;
  width: 100%;
  height: 100%;
  min-width: 612px;
  min-height: 608px;
  border: 4px solid black;
}
td {
  min-width: 204px;
  min-height: 304px;
  text-align: center;
  background-color: #fefeef;
  position: relative;
}
.container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: inline-block;
  cursor: pointer;
}
.img-gold-tent,
.img-tent {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 11;
}
.button {
  position: absolute;
  left: 50%;
  top: 20%;
  transform: translate(-50%, 0);
  background: gold;
  color: black;
  font-size: 22px;
  z-index: 12;
  text-align: center;
  padding: 3px 6px;
  border: 1px solid black;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
}
.cost {
  position: absolute;
  right: 4%;
  top: 32%;
  background: gold;
  color: black;
  font-size: 22px;
  text-align: center;
  padding: 3px 6px;
  border: 2px solid black;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  z-index: 21;
  pointer-events: auto;
}
.rules {
  position: absolute;
  left: 2%;
  top: 32%;
  background: gold;
  color: black;
  font-size: 22px;
  text-align: center;
  padding: 3px 6px;
  border: 2px solid black;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  z-index: 21;
  pointer-events: auto;
}
.ttcomplete {
  position: absolute;
  left: 2%;
  bottom: 2%;
  background: gold;
  color: black;
  font-size: 22px;
  text-align: center;
  padding: 3px 6px;
  border: 2px solid black;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  z-index: 21;
  pointer-events: auto;
}
.closed {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, 0) rotate(-40deg);
  background: gold;
  color: black;
  font-size: 28px;
  z-index: 22;
  text-align: center;
  padding: 3px 6px;
  border: 2px solid black;
  border-radius: 1px;
  white-space: nowrap;
}
.other-image {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, 0);
  width: 250px;
  border-radius: 10px;
  z-index: 1;
}
.user-text {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, 0);
  color: black;
  font-size: 20px;
  z-index: 1;
}
.other-text {
  position: absolute;
  left: 50%;
  bottom: 3%;
  transform: translate(-50%, 0);
  color: black;
  font-size: 20px;
  z-index: 1;
}
.heart-tooltip {
  position: absolute;
  top: 3%;
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 16;
}
.heart-overlay {
  width: 65px;
  height: auto;
  display: block;
}
.tooltiptext {
  visibility: hidden;
  width: 150px;
  background-color: gold;
  color: #000;
  text-align: center;
  border-radius: 6px;
  border: 2px solid black;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 55%;
  left: 45%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 18px;
}
.heart-tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
.wins-tooltip {
  position: absolute;
  right: 4%;
  bottom: 2%;
  z-index: 21;
}
.winsremaining {
  background: gold;
  color: black;
  font-size: 22px;
  text-align: center;
  padding: 3px 6px;
  border: 2px solid black;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  pointer-events: auto;
}
.wins-tooltip .tooltiptext {
  visibility: hidden;
  width: 180px;
  background-color: gold;
  color: #000;
  text-align: center;
  border-radius: 6px;
  border: 2px solid black;
  padding: 5px;
  position: absolute;
  z-index: 1;
  top: -20px;
  left: 12%;
  transform: translate(-60%, -70%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 18px;
}
.wins-tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
#tentCarousel {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #fefeef;
}
#carouselWrapper {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.28s cubic-bezier(.2,.9,.2,1);
  will-change: transform;
}
.carousel-item {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.hidden {
  display: none;
}
.clock-container {
  position: fixed;
  top: -2px;
  left: 49.5%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
}
.digital-clock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: black;
  font-size: 18px;
  font-weight: bold;
  white-space: nowrap;
  z-index: 1001;
}
@media (max-width: 700px) {
  table#tentGrid {
    display: none;
  }
  #tentCarousel {
    display: block;
  }
  table {
    min-width: 0;
    min-height: 0;
  }
  td {
    min-width: 0;
    min-height: 0;
  }
  .container {
    min-width: 0;
    min-height: 0;
  }
  .clock-container {
    position: fixed;
    top: 25px;
    left: 49.5%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
  }
  .digital-clock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-size: 27px;
    font-weight: bold;
    white-space: nowrap;
    z-index: 1001;
  }
}
.rules-tooltip {
  position: absolute;
  left: 2%;
  top: 32%;
  z-index: 21;
}
.rules-tooltip .tooltiptext {
  visibility: hidden;
  width: 140px;
  height: 20px;
  background-color: gold;
  color: #000;
  text-align: top;
  border-radius: 6px;
  border: 2px solid black;
  padding: 5px;
  position: absolute;
  z-index: 99;
  top: 25px;
  left: 45%;
  transform: translate(50%, 50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 18px;
}
.rules-tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
.ttcomplete-tooltip .tooltiptext {
  visibility: hidden;
  width: 180px;
  background-color: gold;
  color: #000;
  text-align: center;
  border-radius: 6px;
  border: 2px solid black;
  padding: 5px;
  position: absolute;
  z-index: 99;
  bottom: 60px;
  left: 50%;
  transform: translate(50%, 50%);
  opacity: 1;
  transition: opacity 0.3s;
  font-size: 18px;
}
.ttcomplete-tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
.cost-tooltip {
  position: absolute;
  right: 4%;
  top: 32%;
  z-index: 99;
}
.cost-tooltip .tooltiptext {
  visibility: hidden;
  width: 150px;
  height: 20px;
  background-color: gold;
  color: #000;
  text-align: center;
  border-radius: 6px;
  border: 2px solid black;
  padding: 5px;
  position: absolute;
  z-index: 999;
  top: 70px;
  left: 22%;
  transform: translate(-70%, -100%);
  opacity: 1;
  transition: opacity 0.3s;
  font-size: 18px;
}
.cost-tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}
.ttcomplete-tooltip {
  position: absolute;
  left: 2%;
  bottom: 2%;
  z-index: 21;
}
