/**
 * main.css — 全局样式（黑底 + 画布居中 letterbox）
 * control-manifest: 架构新增支撑资源；art-bible.md §3.6 UI 版式基础
 *
 * file:// 下必须自包含；禁止外部字体/图片引用。
 * 画布逻辑分辨率 1280×720 由 JS 控制，此处仅负责居中与视觉兜底。
 */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05070A;                /* 与 nightIndigo 同系，letterbox 补边 */
  color: #E6EAF2;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

/* 画布居中容器 */
#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 游戏画布：逻辑 1280×720；显示尺寸由 boot.fitCanvas 动态计算 */
#game {
  display: block;
  background: #0B1026;                 /* 场景底（加载瞬间兜底） */
  box-shadow: 0 0 48px rgba(0, 0, 0, 0.75);
  image-rendering: auto;
  touch-action: none;
}

/* 焦点可见性（可访问性 §5.2）：画布可 focus 时显示描边 */
#game:focus {
  outline: 2px solid #C9A24B;
  outline-offset: 2px;
}

/* 启动失败/降级提示层（boot 异常时显示） */
#boot-error {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 640px;
  padding: 20px 24px;
  background: #0F141C;
  border: 1px solid #C9A24B;
  border-radius: 8px;
  color: #E6EAF2;
  font-size: 14px;
  line-height: 1.6;
  display: none;
  z-index: 10;
}
#boot-error b { color: #FFD60A; }

/* 无脚本兜底提示 */
noscript p {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #E6EAF2;
  font-size: 16px;
}
