@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');
:root {
  font-family: 'DM Sans',sans-serif;
  color: #243c30;
  background: #f8f9f3;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 1000px;
  margin: auto;
  padding: 25px 32px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dce3d4;
  padding-bottom: 23px;
}
.brand {
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 17px;
}
#connection {
  font-size: 12px;
  color: #5a6c60;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #67816a;
}
h2 {
  font-family: Outfit,sans-serif;
}
.lobby {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 12px;
  margin: 20px 0 24px;
}
label {
  font-size: 11px;
  font-weight: 700;
  display: grid;
  gap: 6px;
}
input {
  border: 1px solid #d6dece;
  border-radius: 10px;
  background: white;
  padding: 12px;
  font: inherit;
  font-size: 16px;
  width: 190px;
  color: #243c30;
}
button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 10px;
  background: #315e43;
  color: white;
  padding: 14px 21px;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  opacity: .5;
  cursor: default;
}
button:hover:enabled {
  filter: brightness(1.1);
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #d99537;
  outline-offset: 3px;
}
.secondary {
  background: #e9edde;
  color: #34553d;
}
.game-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3px 13px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}
.game-top > div {
  display: flex;
  gap: 20px;
  align-items: center;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 13px;
}
.time {
  background: #f0e5c9;
  padding: 8px 13px;
  border-radius: 20px;
}
.time b {
  font-size: 18px;
}
#garden {
  height: 300px;
  position: relative;
  overflow: hidden;
  background: #edf2df;
  border: 1px solid #d8e1c9;
  border-radius: 20px;
  background-image: radial-gradient(#cdd8bb 1px,transparent 1px);
  background-size: 25px 25px;
}
#welcome {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  z-index: 1;
}
#welcome[hidden] {
  display: none;
}
.big-bug {
  font-size: 45px;
}
h2 {
  font-size: 23px;
  margin: 12px 0 8px;
}
#welcome p {
  font-size: 13px;
  line-height: 1.7;
  color: #6b7c5e;
  margin: 0;
}
.ground {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: #96ad78;
  letter-spacing: 24px;
  text-align: center;
  background: #e1eacb;
  padding: 9px;
  white-space: nowrap;
}
.bug {
  position: absolute;
  top: 12px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2px;
  transition: transform .24s linear;
  pointer-events: none;
}
.bug span {
  font-size: 34px;
}
.bug b {
  background: white;
  border: 1px solid #c6d3b4;
  border-radius: 8px;
  min-width: 29px;
  text-align: center;
  padding: 3px;
  font-size: 17px;
  box-shadow: 0 2px 0 #c6d3b4;
}
#feedback {
  text-align: center;
  color: #75816d;
  font-size: 12px;
  min-height: 18px;
}
#keyboard {
  display: grid;
  gap: 6px;
  justify-content: center;
  margin: 16px 0 30px;
}
.key-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.key {
  width: 42px;
  height: 42px;
  padding: 0;
  color: #36543d;
  background: white;
  border: 1px solid #d9dfd1;
  box-shadow: 0 2px 0 #d9dfd1;
  border-radius: 8px;
  text-transform: uppercase;
}
.team {
  border-top: 1px solid #dce3d4;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.team h2 {
  font-size: 22px;
  margin: 4px 0;
}
.team .eyebrow {
  margin: 0;
}
#count {
  font-size: 12px;
  background: #e5ebdc;
  padding: 4px 8px;
  border-radius: 15px;
  vertical-align: middle;
}
#players {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: flex-end;
  max-width: 65%;
}
#players li {
  background: #eaf0e1;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  align-self: center;
}
footer {
  text-align: center;
  font-size: 12px;
  color: #7e8a75;
  padding: 14px 0 20px;
}
@media (max-width:600px) {
  main {
    padding: 18px 14px;
  }
  .brand {
    font-size: 13px;
  }
  header {
    padding-bottom: 17px;
  }
  .lobby {
    flex-wrap: wrap;
    gap: 8px;
  }
  .lobby label {
    width: 100%;
  }
  .lobby input {
    width: 100%;
  }
  .lobby button {
    flex: 1;
    font-size: 13px;
    padding: 13px 10px;
  }
  #garden {
    height: 270px;
  }
  .key {
    width: calc((100vw - 88px)/10);
    max-width: 38px;
    height: 42px;
  }
  .key-row {
    gap: 5px;
  }
  .game-top > span {
    font-size: 9px;
  }
  .game-top > div {
    gap: 9px;
  }
  .team {
    flex-direction: column;
  }
  #players {
    max-width: 100%;
    justify-content: flex-start;
  }
}
@media (prefers-reduced-motion:reduce) {
  .bug {
    transition: none;
  }
}
