/* Revision30: a separate Cyber panel and reference-led, quiet CRT atmosphere.
   Default ambience and all preview image treatments are intentionally outside
   this stylesheet's scope. */
#games-cyber-controls{position:fixed;z-index:2147482000;box-sizing:border-box;margin:0;padding:17px 16px 14px;max-width:calc(100vw - 24px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid var(--cyber-line,#697384);border-radius:12px;background:#101318;color:#e7ecf3;box-shadow:0 14px 38px #0009;isolation:isolate;text-align:left}
#games-cyber-controls h3{padding-right:29px;font-size:14px;line-height:1.5}
#games-cyber-controls .games-settings-description{font-size:11px;line-height:1.55;margin-bottom:12px}
#games-cyber-controls .games-setting-row{margin:10px 0;gap:6px}
#games-cyber-controls .games-setting-toggle{min-height:37px}
#games-cyber-controls .games-settings-reset{display:block;width:100%;min-height:37px;padding:8px;border:1px solid #77808d;border-radius:6px;background:#1b222c;color:#f2f5fa;font:600 11px/1.5 system-ui,sans-serif;text-align:center;cursor:pointer}
#games-cyber-controls .games-settings-reset:hover{background:#28313d;border-color:var(--cyber-bright,#cdd5e0)}
#games-cyber-controls .games-cyber-close{position:absolute;top:7px;right:9px;display:grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid transparent;border-radius:5px;background:transparent;color:#d6dce5;font:22px/1 system-ui,sans-serif;cursor:pointer}
#games-cyber-controls .games-cyber-close:hover{border-color:var(--cyber-line,#7d8692);background:#ffffff0e}
#games-cyber-controls[data-layout=stacked]{border-top-color:var(--cyber-bright,#cdd5e0)}
/* Revision27: one selected Games accent across the real controls. The room
   artwork, scene badge and full-color game previews are never recolored. */
