:root {
  color-scheme: dark;
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  background: #111934;
  color: #fff1d0;
}
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; overscroll-behavior: none; }
#game { display: block; width: 100vw; height: 100dvh; touch-action: none; }
dialog {
  width: min(24rem, calc(100vw - 2rem));
  padding: 1.1rem;
  border: 2px solid #778ab5;
  background: #202d57;
  color: #fff1d0;
}
dialog::backdrop { background: #0b1027b3; }
label { display: block; margin-bottom: .6rem; }
input, button { font: inherit; padding: .6rem .7rem; border: 1px solid #778ab5; }
input { width: 100%; background: #111934; color: inherit; }
button { color: #fff1d0; background: #2c3b6c; cursor: pointer; }
button[type="submit"] { color: #3e303a; background: #ffdf96; }
.actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .8rem; }
#toast {
  position: fixed;
  left: 50%;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 2rem);
  padding: .6rem .9rem;
  border: 1px solid #778ab5;
  background: #0b1027;
  text-align: center;
  pointer-events: none;
}
