/**
 * GT Capital TMA — shell fixes on top of frozen etalon CSS/JS (public/etalon/).
 * - Telegram WebView: etalon sets html.nexus-visual-calm and HIDES .nexus-main-fx;
 *   that makes the shell look "empty" / flat; we restore subtle layers.
 * - --app-vh: avoid #root collapsing to 0px before TG reports height.
 */

/* ── Viewport base (before --app-vh is ready) ───────────────────── */
html {
  background-color: #020203;
  min-height: 100dvh;
  min-height: 100svh;
}
body {
  margin: 0;
  background-color: #020203;
  min-height: 100dvh;
  min-height: 100svh;
}

#root {
  min-height: 100dvh !important;
  min-height: 100svh !important;
  height: auto !important;
  background: transparent;
  position: relative;
  z-index: 0;
}

/* Etalon sets height from --app-vh; if TG briefly reports 0, root must not collapse */
#root {
  min-height: max(100dvh, var(--app-vh, 100dvh)) !important;
}

/* ── TMA calm mode: etalon hides decorative FX; restore (subtle) ─ */
html.nexus-visual-calm .nexus-main-fx {
  display: block !important;
  pointer-events: none !important;
}
html.nexus-visual-calm .nexus-main-fx.carbon-fiber {
  opacity: 0.42 !important;
}
html.nexus-visual-calm .nexus-main-fx.mesh-gradient {
  opacity: 0.58 !important;
}
html.nexus-visual-calm .nexus-main-fx.grain-subtle {
  opacity: 0.38 !important;
}

/* Keep scanline / FX that are not under .nexus-main-fx if any */
html.nexus-visual-calm .nexus-scanline-overlay {
  opacity: 0.28 !important;
}

/* ── Scroll layer: stay above fixed background stacks ──────────── */
#nexus-scroll-host {
  z-index: 25 !important;
  min-height: var(--app-vh, 100dvh) !important;
  min-height: max(100dvh, var(--app-vh, 100dvh)) !important;
}

/* Fixed BG layers from etalon stay under content */
.nexus-viewport-fixed {
  z-index: 0 !important;
}
