:root {
  color-scheme: light dark;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem;
  line-height: 1.4;
}

header {
  margin-bottom: 1.5rem;
}

.subtitle {
  color: #666;
  margin-top: 0.25rem;
}

nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tab {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid #888;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}

.tab.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

fieldset {
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 1rem;
}

label {
  display: block;
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

input {
  display: block;
  width: 100%;
  padding: 0.4rem;
  margin-top: 0.2rem;
  box-sizing: border-box;
}

button[type="submit"],
#btn-start-camera,
#btn-stop-camera {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

.error {
  color: #b91c1c;
  margin-top: 0.75rem;
}

#qr-result {
  margin-top: 1.5rem;
  text-align: center;
}

#qr-img {
  max-width: 280px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.actions a,
#scanned-vcf-download {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: #16a34a;
  color: white;
  text-decoration: none;
}

.hint {
  color: #666;
  font-size: 0.85rem;
  margin-top: 1rem;
}

.scan-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.file-fallback {
  font-size: 0.85rem;
  color: #666;
}

#scan-video {
  width: 100%;
  max-width: 480px;
  border-radius: 8px;
  background: #000;
}

#scan-result {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
}
