:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #263b2b;
  background: #101d16;
}
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
.play-stage {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  background: #101d16;
}
.game-frame {
  position: relative;
  width: min(100vw, 50vh);
  height: min(200vw, 100vh);
  width: min(100vw, 50dvh);
  height: min(200vw, 100dvh);
  background: #183a2d;
}
canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; }
#loading { position: absolute; inset: 0; display: grid; place-items: center; color: #f4dda1; background: #183a2d; font-size: 14px; }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible, canvas:focus-visible { outline: 2px solid #c39a4f; outline-offset: -2px; }
dialog {
  width: min(430px, calc(100vw - 30px));
  max-height: 85dvh;
  padding: 30px;
  overflow: auto;
  background: linear-gradient(125deg,#fff5d9,#edd8b2);
  color: #263b2b;
  border: 3px double #b79048;
  border-radius: 22px;
  box-shadow: 0 30px 100px #0009, inset 0 0 0 3px #fff0cb;
}
dialog::backdrop { background: #071f1bd4; }
dialog h2 { margin: 0 0 20px; color: #294630; font: bold 23px "KaiTi", "STKaiti", serif; }
dialog p, dialog li { color: #65563c; font-size: 13px; line-height: 2; }
dialog ul { padding-left: 20px; }
.close { position: absolute; right: 12px; top: 10px; padding: 3px 9px; border: 0; background: transparent; color: #7c663d; font-size: 25px; }
.dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.dialog-actions button { flex: 1; padding: 12px; border-radius: 10px; border: 1px solid #b39150; background: #ecd5a7; color: #34432e; white-space: nowrap; }
.dialog-actions .primary { background: linear-gradient(#477955,#244d35); color: #fff3cf; border-color: #a78b48; }
dialog input { width: 100%; padding: 11px; border: 1px solid #c2a46a; border-radius: 8px; background: #fff4d4; color: #324632; }
dialog .small { color: #867450; font-size: 11px; }
#cloud-form > label { display: block; margin: 14px 0 6px; color: #34432e; font-size: 14px; }
#cloud-form .cloud-check { display: flex; align-items: center; gap: 8px; }
#cloud-form .cloud-check input { width: auto; }
#cloud-status:empty { display: none; }
