.miniprogram-home {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 9px;
  color: #ffe2a5;
  background: rgba(73, 73, 68, .92);
  border: 1px solid #f0cf7b99;
  border-radius: 50%;
  box-shadow: 0 4px 14px #0005;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.miniprogram-home[hidden] { display: none !important; }
.miniprogram-home:focus:not(:focus-visible) { outline: none; }
.miniprogram-home:focus-visible { outline: 2px solid #ffe2a5; outline-offset: 3px; }

.miniprogram-home svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.miniprogram-home:active {
  background: rgba(96, 93, 78, .96);
}

.character-entry-stage > .miniprogram-home {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
}

.miniprogram-home-layer {
  position: fixed;
  inset: 0;
  z-index: 18000;
  pointer-events: none;
}

.miniprogram-home-layer[hidden] {
  display: none;
}

.miniprogram-home-layer > .miniprogram-home {
  position: absolute;
  top: 100px;
  right: max(18px, env(safe-area-inset-right));
}

/* The desktop task page keeps a scene list along the right edge. */
.miniprogram-home-layer[data-task-page="true"] > .miniprogram-home {
  right: max(248px, env(safe-area-inset-right));
}

html[data-tc-mobile="true"] .miniprogram-home-layer > .miniprogram-home {
  top: 144px;
  right: max(8px, env(safe-area-inset-right));
}

html[data-tc-loading="true"] .miniprogram-home-layer,
html[data-tc-reward-open="true"] .miniprogram-home-layer,
html[data-tc-scene-menu-open="true"] .miniprogram-home-layer,
html[data-tc-quality-open="true"] .miniprogram-home-layer,
html[data-tc-task-open="true"] .miniprogram-home-layer,
html[data-anjihai-rally="true"] .miniprogram-home-layer {
  display: none !important;
}

html[data-tc-rotated="true"] .miniprogram-home-layer {
  inset: 50% auto auto 50%;
  width: 100dvh;
  height: 100dvw;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center;
}
