* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #05050a;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  user-select: none;
  touch-action: manipulation;
}
#stage {
  position: absolute; left: 50%; top: 50%;
  width: 720px; height: 1280px;
  transform-origin: center center;
  background: #0a0a12;
  overflow: hidden;
}
.n { position: absolute; pointer-events: none; }
.n img { width: 100%; height: 100%; display: block; pointer-events: none; }
.lab {
  width: 100%; height: 100%; display: block;
  white-space: pre; overflow: hidden;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,.8);
  padding: 0 2px;
}
.n.btn { pointer-events: auto; cursor: pointer; }
.n.btn:active { filter: brightness(1.18); }
.n.mask { pointer-events: auto; }
.ebx {
  width: 100%; height: 100%;
  background: transparent; border: 0; outline: 0;
  color: #fff; font-size: 30px; font-weight: 700; text-align: center;
  padding: 0 8px; pointer-events: auto;
  font-family: inherit;
}
.ebx::placeholder { color: rgba(255,255,255,.45); font-weight: 400; }

/* 自建浮层（提示/输入），不吃原版布局 */
#toast {
  position: fixed; left: 50%; top: 18%; transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #ffd34d; padding: 14px 26px;
  border-radius: 10px; font-size: 26px; font-weight: 700;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 99;
  border: 1px solid rgba(255,211,77,.35); max-width: 80vw; text-align: center;
}
#toast.show { opacity: 1; }
#modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
#modal.show { display: flex; }
#modal .box {
  width: 82vw; max-width: 440px;
  background: linear-gradient(180deg, #241a10, #150f08);
  border: 2px solid #c9a24a; border-radius: 14px; padding: 22px 20px;
  color: #fff; box-shadow: 0 0 30px rgba(201,162,74,.35);
}
#modal h3 { margin: 0 0 14px; font-size: 30px; color: #ffd34d; text-align: center; }
#modal p { margin: 0 0 12px; font-size: 24px; line-height: 1.5; color: #e8dcc4; }
#modal input {
  width: 100%; padding: 12px; font-size: 26px; border-radius: 8px;
  border: 1px solid #6b5a3a; background: #0d0a06; color: #fff; margin-bottom: 14px;
}
#modal .row { display: flex; gap: 12px; }
#modal button {
  flex: 1; padding: 12px; font-size: 26px; font-weight: 700; border-radius: 8px;
  border: 1px solid #c9a24a; background: linear-gradient(180deg,#f0c96a,#c08f2a); color: #3a2400;
  cursor: pointer;
}
#modal button.ghost { background: transparent; color: #d8c79a; border-color: #6b5a3a; }
