:root {
  color-scheme: dark;
  --bg: #080808;
  --panel: #151515;
  --panel-soft: #202020;
  --text: #f5f2ec;
  --muted: #b6afa5;
  --line: #38332d;
  --accent: #f0b84d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
}

.workspace {
  min-height: 100vh;
  padding: clamp(14px, 2vw, 24px);
}

.tool-panel {
  display: grid;
  gap: 14px;
  max-width: 1380px;
  margin: 0 auto;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.field {
  display: grid;
  gap: 6px;
  width: min(100%, 280px);
}

.field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

input,
button {
  min-height: 44px;
  border-radius: 8px;
  font: inherit;
}

input {
  width: 100%;
  border: 1px solid #575047;
  background: #0c0c0c;
  color: var(--text);
  padding: 0 12px;
  font-size: 1rem;
}

input:focus {
  outline: 2px solid rgba(240, 184, 77, 0.55);
  outline-offset: 2px;
}

button {
  border: 1px solid #7b5f2a;
  background: var(--accent);
  color: #15100a;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #ffd075;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.status {
  min-height: 20px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

@media (max-width: 620px) {
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .field,
  button,
  .status {
    width: 100%;
  }
}
