* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; background: #eef1f6; color: #1f2937; }
body { display: flex; flex-direction: column; }
header { padding: 10px 16px; background: #1f2937; color: #fff; }
header h1 { margin: 0; font-size: 17px; font-weight: 600; }
header .sub { font-size: 12px; font-weight: 400; color: #9ca3af; margin-left: 8px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 8px 16px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.toolbar label { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.toolbar select, .toolbar input[type=range] { font-size: 13px; }
.toolbar .group { display: inline-flex; gap: 6px; align-items: center; padding-left: 12px; border-left: 1px solid #eee; }
.toolbar button { font-size: 13px; padding: 6px 10px; border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 6px; cursor: pointer; }
.toolbar button:hover { background: #eef2ff; }
.toolbar .mode-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.toolbar label.chk { font-size: 12px; gap: 4px; cursor: pointer; }

.hint { padding: 6px 16px; font-size: 12px; color: #6b7280; background: #f8fafc; border-bottom: 1px solid #e5e7eb; }

.stage { flex: 1; position: relative; min-height: 0; }
#cv { width: 100%; height: 100%; display: block; cursor: crosshair; }

.status { padding: 8px 16px; font-size: 13px; background: #fff; border-top: 1px solid #e5e7eb; }
.status.ok { color: #15803d; }
.status.bad { color: #b91c1c; font-weight: 600; }
