*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 10vw;
}

@media (min-width: 540px) {
  html {
    font-size: 54px;
  }
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #f2f2f2;
}

.frame-wrap {
  position: relative;
  overflow: hidden;
  height: calc(100% - 1.66rem - env(safe-area-inset-bottom, 0px));
}

#frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #1a1a1a;
  opacity: 1;
}

/* 禁用整页淡出：opacity→0 会露出黑底，造成「闪一下」 */
.frame-wrap.tx-fade-out #frame,
.frame-wrap.tx-fade-in #frame {
  opacity: 1;
  transition: none;
}

.frame-wrap.tx-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid rgba(243, 199, 162, 0.25);
  border-top-color: #f3c7a2;
  border-radius: 50%;
  animation: fusion-spin 0.7s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes fusion-spin {
  to {
    transform: rotate(360deg);
  }
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-sizing: content-box;
  height: 1.66rem;
  max-width: 10rem;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #282828 !important;
  border-top: none;
}

.tabbar button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #969799;
  font-size: 0.3rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.06rem;
}

.tabbar button .tab-icon {
  display: block;
  height: 0.666rem;
  width: auto;
  object-fit: contain;
  pointer-events: none;
}

.tabbar button.active {
  color: #f3c7a2;
  background: #282828 !important;
}

.tabbar button span {
  display: block;
  font-size: 0.3rem;
}
