button {
  touch-action: manipulation;
}
img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
@media (max-width: 760px) {
  html,
  body {
    overscroll-behavior: none;
  }
  .phone {
    --xhs-height:100vh;
    height: 100vh;
    --xhs-height:100vh;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }
  .dashboard {
    flex-basis: auto;
    padding: 7px var(--xhs-local-21) calc(10px + var(--safe-area-inset-bottom,0px)) var(--xhs-local-22);
    padding: 7px max(10px, var(--safe-area-inset-right,env(safe-area-inset-right,0px))) calc(10px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px))) max(10px, var(--safe-area-inset-left,env(safe-area-inset-left,0px)));
  }
  .auto-switch {
    min-height: 44px;
    padding: 7px 9px;
    font-size: 11px;
  }
  .cashbox-button {
    --xhs-height:auto;
    height: auto;
    min-height: 44px;
    margin-bottom: 5px;
    font-size: 11px;
  }
  .close-btn {
    --xhs-width:44px;
    width: 44px;
    --xhs-height:44px;
    height: 44px;
    flex: none;
  }
  .buy-btn,
  .recipe-purchase button,
  .chapter-begin {
    min-height: 44px;
  }
  .chapter-modal.is-playing {
    padding: calc(8px + var(--safe-area-inset-top,0px)) 10px calc(8px + var(--safe-area-inset-bottom,0px));
    padding: calc(8px + var(--safe-area-inset-top,env(safe-area-inset-top,0px))) 10px calc(8px + var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));
  }
  .chapter-scene {
    --xhs-width:var(--xhs-local-23);
    width: var(--xhs-local-23);
    width: min(100%, calc((100dvh - var(--safe-area-inset-top,env(safe-area-inset-top,0px)) - var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)) - 120px)*.5628), 402px);
  }
  .chapter-map,
  .modal,
  .recipe-catalog {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .scene-toast {
    white-space: normal;
    text-align: center;
    line-height: 1.5;
  }
}
@media (max-width: 360px) {
  .topbar {
    --xhs-row-gap:5px;
    --xhs-column-gap:5px;
    grid-gap: 5px;
    gap: 5px;
    padding-left: 9px;
    padding-right: 9px;
  }
  .brand-mark {
    --xhs-row-gap:5px;
    --xhs-column-gap:5px;
    grid-gap: 5px;
    gap: 5px;
  }
  .brand-mark > span {
    --xhs-width:32px;
    width: 32px;
    --xhs-height:35px;
    height: 35px;
    font-size: 20px;
  }
  .brand-mark strong {
    font-size: 13px;
  }
  .brand-mark small {
    font-size: 9px;
  }
  .wallet {
    --xhs-row-gap:3px;
    --xhs-column-gap:3px;
    grid-gap: 3px;
    gap: 3px;
    padding: 8px 6px;
  }
  .wallet b {
    font-size: 12px;
  }
  .brand-level {
    font-size: 9px;
  }
}
@media (max-width: 760px) and (max-height: 700px) {
  .dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    --xhs-row-gap:5px;
    --xhs-column-gap:6px;
    grid-gap: 5px 6px;
    gap: 5px 6px;
  }
  .service-control {
    display: contents;
  }
  .service-control #levelBadge {
    position: absolute;
    --xhs-width:1px;
    width: 1px;
    --xhs-height:1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .auto-switch {
    grid-column: 2;
    grid-row: 1;
    font-size: 10px;
    padding: 6px;
  }
  .cashbox-button {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
  }
  .nav-row {
    grid-column: 1/-1;
    margin-top: 0;
  }
}
.material-level-modal {
  max-height: calc(100% - 24px);
  overflow: auto;
  text-align: center;
}
.material-level-modal .research-stats {
  position: static;
  display: flex;
  justify-content: space-between;
  margin: 14px 0;
}
.material-level-modal .research-xp {
  position: static;
  --xhs-width:auto;
  width: auto;
  margin: 8px 0;
}
.material-level-modal .level-material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  --xhs-row-gap:8px;
  --xhs-column-gap:8px;
  grid-gap: 8px;
  gap: 8px;
}
.material-level-modal .material-unlock {
  --xhs-width:auto;
  width: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 3px;
  --xhs-row-gap:4px;
  --xhs-column-gap:4px;
  grid-gap: 4px;
  gap: 4px;
}
.material-level-modal .material-unlock img {
  --xhs-width:52px;
  width: 52px;
  --xhs-height:52px;
  height: 52px;
  object-fit: contain;
}
.material-level-modal .material-unlock b {
  font-size: 13px;
}
.material-level-modal .material-unlock small {
  font-size: 10px;
}
.material-machines {
  display: flex;
  --xhs-row-gap:8px;
  --xhs-column-gap:8px;
  grid-gap: 8px;
  gap: 8px;
  margin: 16px 0 4px;
  justify-content: space-around;
  font-size: 12px;
}
.material-machines small {
  display: block;
  font-size: 10px;
  margin-top: 5px;
}
#unlockModal.material-level-modal {
  padding-bottom: 32px;
}
#unlockModal.material-level-modal .research-stats {
  padding: 0;
  flex-direction: row;
  align-items: center;
}
#unlockModal.material-level-modal .research-xp {
  margin: 8px 0;
}
#unlockModal.material-level-modal #researchMessage {
  position: static;
  margin: 8px 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
}
#unlockModal.material-level-modal .material-unlock {
  min-height: 76px;
}
#unlockModal.material-level-modal .material-unlock small {
  font-size: 10px;
}
.material-machines > span {
  flex: 1;
  min-width: 0;
}
@media (max-height: 620px) {
  #unlockModal.material-level-modal .level-material-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    --xhs-row-gap:4px;
    --xhs-column-gap:4px;
    grid-gap: 4px;
    gap: 4px;
  }
  #unlockModal.material-level-modal .material-unlock b {
    font-size: 11px;
  }
}
