.editor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  min-height: 100vh;
  padding: 16px;
}

.editor-board,
.editor-panel {
  min-width: 0;
}

.editor-board {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.editor-top,
.tool-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.editor-top h1 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1;
}

.editor-actions,
.transfer-actions,
.campaign-actions,
.server-actions {
  display: flex;
  gap: 8px;
}

.text-button {
  display: inline-grid;
  min-height: 40px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #24251f;
  color: var(--text);
  text-decoration: none;
}

#editorCanvas {
  display: block;
  width: 100%;
  max-height: calc(100vh - 118px);
  aspect-ratio: 1 / 1;
  border: 1px solid #2b2b27;
  border-radius: 8px;
  background: #070806;
  cursor: crosshair;
}

.editor-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.tool-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.tool-card h2 {
  margin: 0;
  color: var(--gold);
  font-size: 0.9rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tool-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #10110f;
  color: var(--text);
  font: inherit;
}

input,
select {
  min-height: 40px;
  padding: 0 10px;
}

textarea {
  min-height: 180px;
  resize: vertical;
  padding: 10px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tool-grid button,
.campaign-actions button,
.transfer-actions button,
.server-actions button,
.editor-actions button {
  min-height: 40px;
  padding: 0 10px;
}

.campaign-actions button,
.server-actions button {
  flex: 1;
}

.tool-grid button.active {
  border-color: var(--gold);
  background: #3b3422;
  color: #fff5cf;
}

.size-tools {
  grid-template-columns: 1fr 1fr;
}

.size-tools h2,
.size-tools button {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .editor-shell {
    grid-template-columns: 1fr;
  }

  #editorCanvas {
    max-height: none;
  }
}

@media (max-width: 620px) {
  .editor-shell {
    padding: 10px;
  }

  .editor-top {
    align-items: stretch;
    flex-direction: column;
  }

  .editor-actions,
  .transfer-actions,
  .server-actions {
    flex-wrap: wrap;
  }
}
