/* 液彩分装 —— 奶油底 + 陶土红/湖蓝双色主题（原创配色） */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #FAF3E7;
  color: #33302B;
  overflow: hidden;
  user-select: none;
}
#app { height: 100%; display: flex; flex-direction: column; }

/* ---------- HUD ---------- */
#hud {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; gap: 8px; flex-wrap: wrap;
}
.hud-left, .hud-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lv-badge {
  background: #33302B; color: #FAF3E7; border-radius: 999px;
  padding: 6px 14px; font-size: 15px; font-weight: 600;
}
.lv-badge b { color: #FFC145; }
.moves { font-size: 14px; color: #6B655B; }
.moves b { color: #33302B; }

button {
  border: none; cursor: pointer; font-family: inherit;
  border-radius: 12px; font-size: 14px; padding: 8px 14px;
  transition: transform .08s ease, filter .12s ease;
}
button:active { transform: scale(.94); }
.act { background: #FFFDF8; color: #33302B; box-shadow: 0 2px 0 rgba(51,48,43,.18); font-weight: 600; }
.act:hover { filter: brightness(.97); }
.act.accent { background: #E4572E; color: #FFF6EC; box-shadow: 0 2px 0 #B23F1D; }
.ghost { background: transparent; color: #6B655B; font-size: 18px; padding: 6px 10px; }
.ghost:hover { color: #33302B; }
.ghost.small { font-size: 14px; }
.ghost.wide { width: 100%; margin-top: 10px; }
.ghost:disabled { opacity: .3; cursor: default; }
.primary {
  width: 100%; padding: 13px; font-size: 16px; font-weight: 700;
  background: #E4572E; color: #FFF6EC; border-radius: 14px;
  box-shadow: 0 4px 0 #B23F1D; margin-top: 6px;
}
.primary:hover { filter: brightness(1.05); }

/* ---------- 画布区 ---------- */
#stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
#cv { width: min(96vw, 960px); max-height: 100%; touch-action: manipulation; }
#tip { font-size: 12.5px; color: #A39A8B; margin-top: 6px; text-align: center; padding: 0 12px; }

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(51, 48, 43, .45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.overlay.hidden, .hidden { display: none !important; }
.panel {
  width: min(92vw, 380px); background: #FFFDF8; border-radius: 22px;
  padding: 28px 26px; box-shadow: 0 18px 50px rgba(51,48,43,.25);
  text-align: center;
}
.panel h1 { font-size: 26px; letter-spacing: 2px; }
.panel h2 { font-size: 24px; margin-bottom: 6px; }
.panel .sub { font-size: 13px; color: #6B655B; margin: 10px 0 18px; line-height: 1.7; }
.tabs { display: flex; background: #F1E7D6; border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.tab { flex: 1; background: transparent; color: #6B655B; padding: 8px; border-radius: 9px; font-weight: 600; }
.tab.on { background: #FFFDF8; color: #E4572E; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.panel input {
  width: 100%; border: 2px solid #EADFCB; border-radius: 12px;
  padding: 12px 14px; font-size: 15px; margin-bottom: 12px;
  background: #FFFDF8; color: #33302B; outline: none; font-family: inherit;
}
.panel input:focus { border-color: #E4572E; }
.msg { font-size: 12.5px; color: #C0392B; min-height: 18px; margin-bottom: 6px; }
#winInfo { color: #6B655B; margin-bottom: 16px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 12%; transform: translateX(-50%);
  background: rgba(51,48,43,.88); color: #FAF3E7; font-size: 13.5px;
  padding: 9px 18px; border-radius: 999px; z-index: 30; pointer-events: none;
}
