
  :root { --ink: #e8e8ec; }
  * { margin:0; padding:0; box-sizing:border-box; }
  html,body { width:100%; min-height:100%; background:#000; }
  body { overflow:hidden; }
  body {
    font-family: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
    color: var(--ink);
    -webkit-user-select:none; user-select:none;
  }
  #stage { position:fixed; inset:0; }
  canvas { position:fixed; inset:0; width:100%; height:100%; display:block; }
  #gl { z-index:1; }
  #cv2d { z-index:2; pointer-events:none; mix-blend-mode:screen; }
  video { position:fixed; width:1px; height:1px; opacity:0; pointer-events:none; }

  /* HUD — brutalist minimal, almost absent */
  #hud {
    position:fixed; z-index:5; inset:0; pointer-events:none;
    font-size:10px; letter-spacing:0.18em; text-transform:uppercase;
    color: rgba(232,232,236,0.34);
  }
  #hud .tl { position:absolute; top:18px; left:20px; }
  #hud .tr { position:absolute; top:18px; right:20px; text-align:right; }
  #hud .bl { position:absolute; bottom:18px; left:20px; line-height:1.7; }
  #hud .br { position:absolute; bottom:18px; right:20px; text-align:right; line-height:1.7; }
  #note {
    position:absolute; top:50%; left:50%;
    transform:translate(-50%,-50%);
    font-size: clamp(60px, 16vw, 200px);
    font-weight:200; letter-spacing:0.04em;
    color: rgba(232,232,236,0.05);
    transition: color 0.6s ease, letter-spacing 1.2s ease;
    will-change: color, letter-spacing;
  }
  .glyph { opacity:0.5; }
  #evolve { color: rgba(232,232,236,0.22); min-height:14px; }

  /* Gate / loader */
  #gate {
    position:fixed; inset:0; z-index:30; background:#000;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    text-align:center; padding:24px; overflow:auto;
  }
  #gate h1 {
    font-weight:200; font-size: clamp(34px, 9vw, 92px);
    letter-spacing:0.5em; margin-left:0.5em;
    color:#f0f0f3;
    animation: breathe 5.5s ease-in-out infinite;
  }
  #start {
    margin-top:34px; padding:14px 18px; border:1px solid rgba(232,232,236,0.5);
    background:transparent; color:#f0f0f3; font:inherit; font-size:11px;
    letter-spacing:0.22em; text-transform:uppercase; cursor:pointer;
  }
  #start:hover, #start:focus-visible { border-color:#fff; background:rgba(232,232,236,0.12); }
  #start:focus-visible { outline:2px solid #fff; outline-offset:4px; }
  #start:disabled { cursor:wait; opacity:0.6; }
  #gate .sub { margin-top:14px; font-size:10px; letter-spacing:0.14em; color:rgba(232,232,236,0.58); max-width:440px; line-height:2; }
  #gate.hidden { opacity:0; pointer-events:none; visibility:hidden; transition:opacity 1.6s ease, visibility 1.6s; }
  #err, #status { font-size:11px; margin-top:20px; max-width:440px; line-height:1.7; letter-spacing:0.05em; }
  #err { color:#f3b5b5; }
  #err[hidden] { display:none; }
  #status { color:#ddd; }
  @keyframes breathe {
    0%,100% { opacity:0.55; filter:blur(0.3px); }
    50% { opacity:1; filter:blur(0px); }
  }
  @media (prefers-reduced-motion: reduce) {
    #gate h1 { animation:none; }
    #gate.hidden { transition:none; }
    #note { transition:none; }
  }
