/* AfterBedtime retro interface, step 1: get out of the Classic sheets' way. ui.css, settings.css and touch.css are wrapped in
   `@layer classic { ... }`, and a rule outside every layer beats any layer whatever its specificity. So inside #ui and the Settings
   modal ONE unlayered rule reverts every property of every element to the browser's own defaults, and retro-window.css /
   retro-screens.css then style what they need from scratch. Custom properties are not touched by `all` (touch geometry --d --cx --cy,
   --tb, --L0 ... keep coming from the Classic sheet). The touch layer (#touch) and the rotate overlay are left alone: their geometry
   is behaviour (touch-model.js overlap arithmetic), the retro sheet only repaints them. Load this file BEFORE retro-window.css.
   The screen effects (.covers, .cover-veil, .eyelids, .heartbeat: the duvet, drowsy eyelids, the heartbeat vignette) are gameplay feedback, not chrome: they keep
   their Classic paint. Everything is under body.ps-ui: Modern and Classic never match a rule in the retro sheets. */
body.ps-ui :where(#ui, .settings-modal) :where(*:not(#touch, #touch *, #touch-rotate, #touch-rotate *, .covers, .covers *, .cover-veil, .cover-veil *, .eyelids, .eyelids *, .heartbeat, .heartbeat *)) { all: revert; }
/* (a pseudo-element cannot sit inside :where(), so ::before / ::after are reverted by their own two rules; the specificity is still low enough for every
   retro rule that names a class to win. Without this Classic's fold chevron (a rotated border box) leaked into the retro rows.) */
body.ps-ui :where(#ui, .settings-modal) :where(*:not(#touch, #touch *, #touch-rotate, #touch-rotate *, .covers, .covers *, .cover-veil, .cover-veil *, .eyelids, .eyelids *, .heartbeat, .heartbeat *))::before { all: revert; }
body.ps-ui :where(#ui, .settings-modal) :where(*:not(#touch, #touch *, #touch-rotate, #touch-rotate *, .covers, .covers *, .cover-veil, .cover-veil *, .eyelids, .eyelids *, .heartbeat, .heartbeat *))::after { all: revert; }
/* what the revert takes away and the retro sheet must give back: hit-testing (Classic sets pointer-events on each interactive thing) */
body.ps-ui :where(#ui) :where(button, input, summary, label, select, a, .card, .click-to-play, .seg, details, .practice, .title-screen) { pointer-events: auto; }
body.ps-ui :where(#ui) { pointer-events: none; user-select: none; }
body.ps-ui .settings-modal { pointer-events: auto; }
