* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #111;
  color: #eee;
  font-family: system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

body { display: flex; flex-direction: row; }

.camera {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
  transform: scaleX(-1);
}

#video,
#overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel {
  width: 360px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #1a1a1a;
  border-left: 1px solid #2a2a2a;
}

#step-title { font-size: 1.45em; font-weight: 600; line-height: 1.2; }
#step-hint  { font-size: 1.05em; line-height: 1.5; color: #c8c8c8; }

.controls {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-nav { display: flex; gap: 8px; }
.step-nav button { flex: 1; }

button {
  padding: 16px 20px;
  font-size: 1em;
  font-weight: 500;
  border: none;
  border-radius: 10px;
  background: #2e7d32;
  color: white;
  cursor: pointer;
  transition: background 120ms;
}
button:hover:not(:disabled) { filter: brightness(1.1); }
button:disabled { background: #333; color: #777; cursor: not-allowed; }
button#start { background: #1976d2; font-size: 1.1em; padding: 18px; }

button.secondary {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  font-size: 0.85em;
  padding: 10px;
  font-weight: 400;
}
button.secondary.is-active {
  background: #1976d2;
  border-color: #1976d2;
  color: white;
}

@media (max-width: 820px), (orientation: portrait) {
  body { flex-direction: column; }
  .panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid #2a2a2a;
    padding: 16px;
    gap: 12px;
  }
  .step-nav button { padding: 14px; }
  button#start { padding: 14px; }
}
