* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  background: #F5F3F2;
  color: #222;
}

/* ── Steffen Eden Branding ── */
.steffen-brand {
  background: #E8E8E8;
  padding: 10px 1.5rem;
  display: flex;
  align-items: center;
  position: relative;
}
.steffen-brand .brand-logo {
  text-decoration: none;
  font-family: Bitter, serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 5px;
  color: rgb(126,193,67);
  z-index: 1;
}
.steffen-brand .brand-logo span {
  color: #5B7E8D;
}
.steffen-brand .brand-toolname {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: Bitter, serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 5px;
  color: rgb(126,193,67);
}

header {
  background: #E8E8E8;
  color: #1f2328;
  padding: 1.2rem 1.5rem;
}

header h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.6rem;
  color: rgb(126,193,67);
}

header p {
  margin: 0;
  font-size: 0.95rem;
  color: #818284;
}

main {
  padding: 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

.upload-area {
  border: 2px dashed #9ca3af;
  border-radius: 8px;
  padding: 2.5rem;
  text-align: center;
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
}

.upload-area.dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.upload-area input[type="file"] {
  display: none;
}

#uploadLabel {
  display: inline-block;
  background: #5B7E8D;
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

#uploadLabel:hover {
  background: #4A6B7A;
}

#status {
  display: block;
  margin-top: 0.8rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.canvases {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.canvas-box {
  background: #fff;
  border-radius: 8px;
  padding: 0.8rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  flex: 1 1 0;
  min-width: 320px;
}

.canvas-box h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  color: #374151;
}

.canvas-box canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.controls {
  background: #fff;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 1.5rem;
}

.controls h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.controls h3 {
  font-size: 0.95rem;
  margin: 0.5rem 0;
}

.controls label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.controls select {
  width: 100%;
  padding: 0.4rem;
  margin-top: 0.3rem;
  border-radius: 4px;
  border: 1px solid #d1d5db;
}

.controls input[type="range"] {
  width: 100%;
  vertical-align: middle;
}

.controls output {
  display: inline-block;
  min-width: 3.5rem;
  text-align: right;
  font-weight: 600;
  color: #5B7E8D;
}

.controls label.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.controls label.checkbox input {
  width: auto;
}

.controls hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.2rem 0;
}

.buttons {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.buttons button {
  flex: 1;
  padding: 0.6rem;
  border: none;
  border-radius: 6px;
  background: rgb(126,193,67);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.buttons button:hover {
  background: rgb(107,164,57);
}

.mode-group {
  display: none;
}

.mode-group.active {
  display: block;
}
