:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: #eef2f0;
  color: #1e2926;
}

* {
  box-sizing: border-box;
}

html,
body,
#game-shell,
#canvas-host {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-width: 320px;
  min-height: 480px;
  overscroll-behavior: none;
}

#game-shell {
  position: relative;
  background: #eef2f0;
}

#canvas-host canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#audio-controls {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  /* Canvas 暂停区占设计宽度 88/750，再留 8px 操作间距。 */
  right: calc(env(safe-area-inset-right) + 11.733333vw + 8px);
  z-index: 5;
  display: flex;
  gap: 6px;
}

.audio-control {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid #cbd4d0;
  border-radius: 6px;
  background: #ffffff;
  color: #1e2926;
  box-shadow: 0 2px 5px rgb(30 41 38 / 14%);
  font: 600 19px/1 "Segoe UI Symbol", "Microsoft YaHei", sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

.audio-control:focus-visible {
  outline: 3px solid #3e70a5;
  outline-offset: 2px;
}

.audio-control.is-muted {
  color: #7b8581;
  background: #e5ebe8;
}

.audio-control.is-muted::after {
  position: absolute;
  width: 24px;
  height: 2px;
  background: #a84034;
  content: "";
  transform: rotate(-42deg);
}

#loading,
#error,
#rotate-notice {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef2f0;
  color: #1e2926;
  font-size: 16px;
  text-align: center;
}

#error {
  color: #9f352b;
}

#rotate-notice {
  background: #1e2926;
  color: #ffffff;
  z-index: 10;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
