/* ==========================================================
   小院花园 · 全局样式
   设计基准 1080×1920（竖屏），容器自适应缩放铺满视口
   ========================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #2E6B4F;          /* 深绿 fallback，加载完成后会被 Canvas 覆盖 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  font-family: "ZCOOL KuaiLe", "站酷快乐体", "Ma Shan Zheng", "马善政楷体", sans-serif;
}

/* ---------- 启动加载画面 ---------- */
#boot-screen {
  position: fixed; inset: 0;
  background: #F7F0DC;          /* 米白（风格板色） */
  color: #2E6B4F;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  z-index: 9999;
  transition: opacity 0.6s ease;
}
#boot-screen.hidden { opacity: 0; pointer-events: none; }

.boot-logo {
  font-size: 64px;
  font-weight: bold;
  letter-spacing: 8px;
  margin-bottom: 16px;
}
.boot-sub {
  font-size: 24px;
  color: #6E4B36;               /* 原木棕 */
  margin-bottom: 48px;
}
.boot-bar-wrap {
  width: 360px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.boot-bar {
  width: 100%; height: 14px;
  background: #DDAC8D;          /* 陶土橙 */
  border-radius: 8px;
  overflow: hidden;
}
#boot-fill {
  width: 0; height: 100%;
  background: #6FA84B;          /* 草绿 */
  border-radius: 8px;
  transition: width 0.2s ease;
}
#boot-pct { font-size: 20px; }

/* ---------- 游戏容器：竖屏等比缩放 ---------- */
#game-wrap {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* JS 在 main.js 里动态计算 scale 和尺寸 */
  transform-origin: center center;
}
#game-wrap canvas {
  display: block;
  width: 1080px; height: 1920px;  /* 固定设计尺寸，JS 外层整体缩放 */
  filter: saturate(1.14) contrast(1.03);  /* 让手绘素材的颜色更饱满 */
}

/* UI 层叠在 Canvas 之上 */
#ui-layer {
  position: absolute; inset: 0;
  pointer-events: none;            /* 默认穿透；弹层激活时内部元素再开启 */
}

/* ---------- 中文字体 fallback ---------- */
@font-face {
  font-family: "ZCOOL KuaiLe";
  src: url("../素材/字体/ZCOOLKuaiLe-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Ma Shan Zheng";
  src: url("../素材/字体/MaShanZheng-Regular.ttf") format("truetype");
  font-display: swap;
}
