/* shell-layers.css — Ship O1 (6-627-o1): the reader's layer scale.
 *
 * Why this file exists: the shell grew its z-indexes organically and the
 * stacking order ended up inverted — the full-screen daf view (#daf, 120)
 * sat ABOVE the side panel (#panel, 70) and the modal overlays (.ovl, 80),
 * so a real tap on the panel's ✕ landed on the daf's title bar and the
 * panel could not be closed (proven on phone AND desktop by hit-test:
 * elementFromPoint at #panelClose's center returned #dafTitle). There was
 * no layer manager — just accumulated numbers.
 *
 * shell-core.css / app.css are exact-tier protected files, so the scale
 * is applied from this additive stylesheet, linked LAST in index.html.
 * Every rule below matches or beats the specificity of the base rule it
 * overrides, and this sheet loads after all of them.
 *
 * THE SCALE (bands):
 *   content views & their tools ... keep their shipped order (<= 340)
 *   highlight popup ................ 240 (was 90: under the daf it serves)
 *   side panel ..................... 1000
 *   modal overlays (.ovl) .......... 1010
 *   account / paywall .............. 1020
 *   undo toast ..................... 1200
 *   system (boot splash, language prompt, catalog-damaged, illus) —
 *   untouched, already supreme (3000+ / 2147482000+).
 *
 * #picture (122) deliberately stays in the view band: it is a content
 * view with shipped relations to #study (124), the pickers (121-150)
 * and #daf (120); no traced failure involves it, and the side panel is
 * not reachable while it is up.
 */
#panel { z-index: 1000; }
.ovl { z-index: 1010; }
body.bp-cvsplit .ovl { z-index: 1010; }
#account { z-index: 1020; }
#paywall { z-index: 1020; }
#hlPop { z-index: 240; }
#toast.undo { z-index: 1200; }
body.bp-cvsplit #toast.undo { z-index: 1200; }

/* #bookInfo is the one modal whose shell shipped with no ✕ of its own
 * (its Sefer-details content carries a "Close" text button at the bottom
 * of a scrolling card; the Chumash navigator content carries its own ✕
 * head). The shell-level ✕ below sits at the card's top corner in every
 * state; where the navigator's own ✕ head is present (.cn-shell) it
 * steps aside so the reader never sees two. */
#bookInfo .ovl-card { position: relative; }
#bookInfoClose { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 5; }
#bookInfo:has(.cn-shell) #bookInfoClose { display: none; }
