/* layers.css — Z-INDEX SCALE: the ONE list of root stacking layers.
   Every position:fixed/absolute layer that competes at the document root takes its
   z-index from here (tapium/*.css, app/*.css; inline styles in JS through
   core/constants/zLayers.js zIndex(), i.e. var(--z-…, <the same number>) — the JS
   map mirrors this list and presentation/styles/zLayers.invariants.test.js holds
   the two equal). Local stacking (z 1–5 inside a card/modal) stays literal — it
   never meets these.
   Order, bottom → top, and WHY each sits where it does:
     field (canvas, auto) < topfade < HUD (logo, pills, sysbar, autoplay) <
     HUD overlays (ring, aim, head, bonus zone, pinned chip) < bet/ap sheet scrim < sheet
     < dev panels & #bonus-x counter < dev toggle tabs < #bonus-start & dev modal
     < bonus intro < bonus end plaque < modals
     < notification stack (toasts) < ROTATE GATE < preloader & sandbox badge
     < conn/fatal/session error < protocol-violation alarm
     < frame-trace overlay (DEV_TOOLS + skin theme.trace; pointer-events:none readout that stays
       legible over every layer it diagnoses, the alarm included).
   ☢️ ROTATE GATE (landscape phone): the game is NOT usable there — it covers EVERY
   game layer, toasts included (a toast about a bet/input nobody can act on is
   noise; it is still in the stack when the phone turns back). Deliberately above
   it: the preloader (boot owns the screen), the sandbox badge (the "test stand"
   marker must never be hidden) and conn/fatal (a dead session is reported in any
   orientation). Adding a layer = adding a token here AND in zLayers.js, between the
   right neighbours, AND in APPROVED_ORDER of zLayers.invariants.test.js (the gate
   pins this order; it also rejects any numeric z-index ≥ 10 outside this file and
   the index.html bootstrap — in sheets and in JS). The one other literal copy: index.html's bootstrap <style>
   paints #loading-screen before any sheet loads, so it carries 9999 = --z-preloader
   by value. */
:root {
    --z-topfade:       12;
    --z-hud:           20;
    --z-hud-over:      21;
    --z-sheet-scrim:   25;
    --z-sheet:         26;
    --z-debug:         3000;
    --z-onboarding:    9000;
    --z-dev-panel:     9500;
    --z-bonus-x:       9500;
    --z-dev-tab:       9501;
    --z-bonus-start:   9600;
    --z-dev-modal:     9600;
    --z-bonus-intro:   9700;
    --z-bonus-end:     9800;
    --z-modal:         9900;
    --z-notif:         9950;
    --z-rotate-gate:   9990;
    --z-preloader:     9999;
    --z-badge:         9999;
    --z-system:        10001;
    --z-alarm:         99999;
    --z-trace:         100000;
}
