:root {
  color-scheme: light;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  background: #f5f7fb;
  color: #18202b;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  min-width: 320px;
}

body {
  min-height: 100dvh;
  overflow: hidden;
  touch-action: none;
  background:
    linear-gradient(180deg, #f5f7fb 0%, #e8f4f0 46%, #f3f1e9 100%);
}

.game-shell {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#gameCanvas:active {
  cursor: grabbing;
}

.fallback-actions {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  pointer-events: none;
}

.fallback-actions button {
  min-height: 46px;
  border: 1px solid rgba(24, 32, 43, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: #18202b;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 0;
}

@media (min-width: 720px) {
  body {
    background:
      linear-gradient(135deg, #eef6f8 0%, #f8f4e8 56%, #eef1f6 100%);
  }

  .game-shell {
    width: 100vw;
    transform: none;
    box-shadow: none;
  }
}

@media (min-width: 960px) {
  #gameCanvas {
    cursor: default;
  }

  #gameCanvas:active {
    cursor: grabbing;
  }
}
