*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  display: flex;
  height: 100vh;
  overflow: hidden;
  font: 13px/1.4 system-ui, sans-serif;
  background: #1a1a1a;
  color: #d0d0d0;
}

/* ── left panel ── */
#panel {
  width: 236px;
  flex-shrink: 0;
  background: #252525;
  border-right: 1px solid #383838;
  padding: 10px 10px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.group {
  padding: 7px 0 5px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #777;
  margin-bottom: 1px;
}

hr { border: none; border-top: 1px solid #363636; }

/* slider rows */
.row { display: flex; align-items: center; gap: 4px; }
.row label { width: 90px; flex-shrink: 0; color: #bbb; }
.row input[type=range] { flex: 1; min-width: 0; accent-color: #4f9eff; cursor: pointer; }
.row span {
  width: 36px;
  text-align: right;
  color: #777;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

/* checkboxes */
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: #bbb;
  user-select: none;
}
.check input { accent-color: #4f9eff; cursor: pointer; }

/* file button */
.file-btn {
  display: inline-block;
  padding: 5px 10px;
  background: #303030;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  cursor: pointer;
  color: #d0d0d0;
  font-size: 13px;
  user-select: none;
  text-align: center;
}
.file-btn:hover { background: #3a3a3a; }
.file-btn input { display: none; }

.hint { color: #606060; font-size: 11px; min-height: 14px; }

/* buttons */
button {
  width: 100%;
  padding: 6px 8px;
  margin-top: 3px;
  background: #303030;
  color: #d0d0d0;
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background .12s;
}
button:hover:not(:disabled) { background: #3a3a3a; }
button:disabled { opacity: .35; cursor: default; }

#start-btn { border-color: #3a6aaa; color: #90c0ff; }
#start-btn:hover:not(:disabled) { background: #1e3a5f; }

#save-btn:not(:disabled) { border-color: #3a6aaa; color: #90c0ff; }
#save-btn:hover:not(:disabled) { background: #1e3a5f; }

.file-btn { border-color: #3a6aaa; color: #90c0ff; }
.file-btn:hover { background: #1e3a5f; }

#progress {
  width: 100%;
  height: 6px;
  margin-top: 10px;
  display: block;
  accent-color: #4f9eff;
}

#status {
  margin-top: 6px;
  color: #777;
  font-size: 12px;
  white-space: pre-wrap;
  line-height: 1.55;
}

/* ── canvas ── */
#canvas { flex: 1; min-width: 0; min-height: 0; width: 0; height: 100%; background: #fff; display: block; }
