#web-gm {
  box-sizing: border-box;
  width: min(450px, calc(100vw - 28px));
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 28px;
  overflow-y: auto;
  border: 2px solid #bb925e;
  border-radius: 24px;
  box-shadow: 0 8px 40px #291a1380, inset 0 0 0 5px #f7e4bd;
  background: #fbefda;
  color: #59351f;
  font-family: SimSun, "Songti SC", serif;
  text-align: left;
}
#web-gm::backdrop {
  background: #281a1399;
}
#web-gm form {
  margin: 0;
}
#web-gm h2 {
  margin: 0 0 22px;
  text-align: center;
  font-size: 28px;
}
#web-gm label {
  display: block;
  margin: 16px 0 8px;
  font-size: 18px;
  font-weight: bold;
}
#web-gm .gm-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dbc4a1;
}
#web-gm input[type="checkbox"] {
  width: 26px;
  height: 26px;
  margin: 0;
  accent-color: #72934b;
}
#web-gm input[type="number"],
#web-gm input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #c09b6b;
  border-radius: 10px;
  outline-color: #789357;
  background: #fff8ea;
  color: #59351f;
  font: 18px SimSun, "Songti SC", serif;
  user-select: text;
}
#web-gm p {
  margin: 8px 0;
  line-height: 1.5;
  font-size: 14px;
}
#gm-error {
  min-height: 21px;
  color: #a24635;
}
#web-gm footer {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
#web-gm button {
  flex: 1;
  min-height: 46px;
  padding: 10px;
  border: 1px solid #ad8457;
  border-radius: 12px;
  background: #ead4ad;
  color: #59351f;
  font: bold 18px SimSun, "Songti SC", serif;
  cursor: pointer;
}
#web-gm button[type="submit"] {
  border-color: #52773a;
  background: #809e56;
  color: #fff6df;
}
@media (max-height: 640px) {
  #web-gm { padding: 20px 24px; }
  #web-gm h2 { margin-bottom: 14px; }
  #web-gm label { margin-top: 10px; }
}
