/* =====================================================================
   LITE TIER: the app-wide phone budget (perf: mobile limiters, lane C, 2026-09-30).
   Every rule is scoped to body.lite (js/perf.js lite(): phones, small tablets, low memory, Graphics: Low, after a
   crashed load), so desktop never matches and looks exactly as before. Loaded last, so it wins ties.
   iPhone Safari closes a tab when it runs out of graphics memory, so on lite:
     - no backdrop blurs (each one keeps an offscreen copy of what is behind it): denser backgrounds instead
     - no filters on big elements: opacity over the dark ground, or a dark overlay, instead of brightness()
     - no infinite loops on big or numerous elements (small meaningful ones stay: ready glows, the End Turn orb,
       the enemy-turn spinner, the Play button's breathing glow, the hub pet)
     - no will-change hints, no blend modes on big elements, no scroll-fade masks on scrollers
     - the key-art backdrop is a still picture, and it is hidden (not just transparent) where a screen covers it
   Not here: collection / deck builder / pack opening card grids (lane A) and the onboarding / tutorial phone blocks
   (css/onboarding.css, css/tutorial.css). Battle keeps its arrows, stamps and damage numbers; only their costly
   extras go (blur glows, blend modes, ambient motes).
   ===================================================================== */

/* ---------------------------------------------------------------- perf: every blur-behind goes (one rule catches all) */
body.lite *, body.lite *::before, body.lite *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
/* ...so the glass that relied on it gets a denser ground to stay readable */
body.lite .page .top { background: linear-gradient(180deg, rgba(8, 4, 18, .97), rgba(12, 6, 26, .93)); }
body.lite .navbar { background: linear-gradient(180deg, rgba(22, 12, 44, .97), rgba(8, 4, 18, .98)); }
body.lite .af-panel { background: linear-gradient(180deg, rgba(30, 17, 58, .95), rgba(14, 8, 28, .97)); }
body.lite #select .detail { background: linear-gradient(180deg, rgba(30, 17, 58, .96), rgba(12, 7, 26, .98)); }
body.lite .modal { background: radial-gradient(ellipse at 50% 45%, rgba(16, 7, 36, .8), rgba(4, 2, 10, .94)); }
body.lite #pickModal { background: rgba(8, 4, 18, .9); }
body.lite #fbSheet { background: rgba(5, 2, 14, .9); }
body.lite.theme-midnight .page .top { background: rgba(0, 0, 0, .95); }
body.lite.theme-midnight :is(.navbar, #select .detail) { background: rgba(4, 3, 8, .97); }

/* ---------------------------------------------------------------- perf: key-art backdrop (#afBg, behind every page) */
/* a still picture: no blur / brightness filter (opacity over the #0a0615 ground does the dimming), no Ken Burns drift,
   no drifting dust (a background-position loop repainted the whole screen every frame) */
body.lite #afBg .afb { filter: none; transform: none; inset: 0; animation: none !important; }
body.lite #afBg .afb.on { opacity: .62; }
body.lite.theme-midnight #afBg .afb.on { opacity: .42; }
body.lite #afBg .afdust { animation: none; }
/* hub and battle paint their own ground: the unused backdrop is hidden, so it keeps no layer at all */
body.lite #afBg.none { visibility: hidden; }

/* ---------------------------------------------------------------- perf: screen changes, sheets, rotation */
/* the screen fade animated a full-screen blur(6px); the sheet pop animated blur(4px); rotating blurred the whole stage */
body.lite .screen.af-in { animation: none; }
body.lite .modal.on .box { animation-name: afPopLite; animation-fill-mode: backwards; }
@keyframes afPopLite { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
body.lite #stage.lc-reflow { animation: none; } /* backstop: on lite main.js fit() fades the stage with a plain opacity animation instead */
/* entrance rises keep their motion but fill "backwards" only: with "both" a finished rise still counts as running, so every
   staggered title, tab, navbar button, list row and the whole Albums list stayed a composited layer for as long as the
   screen was open. Their end frame is the element's own style (checked on every screen), so nothing moves when they end. */
body.lite .af-st, body.lite #select .detail.swap > *, body.lite #hub .lcs-starter,
body.lite :is(.bint, .hrow, .member, .live.m-panel, .trade.m-panel, .sWeek, .sMs, .pod, .story-art, .scene p, .hist, .pr-item),
body.lite #over :is(.box, .overlead .lc, .ov-eyebrow, .big, .ov-rule, .stats, .ov-xp, .actions) { animation-fill-mode: backwards; }
/* face-up showcase cards (album slots, leader signature cards, pass / store card-style previews, the album fill sheet) are
   flat tiles like the Collection grid: no 3D flip stack, which made each tiny card 3-4 composited layers (Albums: ~80).
   isolation keeps each card its own stacking context (perspective did that before) and lets the foil shine's blend mode
   mix inside the card: blending with the scroller behind it gave every card a layer again (Albums: 55 -> 6 layers). */
body.lite :is(.aslot, .sigc, .pp-card, .lcs-cardwrap, .fillbox .fc) .card:not(.down) { will-change: auto; perspective: none; isolation: isolate; }
body.lite :is(.aslot, .sigc, .pp-card, .lcs-cardwrap, .fillbox .fc) .card:not(.down) .flip { transform: none !important; transform-style: flat; }
body.lite :is(.aslot, .sigc, .pp-card, .lcs-cardwrap, .fillbox .fc) .card:not(.down) .face { backface-visibility: visible; }
body.lite :is(.aslot, .sigc, .pp-card, .lcs-cardwrap, .fillbox .fc) .card:not(.down) .backface { display: none; }
/* scroll-fade hints were masks on whole scrollers (a mask layer the size of the pane): the scrollbar is the hint */
body.lite [data-more] { -webkit-mask-image: none; mask-image: none; }
/* will-change keeps a layer alive for good; cards, sheens and battle shards get one only while they move */
body.lite .card, body.lite #game .shard, body.lite .hubleader .lc::after, body.lite .bigplay::after { will-change: auto; }

/* ---------------------------------------------------------------- perf: hub */
/* the leader hero: aura (a 980x1270 layer), float, plinth and sheen hold still; the card itself is unchanged */
body.lite .hubleader .hl-aura, body.lite .hubleader .hl-aura::after, body.lite .hubleader .hl-float, body.lite .hubleader .hl-plinth,
body.lite .hubleader .lc::after, body.lite .bigplay::after, body.lite .bp-wrap::before, body.lite .bp-wrap::after, body.lite .hublogo { animation: none; }
body.lite .hubleader .lc::after, body.lite .bigplay::after { display: none; }
/* (kept: .bigplay .bp-glow breathing, .hq.ready glow, .netdot beacon, the hub pet) */
body.lite #hub .hubui.choosing .hubleader { filter: none; } /* portrait companion chooser: the dimmed leader drops its blur(2px) */

/* ---------------------------------------------------------------- perf: equipped cosmetics that animate every card / leader */
/* card treatments (body.cs-<id>): a box-shadow or background-position loop on every card face on screen, so they
   hold their resting look instead */
body.lite .cs-arc-light .card .face, body.lite .cs-arc-light .card .face::before, body.lite .cs-kinetoscope .card .face .art,
body.lite .cs-exposition-fa .card .face::before, body.lite .cs-voltaic .card .face, body.lite .cs-folio-foil .card .face::before,
body.lite .cs-gilded .card .face::before { animation: none !important; }
body.lite .cs-arc-light .card:not(.can):not(.ready) .face { box-shadow: 0 0 0 1.1cqw #b58cff, 0 0 5cqw rgba(170, 120, 255, .55), 0 6px 16px rgba(0, 0, 0, .55); }
body.lite .cs-voltaic .card:not(.can):not(.ready) .face { box-shadow: 0 0 0 1px #6fd3ff, 0 0 4cqw rgba(111, 211, 255, .45), 0 6px 16px rgba(0, 0, 0, .55); }
/* promo leader portraits: the rotating holo shine repainted the whole (big) leader card every frame */
body.lite .lc.lc-promo .lp-shine, body.lite #promoReveal .pr-card::before { animation: none; }
/* perf (verifier): a Leader wearing its Full Art (.lc.fa-on on the hub, leader select, my Leader in battle) and full-art faces
   in the same showcases as the foil rings below: the holo spin, stripe drift and rainbow border repainted the whole hub ~100
   times a second. They rest at their start frame (the holo and border still show), as with Graphics: Low. */
body.lite .lc.fa-on::after, body.lite :is(.lc.fa-on, #game, #pickModal, .modal, .aslot, .sigc, .pp-card, .lcs-cardwrap) .fa-holo,
body.lite :is(.lc.fa-on, #game, #pickModal, .modal, .aslot, .sigc, .pp-card, .lcs-cardwrap) .fa-holo::after { animation: none; }
/* card sleeves (body.sl-<id>): every card back and deck pile ran a sheen / spinning cog */
body.lite :is(.backface, .back).cardback, body.lite :is(.backface, .back).cardback::after { animation: none !important; }
/* animated leader frames: a box-shadow / filter loop on the big hub portrait and my leader in battle */
body.lite .fr-wardenclyffe-crown .lc, body.lite .fr-wardenclyffe-crown .profile .av, body.lite .fr-tesla-coil .lc { animation: none !important; }
body.lite .fr-wardenclyffe-crown :is(.hubleader, #game .lcard.mine) .lc { box-shadow: 0 0 0 7px rgba(242, 193, 78, .85), 0 0 18px 6px rgba(111, 211, 255, .45); }

/* ---------------------------------------------------------------- perf: battle boards (equipped board cosmetics) */
/* like Graphics: Low: rain, fog, the 4800px drifting shore, snow and leaves (background-position loops over the
   whole board) hold still; full-board filters and the multiply wash become plain overlays */
body.lite .lcb *, body.lite .lcb *::before, body.lite .lcb *::after { animation: none !important; }
body.lite .lcb-pulses { display: none; } /* telegraph wire pulses are SMIL loops under an SVG blur: CSS cannot pause them */
body.lite .lcb-crossroads .lcb-bg { filter: none; transition: none; }
body.lite .lcb-crossroads .lcb-bg::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: #04020a; opacity: calc(.26 - var(--dawn, 0) * .26); transition: opacity 3s; }
body.lite .lcbv-nightfall-lighting .lcb-bg { filter: none; }
body.lite .lcbv-nightfall-lighting .lcb-var { mix-blend-mode: normal; background: linear-gradient(180deg, rgba(8, 16, 52, .42), rgba(3, 6, 24, .48)); }
body.lite .lcb-rf-aurora, body.lite .bns-aurora, body.lite .bns-steam, body.lite .bn-wc-beam { filter: none; }
body.lite.theme-midnight .lcb { filter: none; opacity: .72; }

/* ---------------------------------------------------------------- perf: store, museum and pass shelves */
/* store and museum tiles: each preview ran its own companion / banner / card loops (30+ at once); they rest now.
   The item sheet (#sheet, one big preview) stays alive. */
body.lite .screen .lcs-prev *, body.lite .screen .lcs-prev *::before, body.lite .screen .lcs-prev *::after,
body.lite .screen .cz-ctx-shelf, body.lite .screen .cz-ctx-shelf * { animation: none !important; }
body.lite .lcs-dio.alive :is(.lcs-slice img, .lcs-ray, .lcs-dust) { animation: none; }
body.lite .screen .lcs-rec.spin .lcs-record i { animation: none; }
/* pass: the track is one very wide scrolling layer, and any loop inside it repainted all of it every frame.
   Everything in it rests except the tiles themselves (the ready-to-claim bob and the claim flip are transform-only). */
body.lite .pTrack *:not(.pTile), body.lite .pTrack *::before, body.lite .pTrack *::after { animation: none !important; }
body.lite .pBar i::after, body.lite .pBuy::after { animation: none; }
/* locked / held tiles: opacity over the dark track instead of ~100 saturate+brightness filters (a positioned
   overlay was tried: it painted above the cards' 3D layers and cost 27 MB of extra layers) */
body.lite .pTile.locked { filter: none; opacity: .72; }
body.lite .pTile.locked:hover, body.lite .pTile.held { filter: none; opacity: .9; }
body.lite .plu-t.held { filter: none; opacity: .85; }
/* celebration rays: big masked discs spinning behind level-up / unlock cards hold still */
body.lite :is(.pr-rays, .pu-rays, .plu-rays), body.lite #ulCer .ul-rays { animation: none; }

/* ---------------------------------------------------------------- perf: solo and season pages */
/* every won campaign node ran its own background-position shine; the weekly boss art drifted behind the whole banner */
body.lite .cnode.won .cmed::before, body.lite .sWeek.cur::after, body.lite .bhero::before { animation: none; }
/* ready-to-claim chips, milestones and tier pips pulsed a box-shadow (and quest bars slid a background) inside their
   scrolling tracks, so the track repainted while anything was claimable: a steady glow says the same thing.
   (kept: the small cPulse "you are here" markers, one or two at a time) */
body.lite :is(.rchip, .sMs, .tierpip).ready { animation: none; box-shadow: 0 0 18px rgba(242, 193, 78, .55); }
body.lite .quests .quest.ready .qbar i { animation: none; }

/* ---------------------------------------------------------------- perf: lore, albums, leader select */
body.lite .lr-sealedpage::after { filter: none; }
/* reader page turn: the same slide and fade without the blur, brightness and 3D tilt on the whole page */
body.lite .lr-reader.turn .lr-rhead { animation-name: lrHeadLite; animation-fill-mode: backwards; }
body.lite .lr-reader.turn .lr-page, body.lite .lr-sealedpage.turn { animation-name: lrTurnLite; animation-fill-mode: backwards; }
@keyframes lrHeadLite { from { opacity: 0; transform: translateY(10px); } }
@keyframes lrTurnLite { from { opacity: 0; transform: translateX(24px); } 60% { opacity: 1; } }
body.lite .lr-shelf.locked { filter: none; opacity: .8; }
body.lite .aslot .ghost { filter: grayscale(1); opacity: .3; } /* keeps the grey silhouette, drops the blur + brightness pass */
body.lite .m-empty::before { filter: none; } /* empty-state art behind a third of the screen: saturate(.9) was invisible anyway */
body.lite .leaderPick { filter: none; opacity: .76; transition: transform .4s var(--ease-back), opacity .3s; }
body.lite .leaderPick:hover { filter: none; opacity: .95; }
body.lite .leaderPick.sel { opacity: 1; }

/* ---------------------------------------------------------------- perf: battle (readable, just cheaper) */
/* ambient motes off (Graphics: Low does the same); low-Life pulse and FFA shard gems keep moving, without filters */
body.lite #game .motes { display: none; }
body.lite #game::after, body.lite #cmdSplash .a { filter: none; } /* a hidden blur and a no-op drop-shadow still counted as filters */
body.lite #game .bplate.danger .bp-life, body.lite .fp.danger .fp-life { animation-name: lcDangerLite; }
@keyframes lcDangerLite { 50% { transform: scale(1.08); } }
body.lite .fp-shard, body.lite #game .bp-shard { animation-name: ffaShardLite; }
@keyframes ffaShardLite { 50% { transform: translateY(-2px); } }
/* the charge arrow's soft glow was a blur filter on a 26px stroke; the stroke itself still shows */
body.lite #chargeArrow .ca-glow { filter: none; stroke-opacity: .3; }
/* foil rings: the rotating conic border (a custom-property loop, so never composited) repainted every foil card in hand, on
   the board and in battle sheets each frame; it rests at its start angle (BUDGET.animatedCards is 0 on lite) */
body.lite :is(#game, #pickModal, .modal, .aslot, .sigc, .pp-card, .lcs-cardwrap) .card.foil::after { animation: none; }
/* hit flashes: plain light instead of a screen blend over the board */
body.lite #game .impact { mix-blend-mode: normal; }
/* Triumph, victory and defeat: the rays hold still, the hero art behind the result is dimmed with opacity, not blur */
body.lite #triumph .cards::before, body.lite #over.win .box::after { animation: none; }
body.lite #over.lc-over::before { filter: none; transform: none; inset: 0; animation: none; opacity: .5; }
body.lite #over.lose::before { opacity: .42; background: linear-gradient(rgba(16, 22, 40, .62), rgba(16, 22, 40, .62)), var(--hero) var(--hero-pos, 50% 30%) / cover no-repeat; } /* the cold grey-blue of the grayscale + hue-rotate filter, painted in */
body.lite #over.lose .overlead .lc { filter: none; opacity: .8; }
