/*
 * TAG Legal Desk v2.1, J162: the twelve Clear panel effects the page draws itself (js\v21_panel_fx.js) and the sound
 * pack covers (js\v21_soundpacks.js).
 * The stage sits over the panel (or a Canteen card's window for "See it"): it covers the host, takes no pointer and is
 * hidden from screen readers. Each element starts unseen and only its transform and opacity move.
 * Game art: a stage already running is hidden the moment the page goes quiet (a welfare message, the quiet period, the
 * nobody band), Calm or reduced motion comes on, or a day that matters begins; never in print.
 */
.v21fx-stage { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.v21fx-p { position: absolute; left: 0; top: 0; display: block; overflow: visible; opacity: 0; pointer-events: none; transform-origin: 50% 50%; will-change: transform, opacity; }

/*
 * Colours (review fix). The drawings carry colours that read on the light Clear panel, the default look. On a dark
 * ground (the dark theme, Night shift, every card picture and "See it" over one) a few shapes take lighter colours so
 * they glow rather than turn murky. High contrast gives every element a thin black outline on the white panel.
 */
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-ffh { fill: #FFE27A; opacity: .3; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-ffc { fill: #FFD95A; stroke: #C98A12; stroke-width: 1; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-bub { stroke: #A8E4F7; fill-opacity: .14; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-bubhi { stroke-width: 2.2; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-sne { stroke: #86ADD3; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-crh { fill: #FFE9A0; opacity: .22; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-crs { fill: #FFF1B8; stroke: #D9A441; stroke-width: .9; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-n0 { color: #4F9BE8; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-n1 { color: #A58BEA; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-n2 { color: #3FB27A; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage, .v21fx-still) .v21fx-n3 { color: #F07FA8; }
/* The rainbow on a dark panel: full pastel bands, so the arc stays clear at its brightest (0.8). */
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage) .v21fx-rb { opacity: 1; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage) .v21fx-rb0 { stroke: #FF9A8F; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage) .v21fx-rb1 { stroke: #FFBE85; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage) .v21fx-rb2 { stroke: #FFE38F; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage) .v21fx-rb3 { stroke: #A8E3A1; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage) .v21fx-rb4 { stroke: #95D2F5; }
:is(:root[data-theme="dark"] .v21fx-stage, :root[data-v21-theme="night_shift"] .v21fx-stage, .is-fx-preview > .v21fx-stage) .v21fx-rb5 { stroke: #C6B2F5; }
/* The card picture keeps its rainbow as it was (on its own blue ground). */
.v21fx-still .v21fx-rb { opacity: .85; }
:root[data-theme="high_contrast"] .v21fx-p { filter: drop-shadow(0 0 .6px #000) drop-shadow(0 0 .6px #000); }
/* In high contrast the see through parts go (a glow, a bubble's film) and the rainbow is solid, so the outline never
   shows through them as a grey smudge. */
:root[data-theme="high_contrast"] .v21fx-stage :is(.v21fx-ffh, .v21fx-crh) { opacity: 0; }
:root[data-theme="high_contrast"] .v21fx-stage .v21fx-bub { fill-opacity: 0; }
:root[data-theme="high_contrast"] .v21fx-stage .v21fx-rb { opacity: 1; }

/* "See it" over a card: the card's own picture fades back while the effect plays, so nothing is seen twice. */
.v21fx-still > g { transition: opacity .18s ease; }
.is-fx-preview .v21fx-still > g { opacity: .15; }

:root:is([data-quiet="on"], [data-calm="on"], [data-motion="reduced"], [data-day-matters]) .v21fx-stage { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .v21fx-stage { display: none !important; }
  .v21fx-still > g { transition: none; }
}
@media print {
  .v21fx-stage, .v21fx-still, .v21sp-cover { display: none !important; }
}
