.editor_page {
  overflow: auto;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 12px;
  box-sizing: border-box;
  gap: 10px;
}

.editor_page > .editor_toolbar,
.editor_page > .editor_footer,
.editor_page > .editor_message {
  flex: 0 0 auto;
}

.editor_toolbar,
.editor_footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.editor_toolbar button,
.editor_footer button {
  padding: 8px 12px;
  font-weight: 700;
}

.editor_toolbar button.active {
  outline: 3px solid #f7fbff;
}

.editor_toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.editor_page input[type="text"],
.editor_page input[type="number"],
.editor_page select {
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgb(7 20 33 / 72%);
  color: #f7fbff;
  font: inherit;
}

.editor_page input[type="number"] {
  width: 72px;
}

.player_preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 8px 0 6px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  background: rgb(7 20 33 / 55%);
  overflow: hidden;
}

.player_preview_label {
  font-size: 12px;
  white-space: nowrap;
  opacity: 0.85;
}

.player_preview_stage {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 28px;
  height: 34px;
  overflow: hidden;
  border-bottom: 2px solid rgb(255 209 102 / 60%);
}

.player_preview_stage img {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  transform-origin: center bottom;
  transition: transform 120ms ease;
}

.spacer {
  flex: 1;
}

.editor_main {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#editor_canvas,
#world_canvas,
#explore_canvas {
  flex: 1;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid rgb(255 255 255 / 18%);
  cursor: crosshair;
  touch-action: none;
  width: 100%;
  height: auto;
}

.pan {
  align-self: center;
  padding: 14px 10px;
}

.editor_canvas_column {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.editor_canvas_column #editor_canvas {
  flex: 0 0 auto;
  width: 100%;
  height: auto;
}

.pan_v {
  align-self: center;
  padding: 4px 40px;
}

.swatches button {
  color: #1b2634;
  font-weight: 800;
}

#props {
  position: absolute;
  top: 12px;
  right: 64px;
  width: 210px;
  max-height: calc(100% - 24px);
  overflow: auto;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  padding: 14px;
  background: rgb(7 20 33 / 86%);
}

#props h3 {
  margin: 0 0 10px;
}

#props select {
  width: 100%;
}

.prop_slider {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
}

.prop_slider input {
  width: 100%;
}

.prop_image_thumb {
  display: block;
  max-width: 100%;
  max-height: 80px;
  margin: 6px 0;
  border-radius: 4px;
  object-fit: contain;
}

.sign_page_row {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 6px 0;
}

.sign_page_row textarea {
  flex: 1;
  resize: vertical;
}

.sign_choice_list {
  margin: 0 0 12px 18px;
  padding-left: 10px;
  border-left: 2px solid rgb(255 255 255 / 15%);
}

.sign_choice_row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.sign_choice_row input {
  flex: 1;
}

.swatches {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.swatches button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  padding: 0;
}

.editor_footer a {
  color: #ffd166;
  font-weight: 700;
}

.editor_message {
  min-height: 44px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgb(7 20 33 / 72%);
  border: 1px solid rgb(255 255 255 / 18%);
  white-space: pre-wrap;
  font-size: 14px;
}

@media (max-width: 760px) {
  .editor_page {
    padding: 8px;
    gap: 6px;
  }

  .editor_toolbar,
  .editor_footer {
    gap: 5px;
  }

  .editor_toolbar button,
  .editor_footer button {
    padding: 7px 9px;
  }
}
