:root {
  --bg: #0d1117;
  --panel: #161b22;
  --line: #263040;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --good: #34d399;
  --warn: #f0b429;
  --bad: #f87171;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.topbar h1 { margin: 0; font-size: 22px; }
.topbar .sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.worker-box { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.worker-box input { width: min(360px, 40vw); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
  padding: 16px 20px;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.panel h2 { margin: 0 0 10px; font-size: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

button {
  background: #1f6feb;
  color: #fff;
  border: 1px solid #388bfd;
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
}

button:hover { background: #2f81f7; }
button:disabled { opacity: 0.55; cursor: not-allowed; }

input, textarea {
  background: #0d1117;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
}

textarea {
  width: 100%;
  min-height: 320px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  resize: vertical;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 label { display: grid; gap: 6px; font-size: 13px; }

.hint { color: var(--muted); font-size: 12px; }

.paste-box { display: grid; gap: 6px; font-size: 13px; margin-top: 10px; }
.paste-box input { width: 100%; }
.warn {
  border: 1px solid #6b5b22;
  background: #231f12;
  color: #f5d67b;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.out {
  white-space: pre-wrap;
  background: #0d1117;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-height: 64px;
  font-size: 12px;
}

.out.ok { border-color: #1e3a2b; }
.out.bad { border-color: #4a1d24; }

canvas {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0e13;
}

.foot {
  padding: 12px 20px 20px;
  color: var(--muted);
  font-size: 12px;
}
