* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%;
  background: #2a2620;
  overflow: hidden;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
#game { display: block; width: 100%; height: 100%; }

#bar {
  position: fixed; left: 0; right: 0;
  top: env(safe-area-inset-top, 0px);
  padding: 9px 14px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  color: #fff8ee; font-size: 13px;
  background: linear-gradient(rgba(30,26,22,.62), rgba(30,26,22,0));
  pointer-events: none;
}
#bar .title { font-weight: 600; letter-spacing: .5px; }
#status { font-size: 11px; opacity: .82; }

#tip {
  position: fixed; left: 0; right: 0;
  top: calc(env(safe-area-inset-top, 0px) + 40px);
  text-align: center; color: #fff3dc; font-size: 11px;
  text-shadow: 0 1px 3px rgba(0,0,0,.75);
  pointer-events: none;
}

#controls {
  /* 顶部横排（标题下方），避开左下角摇杆 */
  position: fixed; left: 0; right: 0; top: 62px; bottom: auto; z-index: 20;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;
  padding: 0 8px;
}
#controls button {
  min-width: 62px; padding: 5px 8px;
  border: 1px solid rgba(255,246,224,.55);
  border-radius: 14px;
  background: rgba(30,26,22,.86);
  color: #fff8ee; font-size: 10px;
  font-family: inherit; letter-spacing: .3px;
  cursor: pointer;
}
#controls button.on {
  background: rgba(200,161,101,.88);
  border-color: rgba(255,246,224,.75);
  color: #2a2018; font-weight: 600;
}
