.treehouse-card-scene {
  background: #dfe9cf;
}
.treehouse-card-scene > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.treehouse-card-caption {
  position: absolute;
  bottom: 12px;
  left: 16px;
  padding: 6px 12px;
  border-radius: 9px;
  background: #fff7e4e8;
  color: #7b845c;
  font-size: 11px;
}
.game-card.forest .card-tag {
  color: #7d915e;
}
.game-dialog.game-treehouse {
  background: #edf2e4;
  color: #626e50;
}
.game-treehouse .game-header h2 {
  color: #697452;
}
.game-treehouse .game-feedback {
  display: none !important;
}
.treehouse-world {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 82px 30px 24px;
  user-select: none;
  -webkit-user-select: none;
  background: #edf2e4;
}
.treehouse-world [hidden] {
  display: none !important;
}
.treehouse-world button {
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  color: #65714f;
}
.treehouse-top,
.treehouse-toolbar,
.treehouse-controls,
.treehouse-goal {
  width: min(100%, 1060px);
  margin-inline: auto;
}
.treehouse-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.treehouse-route {
  display: flex;
  gap: 12px;
}
.treehouse-route button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 3px 4px;
  background: transparent;
  font-size: 12px;
}
.treehouse-route button > span {
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #b9c49f;
  width: 26px;
  height: 26px;
}
.treehouse-route [aria-current="step"] {
  color: #5e794f;
}
.treehouse-route [aria-current="step"] > span {
  background: #839d68;
  color: #fffaf0;
  border-color: #839d68;
}
.treehouse-route button:disabled {
  opacity: 0.48;
  cursor: default;
}
.treehouse-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #e4ebd8;
  padding: 4px 12px;
  min-height: 40px;
  border-radius: 13px;
  font-size: 11px;
}
.treehouse-badges b {
  display: flex;
  gap: 7px;
}
.treehouse-badges i {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px dashed #acb699;
  border-radius: 50%;
  font-size: 16px;
  font-style: normal;
  color: #9da68e;
}
.treehouse-badges i.earned {
  background: #f2d892;
  border-style: solid;
  border-color: #dcc27f;
  color: #826e40;
}
.treehouse-goal {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  min-height: 32px;
}
.treehouse-goal small {
  color: #909b7e;
  font-size: 11px;
  white-space: nowrap;
}
.treehouse-goal strong {
  font-size: 17px;
  line-height: 1.65;
  text-align: center;
  color: #60734e;
  font-weight: 600;
}
.treehouse-view {
  position: relative;
  width: min(100%, 1060px);
  min-height: 0;
  margin-inline: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d7e1c5;
  border-radius: 24px;
  background: #eaf2e8;
}
.treehouse-stage.adventure-canvas {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  outline-offset: -5px;
  font-family: inherit;
}
.treehouse-target-label {
  position: absolute;
  max-width: 132px;
  padding: 6px 9px;
  border: 1px solid #c9ad62;
  border-radius: 9px;
  background: #fff8de;
  box-shadow: 0 2px 0 #b49a4b1f;
  color: #80672d;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}
.treehouse-target-label::after {
  content: "";
  position: absolute;
  left: calc(50% - 4px);
  bottom: -5px;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border-right: 1px solid #c9ad62;
  border-bottom: 1px solid #c9ad62;
  background: #fff8de;
}
.treehouse-target-label[data-below="true"]::after {
  top: -5px;
  bottom: auto;
  transform: rotate(225deg);
}
.treehouse-target-label.is-feedback {
  color: #765828;
  border-color: #b58c41;
}
.treehouse-foreground {
  pointer-events: none;
}
.treehouse-world button.is-needed {
  border-color: #b59644;
  background: #fff1bd;
  box-shadow: 0 0 0 3px #e6c76655;
}
.treehouse-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.treehouse-characters {
  display: flex;
  gap: 9px;
}
.treehouse-characters button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border: 1.5px solid #d6ddc8;
  background: #f8f8ee;
  border-radius: 15px;
  min-height: 58px;
  text-align: left;
}
.treehouse-characters button[aria-pressed="true"] {
  background: #fff7e2;
  border-color: #bdab78;
  box-shadow: 0 2px 0 #bfa9722e;
}
.treehouse-characters svg {
  height: 43px;
  width: 40px;
}
.treehouse-characters b {
  display: block;
  font-size: 14px;
}
.treehouse-characters small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #8a9279;
}
.treehouse-world kbd {
  font-family: inherit;
  font-size: 11px;
  border: 1px solid #cbd3bb;
  border-radius: 4px;
  padding: 2px 5px;
  margin-left: 5px;
  color: #909779;
  font-weight: 400;
}
.treehouse-characters [aria-pressed="true"] kbd {
  visibility: hidden;
}
.treehouse-room-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.treehouse-room-actions button {
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 12px;
  background: #e1e9d3;
}
.treehouse-room-actions [data-treehouse-next]:not(:disabled),
.treehouse-room-actions [data-treehouse-claim] {
  background: #829767;
  color: #fffdf0;
}
.treehouse-room-actions [data-treehouse-next]:disabled {
  background: transparent;
  color: #a2ab93;
  cursor: default;
}
.treehouse-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #dbe2cd;
}
.treehouse-controls > div {
  display: flex;
  gap: 9px;
}
.treehouse-controls > span {
  color: #959d84;
  font-size: 11px;
}
.treehouse-controls button {
  min-width: 58px;
  min-height: 50px;
  padding: 10px 18px;
  border: 1px solid #c8d3b4;
  border-radius: 14px;
  background: #faf9ec;
  box-shadow: 0 3px 0 #becba842;
  font-size: 15px;
}
.treehouse-controls .treehouse-interact {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 142px;
  font-size: 13px;
  background: #e7eddb;
}
.treehouse-interact b {
  font-weight: 600;
}
.treehouse-interact[data-ready="false"] {
  color: #788463;
  border-style: dashed;
  box-shadow: none;
}
.treehouse-interact kbd {
  margin: 0 6px 0 0;
}
.treehouse-controls button.held {
  transform: translateY(2px);
  background: #d2dfbc;
  box-shadow: none;
}
.treehouse-controls button:disabled {
  opacity: 0.47;
  box-shadow: none;
  cursor: default;
}
.game-dialog.game-treehouse.is-runner .game-bottom {
  position: absolute;
  top: 22px;
  bottom: auto;
  left: auto;
  right: 210px;
  width: 78px;
  height: 39px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}
