*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  user-select: none;
}

/* 舞台：设计稿固定 1024 × 570，由 core.js 等比缩放 */
.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #19110c 0%, #050403 72%);
}

.stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--stage-w);
  height: var(--stage-h);
  overflow: hidden;
  background: var(--c-stage);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
  transform-origin: center center;
  isolation: isolate;
}

.stage img {
  pointer-events: none;
}

/* 启动失败提示 */
.boot-error {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 0 120px;
  color: #e6d8be;
  font-family: var(--font-serif);
}

.boot-error h1 {
  margin: 0 0 18px;
  font-size: 26px;
  letter-spacing: 3px;
}

.boot-error p {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.8;
  color: #c9b995;
}

.boot-error__hint {
  color: #8f8268 !important;
}

/* 轻提示 */
.toast {
  position: absolute;
  left: 50%;
  bottom: 64px;
  z-index: 200;
  padding: 9px 20px;
  border: 1px solid var(--c-bronze);
  background: linear-gradient(#241d16, #14100c);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  color: #e9dcc0;
  font-size: 12px;
  letter-spacing: 1px;
  transform: translateX(-50%);
  animation: toast-in 0.18s ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
