* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #e9eddf;
  color: #4a4938;
  font-family: ui-rounded, "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
  border: 1px solid #76664425;
  background: #fffdf0e8;
  border-radius: 16px;
  padding: 11px 16px;
  box-shadow: 0 3px 0 #66523912;
  touch-action: none;
}
button:hover {
  background: #fffef7;
  transform: translateY(-1px);
}
button:active {
  transform: translateY(1px);
}
button:focus-visible {
  outline: 3px solid #5c9978;
  outline-offset: 3px;
}
button[aria-pressed="true"] {
  background: #e4efd0;
  color: #3d6f47;
  border-color: #82a66a;
}
#shell {
  position: relative;
  width: min(100vw, calc(100dvh * 1194 / 834));
  height: min(100dvh, calc(100vw * 834 / 1194));
  margin: auto;
  top: 50dvh;
  transform: translateY(-50%);
  overflow: hidden;
  background: #bde9f7;
  box-shadow: 0 8px 60px #53644c20;
}
#game,
#game canvas {
  width: 100%;
  height: 100%;
  display: block;
}
header {
  position: absolute;
  top: 24px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  text-shadow: 0 1px 0 #fff;
  background: #fffcecce;
  padding: 9px 16px 9px 10px;
  border: 1px solid #fff9;
  border-radius: 22px;
}
.brand b {
  font-size: 20px;
  letter-spacing: 2px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #7f8768;
  margin-top: 4px;
}
.leaf {
  font-size: 38px;
  color: #5f8b4c;
  line-height: 1;
}
nav {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
nav button {
  font-size: 13px;
  font-weight: 600;
}
#status {
  position: absolute;
  top: 104px;
  left: 30px;
  background: #fffbedda;
  padding: 10px 15px;
  border-radius: 24px;
  font-size: 12px;
  display: flex;
  gap: 9px;
  align-items: center;
  max-width: 65%;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7a9b51;
}
#places {
  position: absolute;
  right: 28px;
  top: 88px;
  width: 248px;
  padding: 18px;
  background: #fffdf2f5;
  border: 1px solid #fff;
  border-radius: 22px;
  box-shadow: 0 15px 40px #506b4c20;
  z-index: 5;
}
#places p {
  font-size: 12px;
  color: #8b8872;
  margin: 0 0 12px;
}
#place-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#place-buttons button {
  padding: 12px 6px;
  font-size: 13px;
}
#hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #636f50;
  background: #fffce8d9;
  padding: 10px 16px;
  border-radius: 30px;
  white-space: nowrap;
  pointer-events: none;
}
#hint span {
  padding: 0 8px;
  color: #a5ad88;
}
.touch {
  position: absolute;
  bottom: 56px;
  left: 28px;
  right: 28px;
  display: flex;
  gap: 10px;
  pointer-events: none;
}
.touch button {
  width: 54px;
  height: 54px;
  font-size: 30px;
  line-height: 28px;
  padding: 0;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  background: #fffce5b8;
  backdrop-filter: blur(5px);
}
#up {
  margin-left: auto;
}
.touch #jump {
  background: #eaf1d7d9;
}
#building {
  position: absolute;
  width: 310px;
  right: 28px;
  top: 180px;
  background: #fffcf0f7;
  padding: 28px;
  border: 2px solid #fff9;
  border-radius: 25px;
  box-shadow: 0 18px 55px #425e492b;
  z-index: 6;
}
#building[hidden],
#places[hidden] {
  display: none;
}
#close {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 0;
  box-shadow: none;
  background: #eaeedc;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  padding: 0;
  font-size: 22px;
}
#building small {
  font-size: 11px;
  color: #8c9774;
  letter-spacing: 2px;
}
#building h1 {
  font-size: 27px;
  margin: 12px 0 16px;
}
#building p {
  font-size: 14px;
  line-height: 1.9;
  color: #85816a;
}
#building .arrived {
  font-size: 12px;
  color: #6b8c52;
  margin: 24px 0;
}
.primary {
  background: #728f58;
  color: #fffde9;
  border: 0;
  width: 100%;
  font-size: 13px;
}
#boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #e5efda;
  font-size: 18px;
}
#boot[hidden] {
  display: none;
}
@media (max-width: 900px) {
  header {
    top: 15px;
    left: 18px;
    right: 18px;
  }
  .brand {
    padding: 6px 10px;
  }
  .brand b {
    font-size: 16px;
  }
  .brand small {
    font-size: 8px;
  }
  nav button {
    padding: 9px 11px;
  }
  #status {
    top: 86px;
    left: 18px;
  }
  #building {
    top: 145px;
    right: 18px;
  }
  #hint {
    font-size: 9px;
  }
  .touch {
    bottom: 48px;
  }
}

.touch button.enter-ready {
  background: #d6e8b4;
  border-color: #759d5d;
  color: #426535;
}