.game-treehouse .game-bottom > p,
.game-treehouse .game-bottom .dialogue-avatar,
.game-treehouse .game-bottom .read-help {
  display: none;
}
.game-treehouse .game-bottom .show-current-hint {
  display: block;
  width: 100%;
  min-height: 39px;
  padding: 6px 10px;
  border-radius: 12px;
  background: #fff9eb;
  color: #7b8466;
  font-size: 12px;
}
@media (max-width: 1000px) {
  .treehouse-route {
    gap: 5px;
  }
  .treehouse-controls > span {
    display: none;
  }
  .treehouse-badges > span {
    display: none;
  }
  .game-treehouse .game-header .mode-label {
    display: none;
  }
  .game-dialog.game-treehouse.is-runner .game-bottom {
    right: 180px;
  }
}
@media (max-width: 620px) and (orientation: portrait) {
  .treehouse-world {
    padding: 120px 12px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    gap: 14px;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  }
  .game-treehouse .game-header h2 {
    font-size: 16px;
    max-width: 180px;
    line-height: 1.35;
  }
  .game-treehouse .game-header > div:not(.game-header-actions) {
    padding: 6px 9px;
  }
  .game-treehouse .game-header > div > span {
    display: none;
  }
  .game-dialog.game-treehouse.is-runner .game-bottom {
    top: 73px;
    right: 14px;
    width: 74px;
  }
  .treehouse-top {
    flex-wrap: wrap;
    gap: 5px;
    position: relative;
  }
  .treehouse-route {
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }
  .treehouse-route button {
    flex-direction: column;
    gap: 5px;
    font-size: 10px;
    min-height: 47px;
  }
  .treehouse-route button > span {
    width: 24px;
    height: 24px;
  }
  .treehouse-badges {
    position: absolute;
    bottom: calc(100% + 18px);
    left: 0;
    padding: 5px 10px;
    min-height: 36px;
  }
  .treehouse-badges > span {
    display: inline;
  }
  .treehouse-goal {
    display: block;
    min-height: 57px;
    text-align: center;
  }
  .treehouse-goal small {
    display: block;
    margin-bottom: 4px;
  }
  .treehouse-goal strong {
    display: block;
    font-size: 14px;
  }
  .treehouse-view {
    border-radius: 19px;
    min-height: 155px;
  }
  .treehouse-toolbar {
    flex-direction: column;
    gap: 12px;
  }
  .treehouse-characters {
    width: 100%;
    gap: 10px;
  }
  .treehouse-characters button {
    flex: 1;
    justify-content: center;
    gap: 5px;
    padding-inline: 3px;
  }
  .treehouse-characters svg {
    width: 36px;
    height: 42px;
  }
  .treehouse-characters small {
    font-size: 9px;
  }
  .treehouse-characters kbd {
    display: none;
  }
  .treehouse-room-actions {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }
  .treehouse-room-actions button {
    font-size: 11px;
    padding: 7px 12px;
  }
  .treehouse-controls {
    gap: 6px;
    padding-top: 12px;
  }
  .treehouse-controls > div {
    gap: 6px;
  }
  .treehouse-controls button {
    min-width: 44px;
    min-height: 54px;
    padding: 9px 12px;
    font-size: 14px;
  }
  .treehouse-controls .treehouse-interact {
    min-width: 112px;
    font-size: 12px;
    padding-inline: 8px;
  }
}
@media (max-width: 620px) and (max-height: 700px) and (orientation: portrait) {
  .treehouse-world {
    padding-top: 104px;
    padding-bottom: 12px;
    gap: 7px;
  }
  .treehouse-toolbar {
    gap: 6px;
  }
  .treehouse-characters button {
    min-height: 51px;
  }
  .treehouse-badges {
    bottom: calc(100% + 5px);
  }
  .treehouse-goal {
    min-height: 42px;
  }
  .treehouse-goal small {
    display: none;
  }
  .game-dialog.game-treehouse.is-runner .game-bottom {
    top: 62px;
  }
  .treehouse-controls {
    padding-top: 6px;
  }
  .treehouse-controls button {
    min-height: 46px;
  }
}
@media (max-height: 600px) and (orientation: landscape) {
  .treehouse-world {
    padding: 58px max(16px, env(safe-area-inset-right)) 10px
      max(16px, env(safe-area-inset-left));
    gap: 4px;
    grid-template-columns: minmax(0, 1fr) 188px;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .treehouse-top {
    grid-column: 1 / -1;
  }
  .treehouse-route button {
    min-height: 30px;
    font-size: 10px;
  }
  .treehouse-route button > span {
    width: 20px;
    height: 20px;
  }
  .treehouse-badges {
    min-height: 30px;
    padding-block: 2px;
  }
  .treehouse-badges i {
    width: 22px;
    height: 22px;
    font-size: 14px;
  }
  .treehouse-goal {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    display: block;
    padding: 8px 6px;
    min-height: 0;
  }
  .treehouse-goal small {
    display: none;
  }
  .treehouse-goal strong {
    font-size: 12px;
    display: block;
  }
  .treehouse-view {
    grid-column: 1;
    grid-row: 2;
    border-radius: 16px;
  }
  .treehouse-toolbar {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    flex-direction: column;
    gap: 6px;
    padding-inline: 5px;
  }
  .treehouse-characters {
    gap: 5px;
    width: 100%;
  }
  .treehouse-characters button {
    flex: 1;
    padding: 3px;
    gap: 2px;
    min-height: 44px;
    border-radius: 10px;
  }
  .treehouse-characters svg {
    width: 25px;
    height: 32px;
  }
  .treehouse-characters b {
    font-size: 12px;
  }
  .treehouse-characters small,
  .treehouse-characters kbd {
    display: none;
  }
  .treehouse-room-actions {
    gap: 3px;
    width: 100%;
  }
  .treehouse-room-actions button {
    padding: 5px;
    font-size: 10px;
    min-height: 38px;
    flex: 1;
    border-radius: 9px;
  }
  .treehouse-room-actions [data-treehouse-reset] {
    flex: 0 0 37px;
    font-size: 21px;
  }
  .treehouse-room-actions [data-treehouse-reset] span {
    display: none;
  }
  .treehouse-controls {
    grid-column: 1 / -1;
    padding-top: 5px;
  }
  .treehouse-controls button {
    min-height: 42px;
    min-width: 52px;
    padding: 7px 15px;
    font-size: 12px;
    border-radius: 11px;
  }
  .treehouse-controls .treehouse-interact {
    min-width: 128px;
    font-size: 12px;
  }
  .game-treehouse .game-header h2 {
    font-size: 16px;
  }
  .game-dialog.game-treehouse.is-runner .game-bottom {
    top: 11px;
    right: 180px;
    height: 36px;
  }
}
@media (max-height: 380px) and (orientation: landscape) {
  .treehouse-world {
    grid-template-columns: minmax(0, 1fr) 165px;
    padding-top: 52px;
  }
  .treehouse-route {
    gap: 0;
  }
  .treehouse-route button {
    gap: 4px;
    font-size: 9px;
  }
  .treehouse-badges {
    padding-inline: 5px;
  }
  .treehouse-badges b {
    gap: 3px;
  }
  .treehouse-goal {
    padding-top: 2px;
  }
  .treehouse-goal strong {
    font-size: 11px;
  }
  .treehouse-characters button {
    min-height: 39px;
  }
  .game-treehouse .game-header h2 {
    font-size: 13px;
  }
  .game-treehouse .game-header > div > span {
    display: none;
  }
  .game-dialog.game-treehouse.is-runner .game-bottom {
    right: 149px;
    width: 65px;
  }
}
