* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  color: #222;
  background: #fafafa;
}
.container {
  max-width: 1000px;
  margin: 20px auto;
  padding: 16px;
}
.controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.controls button { padding: 8px 12px; }
.preview {
  position: relative;
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 12px;
}
#video, #overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
#overlay { pointer-events: none; }
.hidden { display: none; }
.panels { display: grid; grid-template-columns: 1fr 280px 1fr; gap: 12px; margin-top: 12px; }
.panel { background: #fff; border: 1px solid #e9e9e9; border-radius: 8px; padding: 12px; }
.panel h3 { margin: 0 0 8px; font-size: 16px; }
.panel.info .kv { display: flex; justify-content: space-between; border-bottom: 1px dashed #eee; padding: 6px 0; }
.panel.info .kv:last-child { border-bottom: none; }
#decoded { width: 100%; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace; }

