html, body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #fff;
  font: 16px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

#video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Рамка-підказка, куди наводити штрихкод */
.frame {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(80vw, 420px);
  height: min(45vw, 240px);
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255, 255, 255, .9);
  border-radius: 12px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45);
}
.frame.ok { border-color: #3ddc84; }

.line {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 2px;
  background: #ff3b30;
  box-shadow: 0 0 8px #ff3b30;
}

.bar {
  position: fixed;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
}
.bar.top { top: 0; padding-top: max(16px, env(safe-area-inset-top)); }
.bar.bottom { bottom: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }

#status {
  background: rgba(0, 0, 0, .6);
  padding: 8px 14px;
  border-radius: 10px;
}
#status.error { background: rgba(200, 30, 30, .85); }

button {
  font: inherit;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 10px;
  padding: 10px 18px;
}
button[aria-pressed="true"] { background: #f5c518; color: #000; }
