    :root {
      --panel-bg: rgba(0, 0, 0, 0.76);
      --panel-border: rgba(255, 255, 255, 0.16);
      --ok: #3ddc97;
      --warn: #ffcc66;
      --err: #ff6b6b;
      --muted: #a9b0bd;
    }

    html, body {
      margin: 0;
      padding: 0;
      background: #111;
      overflow: hidden;
      font-family: Inter, system-ui, sans-serif;
    }

    .reveal {
      height: 100vh;
      width: 100vw;
    }


    .reveal {
      color: #f3f6fb;
      background: radial-gradient(circle at top, #1a2230 0%, #111 45%, #0b0b0b 100%);
      font-family: Inter, system-ui, sans-serif;
    }

    .reveal .slides section {
      text-align: left;
    }

    .reveal h1,
    .reveal h2,
    .reveal h3 {
      color: #ffffff;
      text-transform: none;
      letter-spacing: 0.02em;
    }

    .reveal p,
    .reveal li {
      color: #dce4f2;
      line-height: 1.35;
    }

    #flash {
      position: fixed;
      inset: 0;
      background: rgba(61, 220, 151, 0.14);
      z-index: 25;
      opacity: 0;
      pointer-events: none;
      transition: opacity 140ms ease;
    }
    #flash.visible { opacity: 1; }

    #hud {
      position: fixed;
      top: 12px;
      right: 12px;
      width: 340px;
      z-index: 40;
      background: var(--panel-bg);
      border: 1px solid var(--panel-border);
      border-radius: 14px;
      padding: 12px;
      color: #fff;
      box-shadow: 0 10px 30px rgba(0,0,0,.25);
      backdrop-filter: blur(8px);
      pointer-events: auto;
    }
    #hud.hidden {
      display: none;
    }

    #hud h1 {
      margin: 0 0 8px 0;
      font-size: 16px;
      font-weight: 700;
    }

    .row {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin: 6px 0;
      font-size: 13px;
    }

    .value-muted { color: var(--muted); }
    .value-ok { color: var(--ok); }
    .value-warn { color: var(--warn); }
    .value-err { color: var(--err); }

    #cameraWrap {
      margin-top: 10px;
      border-radius: 10px;
      overflow: hidden;
      background: #000;
      border: 1px solid rgba(255,255,255,0.12);
      position: relative;
      aspect-ratio: 4 / 3;
    }

    #camera, #overlay, #cameraPlaceholder {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      transform: scaleX(-1);
    }

    #overlay, #cameraPlaceholder, #flash {
      pointer-events: none;
    }

    #cameraPlaceholder {
      display: grid;
      place-items: center;
      color: #d8dde8;
      background:
        radial-gradient(circle at center, rgba(127,214,255,0.12), rgba(0,0,0,0.9)),
        linear-gradient(135deg, #08131f, #111);
      text-align: center;
      font-size: 13px;
      padding: 16px;
    }

    #controls {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 10px;
    }

    button {
      appearance: none;
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 10px;
      background: rgba(255,255,255,0.08);
      color: white;
      padding: 10px 12px;
      font-size: 13px;
      cursor: pointer;
      pointer-events: auto;
      touch-action: manipulation;
      position: relative;
      z-index: 2;
    }

    button:hover { background: rgba(255,255,255,0.14); }
    button:disabled { opacity: 0.45; cursor: not-allowed; }
    button:focus-visible,
    input:focus-visible {
      outline: 3px solid #7fd6ff;
      outline-offset: 2px;
      box-shadow: 0 0 0 3px rgba(127, 214, 255, 0.28);
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    #hud.camera-hidden #cameraWrap {
      display: none;
    }

    #help {
      margin-top: 10px;
      font-size: 12px;
      color: var(--muted);
      line-height: 1.35;
    }

    #hudRestoreBtn {
      position: fixed;
      top: 12px;
      right: 12px;
      z-index: 39;
      display: none;
    }
    #hudRestoreBtn.visible {
      display: block;
    }

    .small {
      font-size: 11px;
      color: var(--muted);
    }

    #debugPanel {
      position: fixed;
      left: 12px;
      bottom: 12px;
      z-index: 41;
      width: min(520px, calc(100vw - 24px));
      max-height: 72vh;
      overflow: auto;
      padding: 12px;
      border-radius: 14px;
      background: rgba(8, 12, 18, 0.92);
      border: 1px solid rgba(255,255,255,0.12);
      box-shadow: 0 10px 30px rgba(0,0,0,.25);
      color: #fff;
      display: none;
      pointer-events: auto;
    }
    #debugPanel.visible { display: block; }
    #debugPanel h2 {
      margin: 0 0 10px 0;
      font-size: 16px;
    }
    .grid2 {
      display: grid;
      grid-template-columns: 1fr 92px;
      gap: 8px 10px;
      align-items: center;
    }
    .grid2 label {
      font-size: 13px;
      color: #e8edf7;
    }
    .grid2 input {
      width: 100%;
      box-sizing: border-box;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.16);
      color: #fff;
      border-radius: 8px;
      padding: 8px;
    }
    #debugActions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 12px;
    }

    #bootOverlay {
      position: fixed;
      inset: 0;
      z-index: 60;
      display: grid;
      place-items: center;
      background: rgba(5, 8, 12, 0.72);
      backdrop-filter: blur(10px);
      pointer-events: auto;
    }

    #bootCard {
      width: min(560px, calc(100vw - 32px));
      background: rgba(10, 15, 22, 0.92);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 18px;
      padding: 20px;
      color: white;
      box-shadow: 0 20px 60px rgba(0,0,0,.35);
      pointer-events: auto;
    }

    #bootCard h2 {
      margin: 0 0 8px 0;
      font-size: 22px;
    }

    #bootCard p {
      margin: 8px 0;
      color: #d9dfeb;
      line-height: 1.5;
      font-size: 14px;
    }

    #bootError {
      margin-top: 10px;
      display: none;
      color: #ffd6d6;
      background: rgba(255, 107, 107, 0.14);
      border: 1px solid rgba(255,107,107,0.35);
      border-radius: 10px;
      padding: 10px 12px;
      font-size: 13px;
      white-space: pre-wrap;
    }

    #bootActions {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 10px;
      margin-top: 16px;
    }

    #bootTroubleshooting {
      margin-top: 12px;
      display: none;
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 10px;
      padding: 10px;
      color: #d9dfeb;
      font-size: 13px;
      line-height: 1.4;
      background: rgba(255,255,255,0.04);
    }
  
