  /* Farben und Schrift aus dem Design System «FMG Region Zofingen» (VFMG-CD) */
  :root {
    --fmg-rot: #b5121b;
    --fmg-schwarz: #000000;
    --fmg-grau: #e5e5e5;
    --weiss: #ffffff;
    --text-gedaempft: #595959;
    --font-sans: Aptos, "Segoe UI", Arial, sans-serif;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; height: 100%; }
  body {
    font-family: var(--font-sans); font-size: 14px; line-height: 20px;
    background: var(--fmg-grau); color: var(--fmg-schwarz);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    -webkit-tap-highlight-color: transparent;
  }
  .card {
    width: 100%; max-width: 440px; background: var(--weiss); border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .10); overflow: hidden;
  }
  .head { background: var(--weiss); padding: 24px 24px 0; }
  .logo { display: block; width: 100%; max-width: 330px; height: auto; }
  .title {
    font-size: 21px; line-height: 26px; font-weight: 700; margin-top: 20px; padding-bottom: 14px;
    border-bottom: 3px solid var(--fmg-rot);
  }
  .body { padding: 20px 24px 24px; }
  .label { font-size: 12px; line-height: 16px; color: var(--text-gedaempft); }
  .name { font-size: 28px; line-height: 34px; font-weight: 700; margin: 2px 0 20px; word-break: break-word; }
  .barcode { background: var(--weiss); padding: 14px 6px 6px; border-radius: 4px; border: 1px solid var(--fmg-grau); }
  .barcode svg { display: block; width: 100%; height: 110px; }
  .num { text-align: center; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; letter-spacing: .12em; margin-top: 8px; }
  .hint { font-size: 12px; line-height: 16px; color: var(--text-gedaempft); text-align: center; margin-top: 16px; }
  .foot { display: flex; justify-content: center; padding: 0 24px 18px; }
  button.link { background: none; border: 0; color: var(--fmg-rot); font: inherit; font-size: 14px; padding: 6px; cursor: pointer; }
  form label { display: block; font-size: 14px; font-weight: 700; margin: 16px 0 6px; }
  form input {
    width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; border: 1px solid #999999; border-radius: 4px; color: var(--fmg-schwarz);
  }
  form input:focus { outline: 2px solid var(--fmg-rot); border-color: transparent; }
  .btn {
    margin-top: 22px; width: 100%; background: var(--fmg-schwarz); color: var(--weiss); border: 0; border-radius: 4px;
    font: inherit; font-size: 17px; font-weight: 700; padding: 14px; cursor: pointer;
  }
  .err { color: var(--fmg-rot); font-size: 14px; margin-top: 10px; min-height: 1em; }
  .install { margin-top: 16px; font-size: 12px; line-height: 17px; color: var(--fmg-schwarz); background: var(--fmg-grau); border-radius: 4px; padding: 10px 12px; }
  .btn-scan {
    margin-top: 18px; width: 100%; background: var(--weiss); color: var(--fmg-schwarz); border: 2px solid var(--fmg-schwarz);
    border-radius: 4px; font: inherit; font-size: 17px; font-weight: 700; padding: 12px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
  }
  .btn-scan svg { width: 22px; height: 22px; }
  .or { text-align: center; font-size: 12px; color: var(--text-gedaempft); margin: 14px 0 -4px; }
  .ok { color: #1a7f37; font-size: 14px; margin-top: 10px; }
  #scanner {
    position: fixed; inset: 0; background: #000; z-index: 10; display: flex; flex-direction: column;
  }
  #scanner video { flex: 1; width: 100%; height: 100%; object-fit: cover; }
  .frame {
    position: absolute; left: 8%; right: 8%; top: 32%; height: 28%; border: 3px solid var(--fmg-rot); border-radius: 8px;
    box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); pointer-events: none;
  }
  .scan-bar {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px max(20px, env(safe-area-inset-bottom));
    color: #fff; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.8));
  }
  .scan-bar p { margin: 0 0 12px; font-size: 15px; line-height: 21px; }
  .scan-bar button { background: #fff; color: #000; border: 0; border-radius: 4px; font: inherit; font-weight: 700; font-size: 16px; padding: 12px 28px; }
  [hidden] { display: none !important; }
  .hint.lead { text-align: left; margin-top: 0; }
