/* ============================================================================
   再垒一块 · stacksteady.css —— 这一款只用它装壳
   ----------------------------------------------------------------------------
   界面本体全部手绘在 canvas 上（塔 / 石条 / 重心点 / 允许带 / 按钮 / 抽屉 / 结算）。
   这一份 CSS 只负责四件事：页面底色、画布居中、启动页、页脚。
   所以这里只有三个色名：谷（底）、墨（字）、警（红字）。其余六个色名在 js\draw.js。
   ========================================================================== */
:root {
  --谷: #dfe3e0;
  --缝: #c8cec9;
  --墨: #1f262b;
  --警: #b0503c;
  --步: -apple-system, "Segoe UI", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--谷);
  color: var(--墨);
  font-family: var(--步);
  -webkit-text-size-adjust: 100%;
  overflow: hidden;                      /* 单屏应用：整页不滚，滚动只发生在画布内的列表里 */
}

body {
  display: flex;
  flex-direction: column;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

/* ---------- 画布：等比铺满，居中；字与图形都按虚拟坐标画 ---------- */
#stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
#cv {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  touch-action: none;                    /* 拖石条的时候别让页面跟着滚 */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: default;
}

/* ---------- 页脚：版本号 + 一句数据说明；三个值没填时这里出红字 ---------- */
#foot {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  padding: 5px 12px calc(5px + env(safe-area-inset-bottom));
  font: 12px/1.35 ui-monospace, Consolas, "DejaVu Sans Mono", monospace;
  color: var(--墨);
  opacity: .72;
  text-align: center;
}
#footWarn { color: var(--警); opacity: 1; font-weight: 700; }

/* ---------- 启动页：图标 + 应用名 + 进度 + 一句在干什么；不留白 ---------- */
#boot {
  position: fixed;
  inset: 0;
  z-index: 9;
  background: var(--谷);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#boot[hidden] { display: none; }
.bwrap { width: 100%; max-width: 300px; text-align: center; }
.bico { line-height: 0; }
.bwrap h1 {
  margin: 14px 0 4px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--墨);
}
.btag { margin: 0 0 22px; font-size: 13px; color: #5d6a70; }
.bbar {
  height: 3px;
  background: var(--缝);
  overflow: hidden;
}
.bbar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--墨);
  transition: width .18s linear;
}
#bootMsg { margin: 12px 0 0; font-size: 13px; color: #5d6a70; }
#bootErr {
  margin: 10px 0 0;
  font: 12px/1.5 ui-monospace, Consolas, monospace;
  color: var(--警);
  word-break: break-all;
  text-align: left;
}
