:root {
  --bg: #0d1117; --panel: #161b22; --border: #30363d; --border2: #21262d;
  --text: #e6edf3; --muted: #8b949e; --accent: #58a6ff; --accent2: #3fb950;
  --code-bg: #0d1117; --warn: #d29922;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5; padding: 2rem 1rem;
}
.wrap { max-width: 860px; margin: 0 auto; }
h1 { font-size: 1.5rem; font-weight: 600; margin: 0 0 .25rem; }
.sub { color: var(--muted); margin: 0 0 1.5rem; font-size: .9rem; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem; }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px dashed var(--border); border-radius: 10px; padding: 2.5rem 2rem;
  min-height: 150px; text-align: center; cursor: pointer; transition: .15s; color: var(--muted);
}
.drop svg { width: 34px; height: 34px; margin-bottom: .75rem; opacity: .55; }
.drop:hover svg, .drop.over svg { opacity: 1; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--text); background: #1c2128; }
.drop input { display: none; }
.row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-size: .8rem; color: var(--muted); }
.field input, .field select {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: .45rem .6rem; font-size: .9rem; width: 150px;
}
button { background: var(--accent2); color: #05130a; border: none; font-weight: 600; border-radius: 6px; padding: .55rem 1.1rem; cursor: pointer; font-size: .9rem; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.sec { background: #21262d; color: var(--text); }
.status { font-size: .85rem; color: var(--muted); margin-top: .6rem; min-height: 1.2em; }
canvas { width: 100%; height: 100px; display: block; margin-top: 1rem; border-radius: 6px; background: var(--bg); }
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; overflow-x: auto; font-size: .8rem; font-family: "SF Mono", Consolas, monospace; max-height: 380px; margin: 0; }
.code-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.code-head h2 { font-size: 1rem; margin: 0; }
.muted-s { font-size: .75rem; color: var(--muted); }
.warn { color: var(--warn); font-size: .8rem; margin-top: .5rem; }
.hidden { display: none; }
code.inline { background: var(--border2); padding: .1rem .35rem; border-radius: 4px; font-size: .85em; }