* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#drawCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 1;
}

.sidebar {
  position: fixed;
  top: 0;
  right: -340px;
  width: 340px;
  height: 100%;
  background: #f5f5f5;
  border-left: 1px solid #ddd;
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: right 0.2s ease;
  z-index: 2;
}

.sidebar.open {
  right: 0;
}

.toggle-btn {
  position: absolute;
  top: 12px;
  left: -40px;
  width: 36px;
  height: 36px;
  border: none;
  background: #333;
  color: #fff;
  cursor: pointer;
  z-index: 3;
}

.label-frame {
  margin-bottom: 16px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

label {
  font-size: 0.85em;
  margin-bottom: 2px;
}

input, textarea {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 0.9em;
}

textarea.rules {
  height: 120px;
  resize: vertical;
}

button {
  padding: 4px 8px;
  border: 1px solid #333;
  background: #333;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.9em;
}

.row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
}

.corner-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
}
