:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --fg: #1c1f24;
  --card: #ffffff;
  --line: #d9dde3;
  --accent: #2563eb;
  --ok: #15803d;
  --err: #b91c1c;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171c; --fg: #e7eaee; --card: #1d2127; --line: #333a44; --accent: #60a5fa; --ok: #4ade80; --err: #f87171; }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 16px;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
}
header { max-width: 760px; margin: 8px auto 20px; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
.sub { margin: 0; opacity: .7; }
main { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 0; }
/* Der Input bleibt im Layout (nur unsichtbar): ein per display:none
   versteckter File-Input oeffnet auf iOS keinen Kameradialog. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
button, .filebtn, select {
  font: inherit;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; }
.capture {
  display: grid;
  place-items: center;
  min-height: 200px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(127,127,127,.06);
}
video, img#snapshot { width: 100%; max-height: 420px; object-fit: contain; display: block; }
.placeholder { opacity: .6; }
textarea { width: 100%; margin-top: 12px; padding: 10px; font: 14px/1.5 ui-monospace, monospace;
  border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; resize: vertical; }
progress { width: 100%; margin-top: 12px; }
.field { display: grid; gap: 4px; min-width: 150px; flex: 1 1 170px; }
.field > span { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.field select { width: 100%; }
.hint { font-size: .85rem; opacity: .7; margin-right: auto; }
.status { min-height: 1.4em; margin: 10px 0 0; font-size: .92rem; }
.status.ok { color: var(--ok); }
.status.error { color: var(--err); }
.list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.list li { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.list .meta { display: flex; gap: 8px; align-items: center; justify-content: space-between;
  font-size: .82rem; opacity: .75; margin-bottom: 6px; }
.list .meta button { padding: 2px 8px; font-size: .8rem; }
.list pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 14px/1.45 ui-monospace, monospace; }
.empty { opacity: .6; border: none; }
