
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { height: 100%; scrollbar-width: none; -ms-overflow-style: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
  body {
    margin: 0;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    background:
      radial-gradient(1200px 600px at 20% -10%, rgba(56,189,248,0.18), transparent 60%),
      radial-gradient(900px 600px at 90% 110%, rgba(129,140,248,0.18), transparent 60%),
      linear-gradient(180deg, var(--bg-0), var(--bg-1));
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: contain;
    touch-action: manipulation;
  }

  /* ---------- Screen routing ---------- */
  .screen { display: none; flex-direction: column; min-height: 100dvh; }
  .screen.active { display: flex; }
  #screen-viz { height: 100dvh; max-height: 100dvh; overflow: hidden; }
  .is-app #screen-viz { height: auto; max-height: none; overflow: auto; }
  .is-app .arch-stage { align-items: flex-start; overflow: auto; }
  .is-app .arch-stage > * { margin-left: auto; margin-right: auto; }
  .is-app .llm-step-table { overflow-x: auto; }
  .is-app .arch-narration,
  .is-app .status { display: none !important; }

  /* ---------- Shared header ---------- */
  header {
    padding: 18px var(--pad-x) 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--bg-0);
  }
  .brand { flex: 1 1 auto; min-width: 0; }
  header .badge { order: 98; }
  .complexity-badges { order: 98; display: flex; gap: 6px; flex-shrink: 0; }
  .badge.time { background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.3); color: #fcd34d; }
  .badge.space { background: rgba(103,232,249,0.12); border-color: rgba(103,232,249,0.3); color: #67e8f9; }

  /* Scrollbar */
  ::-webkit-scrollbar { height: 8px; width: 8px; }
  ::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.25); border-radius: 99px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.45); }
  ::-webkit-scrollbar-track { background: transparent; }
