/* ===================== Toast 轻提示 ===================== */
/* 用法：window.showToast('提示文案')；window.hideToast() 主动关闭。 */
/* 注意：toast 位于 .h5-stage 内（stage 有 transform 缩放），必须用 absolute 定位，
   否则 fixed 会被 transform 降级为 absolute 并产生定位偏差。 */
.site-toast {
  --toast-bg: #272727;
  --toast-color: #f4eee1;
  --toast-font-size: .35rem;
  --toast-height: .68rem;
  --toast-radius: .34rem;
  --toast-bottom: 1rem;
  --toast-icon-size: .46rem;
  --toast-duration: .25s;

  position: absolute;
  bottom: var(--toast-bottom);
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 10100;
  /* 默认隐藏；通过 is-active 控制可见性，避免依赖 display 切换丢失过渡。 */
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--toast-duration) var(--ease-out), visibility var(--toast-duration) var(--ease-out);
}

.site-toast.is-active {
  opacity: 1;
  visibility: visible;
}

.site-toast__content {
  display: flex;
  align-items: center;
  height: var(--toast-height);
  line-height: var(--toast-height);
  max-width: 80%;
  padding: 0 .3rem 0 .7rem;
  background-color: var(--toast-bg);
  color: var(--toast-color);
  font-size: var(--toast-font-size);
  border-radius: var(--toast-radius);
  position: relative;
  /* 长文案换行；保持单行高度时省略。 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "en1zc";
}

[data-lang="ja"] .site-toast__content {
  font-family: "ja2";
}

/* 左侧 ! 图标（伪元素，节省 DOM 节点）。 */
.site-toast__content::after {
  content: "";
  width: var(--toast-icon-size);
  height: var(--toast-icon-size);
  background: url('/m/assets/images/common/icon-toast.png') 50% 50% / 100% 100% no-repeat;
  position: absolute;
  top: 50%;
  left: .1rem;
  transform: translateY(-50%);
  user-select: none;
  pointer-events: none;
}