@media(forced-colors:none){
 body[data-ar-document=games][data-library-theme=cyber]:not([data-reading-contrast=high]) #games-cyber-controls{background:linear-gradient(135deg,var(--cyber-faint),transparent 62%),var(--games-ui-panel,#080a0d);border-color:var(--cyber-line);color:var(--hub-ink);box-shadow:0 16px 42px #000b,inset 0 1px var(--cyber-faint)}
 body[data-ar-document=games][data-library-theme=cyber]:not([data-reading-contrast=high]) #games-cyber-controls :is(.games-setting-select,.games-settings-reset){background:var(--games-ui-panel,#080a0d);border-color:var(--cyber-line);color:var(--hub-ink);box-shadow:inset 2px 0 var(--cyber-accent)}
 body[data-ar-document=games][data-library-theme=cyber]:not([data-reading-contrast=high]) #games-cyber-controls :is(.games-setting-select,.games-settings-reset):is(:hover,:focus-visible){background:linear-gradient(135deg,var(--cyber-faint),transparent),var(--games-ui-panel,#080a0d);border-color:var(--cyber-bright)}
 body[data-ar-document=games][data-library-theme=cyber] #sanctuary-card .sanctuary-card-copy{--sc-accent:var(--cyber-bright);--sc-line:var(--cyber-line)}
 body[data-ar-document=games][data-library-theme=cyber] .ar-games-music-transport{color:var(--hub-muted)}
 body[data-ar-document=games][data-library-theme=cyber]:not([data-reading-contrast=high]) .ar-games-music-transport button{background:linear-gradient(135deg,var(--cyber-faint),transparent 70%),var(--games-ui-panel,#080a0d);border:1px solid var(--cyber-line);border-radius:2px 9px 2px 2px;color:var(--hub-ink);box-shadow:inset 2px 0 var(--cyber-accent),0 3px 8px #0005}
 body[data-ar-document=games][data-library-theme=cyber] .ar-games-music-transport button:is(:hover,:focus-visible,[aria-pressed=true]){border-color:var(--cyber-bright)}
 body[data-ar-document=games][data-library-theme=cyber]:not([data-reading-contrast=high]) #hub-theme-menu [data-hub-theme]:not([aria-disabled=true]) .hub-theme-icon{color:var(--cyber-bright);background:var(--cyber-faint)}
}

/* Photo4 composition: black CRT glass, fine neutral scanlines, horizontal
   accent signals and sparse edge telemetry. Existing AR artwork is the sole
   center mark. Every decorative layer stays underneath the real library. */
#games-appearance .games-truth-stage{position:absolute;inset:0;overflow:hidden;isolation:isolate;background:radial-gradient(ellipse 49% 72% at 50% 54%,var(--cyber-faint,rgba(197,20,47,.10)),transparent 76%),#030405;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
#games-appearance .games-truth-stage>div{position:absolute;inset:0;pointer-events:none}
#games-appearance .games-truth-mark{z-index:1;background:var(--cyber-accent,#c5142f);opacity:.042;-webkit-mask:url('/assets/ar-crowned-monogram-exact-2048.png') center/min(88vw,90dvh) no-repeat;mask:url('/assets/ar-crowned-monogram-exact-2048.png') center/min(88vw,90dvh) no-repeat}
#games-appearance .games-truth-grid{opacity:.10;background:linear-gradient(90deg,#444a50 1px,transparent 1px) 0 0/84px 84px,linear-gradient(#444a50 1px,transparent 1px) 0 0/84px 84px;mask-image:radial-gradient(ellipse at center,#0004,#000 88%)}
/* Fixed scanlines replace the former continuous scan/grid/sweep movement. */
#games-appearance .games-truth-scan{z-index:4;opacity:.23;background:repeating-linear-gradient(0deg,transparent 0 4px,#34373b 5px 6px)}
#games-appearance .games-truth-bands{z-index:0;opacity:.16;background:linear-gradient(90deg,transparent 2%,var(--cyber-accent,#c5142f) 48%,transparent 98%) 0 10.5%/100% 24px no-repeat,linear-gradient(90deg,transparent 4%,var(--cyber-accent,#c5142f) 50%,transparent 96%) 0 27.5%/100% 3px no-repeat,linear-gradient(90deg,transparent 3%,var(--cyber-accent,#c5142f) 49%,transparent 97%) 0 50%/100% 32px no-repeat,linear-gradient(90deg,transparent 4%,var(--cyber-accent,#c5142f) 52%,transparent 96%) 0 94%/100% 22px no-repeat}
#games-appearance .games-truth-bands::after{content:'';position:absolute;inset:71.5% 0 auto;height:1px;background:var(--cyber-accent,#c5142f);box-shadow:0 0 7px var(--cyber-glow,rgba(197,20,47,.23))}
#games-appearance .games-truth-telemetry{z-index:2;color:var(--cyber-accent,#c5142f);opacity:.24;font-size:8px;line-height:1.65;letter-spacing:.15em}
#games-appearance .games-truth-telemetry span{position:absolute;top:var(--y);left:clamp(14px,2.7vw,56px);white-space:pre}
#games-appearance .games-truth-telemetry span:nth-child(even){left:auto;right:clamp(14px,2.7vw,56px);text-align:right}
/* Two identical 28-line halves create a seamless, slow downward drift.
   The broad empty center and low opacity keep numbers out of reading areas. */
#games-appearance .games-truth-streams{z-index:2;overflow:hidden;color:var(--cyber-accent,#c5142f);opacity:.115;mask-image:linear-gradient(90deg,#000,transparent 20% 80%,#000)}
#games-appearance .games-truth-streams span{position:absolute;top:-112vh;left:var(--x);font-size:clamp(8px,.6vw,11px);line-height:4vh;white-space:pre;letter-spacing:.14em;animation:games-truth-code-rain var(--duration,61s) linear var(--delay,0s) infinite}
@keyframes games-truth-code-rain{from{transform:translateY(0)}to{transform:translateY(112vh)}}
/* A thin low-opacity strip twitches once per 31 seconds. No opacity flashing,
   fullscreen displacement, animated noise, secondary copy, or moving sigil. */
#games-appearance .games-truth-distortion{z-index:3;opacity:.075;clip-path:polygon(0 27.1%,100% 27.1%,100% 27.7%,0 27.7%,0 70.9%,100% 70.9%,100% 71.6%,0 71.6%);background:repeating-linear-gradient(90deg,transparent 0 17px,var(--cyber-accent,#c5142f) 17px 18px,transparent 18px 49px,var(--cyber-accent,#c5142f) 49px 53px,transparent 53px 101px);animation:games-truth-signal-twitch 31s steps(1,end) infinite}
@keyframes games-truth-signal-twitch{0%,62.4%,63.4%,100%{transform:translateX(0)}62.5%{transform:translateX(4px)}}
#games-appearance[data-strength=balanced] .games-truth-streams{opacity:.15}
#games-appearance[data-strength=balanced] .games-truth-bands{opacity:.19}
/* The existing appearance controller owns visibility, pause, and lifecycle.
   CSS also honors the site-wide effects-off attributes without a new observer. */
#games-appearance .games-truth-stage *,#games-appearance .games-truth-stage *::before,#games-appearance .games-truth-stage *::after{animation-play-state:paused}
#games-appearance[data-moving=true] .games-truth-stage *,#games-appearance[data-moving=true] .games-truth-stage *::before,#games-appearance[data-moving=true] .games-truth-stage *::after{animation-play-state:running}
#games-appearance[data-quiet=true] :is(.games-truth-streams,.games-truth-distortion),#games-appearance[data-particles=false] .games-truth-streams,#games-appearance[data-glitch=false] .games-truth-distortion,#games-appearance[data-boot=false] .games-truth-telemetry{display:none}
#games-appearance[data-low=true] .games-truth-streams span:nth-child(even){display:none}
body[data-reading-sprites=off] #games-appearance .games-truth-stage *,html[data-reading-sprites=off] #games-appearance .games-truth-stage *,body:has(#hub-world[data-youth-ambience=off]) #games-appearance .games-truth-stage *{animation:none!important}
body[data-reading-sprites=off] #games-appearance :is(.games-truth-streams,.games-truth-distortion),html[data-reading-sprites=off] #games-appearance :is(.games-truth-streams,.games-truth-distortion),body:has(#hub-world[data-youth-ambience=off]) #games-appearance :is(.games-truth-streams,.games-truth-distortion){display:none!important}
@media(max-width:700px){#games-appearance .games-truth-streams span:nth-child(even){display:none}#games-appearance .games-truth-telemetry{font-size:7px;opacity:.18}#games-appearance .games-truth-telemetry span:nth-child(n+3):nth-child(-n+4){display:none}#games-appearance .games-truth-grid{background-size:64px 64px}#games-appearance .games-truth-bands{opacity:.13}}
@media(prefers-reduced-motion:reduce),(prefers-contrast:more){#games-appearance .games-truth-stage *,#games-appearance .games-truth-stage *::before,#games-appearance .games-truth-stage *::after{animation:none!important}#games-appearance :is(.games-truth-streams,.games-truth-distortion){display:none!important}}
body[data-reading-contrast=high] #games-appearance .games-truth-stage,html[data-reading-contrast=high] #games-appearance .games-truth-stage{display:none!important}
@media(forced-colors:active){#games-appearance .games-truth-stage{display:none!important}#games-cyber-controls .games-cyber-close{border-color:ButtonText!important}}
@media(prefers-reduced-transparency:reduce) and (forced-colors:none){body[data-library-theme=cyber]:not([data-reading-contrast=high]) #games-cyber-controls{background:var(--games-ui-panel,#080a0d)!important}}
@media print{#games-cyber-controls,#games-appearance{display:none!important}}

/* Revision31 rebuild: restrained moving field and readable complete KJV passages. */
#games-appearance .games-truth-grid{opacity:.045;animation:ar31-field-drift 58s ease-in-out infinite alternate}
#games-appearance .games-truth-bands{opacity:.09;animation:ar31-band-drift 47s ease-in-out infinite alternate}
#games-appearance[data-strength=balanced] .games-truth-bands{opacity:.12}
#games-appearance .games-truth-streams{opacity:.18}
#games-appearance[data-strength=balanced] .games-truth-streams{opacity:.22}
#games-appearance .games-truth-scan{opacity:.12}
#games-appearance .games-truth-mark{opacity:.052;background:transparent;mask:none;-webkit-mask:none}
#games-appearance .games-truth-mark::before,#games-appearance .games-truth-mark-slice{content:'';position:absolute;inset:0;background:var(--cyber-accent,#c5142f);mask:url('/assets/ar-crowned-monogram-exact-2048.png') center/min(88vw,90dvh) no-repeat;-webkit-mask:url('/assets/ar-crowned-monogram-exact-2048.png') center/min(88vw,90dvh) no-repeat}
#games-appearance .games-truth-mark::before{opacity:.8}
#games-appearance .games-truth-mark-slice{display:none;clip-path:inset(calc(24% + var(--slice-index)*19%) 0 calc(74% - var(--slice-index)*19%) 0)}
#games-appearance .games-truth-stage[data-signal] .games-truth-mark-slice{display:block;transform:translateX(calc((var(--slice-index) - 1)*3px));opacity:.9}
#games-appearance .games-truth-stage[data-signal='2'] .games-truth-mark-slice{transform:translateX(calc((1 - var(--slice-index))*4px))}
#games-appearance .games-truth-scriptures{z-index:2;color:var(--cyber-accent,#c5142f);opacity:.19;overflow:hidden;mask-image:linear-gradient(90deg,#000,transparent 36% 64%,#000)}
#games-appearance .games-truth-scriptures span{position:absolute;left:2.8%;top:calc(17% + var(--passage-index)*29%);max-width:26%;font:11px/1.8 ui-monospace,Consolas,monospace;letter-spacing:.08em;animation:ar31-scripture-drift calc(53s + var(--passage-index)*11s) ease-in-out infinite alternate}
#games-appearance .games-truth-scriptures span:nth-child(even){left:auto;right:2.8%;text-align:right}
@keyframes ar31-field-drift{from{transform:translate(-9px,-5px)}to{transform:translate(11px,13px)}}
@keyframes ar31-band-drift{from{transform:translateY(-12px)}to{transform:translateY(17px)}}
@keyframes ar31-scripture-drift{from{transform:translate(0,-9px)}to{transform:translate(6px,12px)}}
#games-appearance .games-truth-stage *,#games-appearance .games-truth-stage *::before{animation-play-state:paused}
#games-appearance[data-moving=true] .games-truth-stage *,#games-appearance[data-moving=true] .games-truth-stage *::before{animation-play-state:running}
#games-appearance[data-quiet=true] .games-truth-scriptures,#games-appearance[data-particles=false] .games-truth-scriptures{display:none}
body[data-reading-sprites=off] #games-appearance .games-truth-scriptures,html[data-reading-sprites=off] #games-appearance .games-truth-scriptures,body:has(#hub-world[data-youth-ambience=off]) #games-appearance .games-truth-scriptures{display:none!important}
@media(max-width:700px){#games-appearance .games-truth-scriptures span{font-size:9px;max-width:36%}#games-appearance .games-truth-scriptures span:nth-child(n+2){display:none}}
@media(prefers-reduced-motion:reduce),(prefers-contrast:more){#games-appearance .games-truth-stage *{animation:none!important}#games-appearance .games-truth-mark-slice,#games-appearance .games-truth-scriptures{display:none!important}}

/* Defense in depth: preference changes clear the timer and hide any active slice. */
body[data-reading-sprites=off] #games-appearance .games-truth-mark-slice,html[data-reading-sprites=off] #games-appearance .games-truth-mark-slice,body:has(#hub-world[data-youth-ambience=off]) #games-appearance .games-truth-mark-slice,#games-appearance[data-moving=false] .games-truth-mark-slice,#games-appearance[data-glitch=false] .games-truth-mark-slice,#games-appearance[data-quiet=true] .games-truth-mark-slice{display:none!important}
