/* V6 web ambience: isolated from overlay-source pages and the V5 save pipeline. */
.has-retrofx { --fx-strength:.84; --fx-light:.85; --fx-speed:.88; --fx-time:.88s }
.fx-scape { position:relative; isolation:isolate }
.fx-world,.fx-world>span:not(.fx-arcade-badge),.fx-canvas {
  position:absolute; inset:0; width:100%; height:100%; pointer-events:none; user-select:none
}
.fx-world { z-index:-1; overflow:hidden; border-radius:inherit; contain:layout paint; opacity:0; transition:opacity .28s ease }
[data-fx-background=on] .fx-world { opacity:1 }
.new-hero-art.fx-scape .new-hero-bg { z-index:-4 }
.new-hero-art.fx-scape::after { z-index:-2 }
[data-fx-background=on] .new-hero-art.fx-scape .new-hero-bg {
  transform:translate3d(var(--fx-mx,0px),calc(var(--fx-my,0px) + var(--fx-scroll,0px)),0) scale(1.07);
  transition:transform .65s cubic-bezier(.16,.72,.26,1)
}
.fx-canvas { image-rendering:pixelated; opacity:.93 }
.fx-world>span:not(.fx-arcade-badge) { display:block }
.fx-fog {
  opacity:0;
  background:radial-gradient(ellipse 49% 36% at 36% 93%,#ad71b148,transparent 75%),
    radial-gradient(ellipse 46% 30% at 74% 95%,#ffd09728,transparent 78%);
  animation:fx-fog-drift calc(34s * var(--fx-speed)) ease-in-out infinite
}
[data-fx-fog=on] .fx-fog { opacity:calc(.73 * var(--fx-strength)) }
.fx-lamp {
  opacity:0;
  background:radial-gradient(ellipse 27% 46% at 87% 53%,#f8a95541 0%,#ea92451b 44%,transparent 80%),
    radial-gradient(ellipse 44% 29% at 77% 96%,#feb15b2b,transparent 85%);
  animation:fx-lamp-pulse calc(12s * var(--fx-speed)) ease-in-out infinite
}
[data-fx-lamps=on] .fx-lamp { opacity:calc(.92 * var(--fx-strength) * var(--fx-light)) }
.fx-ray {
  opacity:0;
  background:linear-gradient(116deg,transparent 37%,#ffe8aa00 46%,#ffe2a828 54%,transparent 65%);
  transform:translateX(-65%);
  animation:fx-window-sweep calc(31s * var(--fx-speed)) ease-in-out infinite
}
[data-fx-reflect=on] .fx-ray { opacity:calc(.81 * var(--fx-strength) * var(--fx-light)) }
.fx-grid {
  opacity:0;
  background-image:linear-gradient(0deg,#b0888138 1px,transparent 1px),linear-gradient(90deg,#b0888138 1px,transparent 1px);
  background-size:28px 28px; mask-image:linear-gradient(0deg,#000,transparent 32%);
  animation:fx-grid-drift calc(21s * var(--fx-speed)) linear infinite
}
[data-fx-pixels=on] .fx-grid { opacity:calc(.14 * var(--fx-strength)) }
.fx-crt {
  opacity:0;
  background:repeating-linear-gradient(0deg,transparent 0 3px,#1a101b 3px 4px);
  mask-image:radial-gradient(ellipse 65% 70% at 80% 40%,#000,transparent 72%);
  animation:fx-scan calc(18s * var(--fx-speed)) linear infinite
}
[data-fx-crt=on] .fx-crt { opacity:calc(.105 * var(--fx-strength)) }
.fx-scape:not(.fx-in-view) .fx-world *,[data-fx-motion=off] .fx-world * { animation-play-state:paused!important }
@keyframes fx-fog-drift{0%,100%{transform:translate3d(-6%,0,0) scale(1.18)}50%{transform:translate3d(8%,-3%,0) scale(1.27)}}
@keyframes fx-lamp-pulse{0%,100%{filter:brightness(.88)}32%{filter:brightness(1.25)}47%{filter:brightness(1.06)}71%{filter:brightness(1.48)}}
@keyframes fx-window-sweep{0%,13%{transform:translateX(-84%)}61%,100%{transform:translateX(84%)}}
@keyframes fx-grid-drift{to{background-position:28px 28px}}
@keyframes fx-scan{to{background-position:0 24px}}
/* A tiny CRT perched in the dashboard atmosphere; decoration never overlaps controls. */
.fx-arcade-badge { position:absolute; top:12%; right:25%; display:grid; justify-items:center; gap:8px; transform:rotate(-5deg) scale(.86); opacity:.72 }
.fx-monitor { display:block; width:74px; height:54px; padding:6px 12px 8px 6px; position:relative; border-radius:10px 11px 12px 8px; background:linear-gradient(145deg,#a27854,#362439 75%); box-shadow:0 0 30px #ffa35850,3px 4px #140e1f; border:1px solid #d49d62 }
.fx-monitor::after { content:''; position:absolute; right:4px; bottom:9px; width:3px; height:3px; background:#ffd18b; box-shadow:0 0 5px #f59c43 }
.fx-monitor-face { display:grid; place-items:center; width:100%; height:100%; border-radius:32%/25%; background:repeating-linear-gradient(0deg,#0c102434 0 2px,transparent 2px 4px),radial-gradient(ellipse,#654878,#211a38 75%); border:2px solid #181224 }
.fx-monitor-star { display:block; width:13px; height:13px; background:#ffd88f; clip-path:polygon(43% 0,57% 0,57% 43%,100% 43%,100% 57%,57% 57%,57% 100%,43% 100%,43% 57%,0 57%,0 43%,43% 43%); animation:fx-crt-star calc(2.6s * var(--fx-speed)) steps(3,end) infinite }
.fx-monitor-label { color:#ffe1b8; font:700 8px/1.2 ui-monospace,monospace; letter-spacing:.12em; text-shadow:0 1px #211626 }
[data-fx-crt=off] .fx-arcade-badge { display:none }
@keyframes fx-crt-star{0%,100%{opacity:.56}50%{opacity:1;transform:scale(1.15)}}
[data-fx-hover=on] .fx-tilt-active {
  transform:perspective(850px) rotateX(var(--fx-tilt-x,0deg)) rotateY(var(--fx-tilt-y,0deg)) translateY(-2px);
  box-shadow:var(--fx-panel-x,0px) var(--fx-panel-y,0px) 27px #f2a55a32,0 8px 26px #0e091c6e;
  filter:brightness(1.04);
  transition:transform .24s ease-out,box-shadow .24s ease-out,border-color .24s ease-out,filter .24s ease-out
}
[data-fx-hover=on] .lamp-button:hover,[data-fx-hover=on] .studio-shell .primary:hover { box-shadow:0 0 18px #e6a75a70,0 2px 0 #a66c45 }
[data-fx-hover=on] .fx-pressed { scale:.97; transition:scale .13s ease }
[data-fx-hover=on] .site-nav a,[data-fx-hover=on] .main-nav button { position:relative }
[data-fx-hover=on] .site-nav a::after,[data-fx-hover=on] .main-nav button::after {
  content:''; position:absolute; height:2px; bottom:3px; left:7px; right:7px; background:linear-gradient(90deg,transparent,#f9bd75,transparent);
  opacity:0; transform:scaleX(.32); transition:transform .22s,opacity .22s
}
[data-fx-hover=on] .site-nav a:hover::after,[data-fx-hover=on] .main-nav button[aria-current=page]::after,
[data-fx-hover=on] .main-nav button:hover::after { opacity:.8; transform:scaleX(1) }
.fx-burst { position:fixed; z-index:2147483000; width:0; height:0; pointer-events:none }
.fx-burst-bit { position:absolute; width:4px; height:4px; background:var(--hue,#ffd083); animation:fx-burst-pixel .43s cubic-bezier(.12,.52,.4,1) both }
@keyframes fx-burst-pixel{0%{opacity:.93;transform:translate(0,0)}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.5)}}
.fx-reveal { animation:fx-reveal-entrance calc(var(--fx-time) * .63) cubic-bezier(.15,.68,.24,1) backwards }
@keyframes fx-reveal-entrance{from{opacity:.66;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.studio-shell #main:has(>.fx-dissolve){position:relative}
.fx-dissolve { position:absolute; top:0; left:0; right:0; height:4px; background:repeating-linear-gradient(90deg,#f6c389cc 0 7px,transparent 7px 13px); pointer-events:none; animation:fx-dissolve .5s steps(6,end) both }
@keyframes fx-dissolve{0%{opacity:.58;clip-path:inset(0 100% 0 0)}70%{opacity:.21;clip-path:inset(0 0 0 0)}100%{opacity:0}}
[data-fx-motion=off] .fx-reveal,[data-fx-motion=off] .fx-burst-bit,[data-fx-motion=off] .fx-dissolve {animation:none!important}
[data-fx-motion=off] .fx-burst,[data-fx-motion=off] .fx-dissolve{display:none}
/* Shared control surface for the settings tab and the public dialog. */
.fx-settings,.fx-dialog { color-scheme:dark; color:#fff0dd; background:linear-gradient(142deg,#302039,#201725 65%); border:1px solid #7b553d; border-radius:15px }
.fx-settings { padding:clamp(17px,3vw,26px); margin:22px 0 0; box-shadow:inset 0 1px #ffe3a922,0 10px 32px #0e091d36 }
.fx-dialog { width:min(720px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; padding:14px; box-shadow:0 26px 90px #10091fba; font:15px/1.55 system-ui,sans-serif }
.fx-dialog::backdrop { background:#100a18c9; backdrop-filter:blur(5px) }
.fx-dialog .fx-settings { border:0; box-shadow:none; margin:0; background:none }
.fx-close { float:right; margin:4px 4px 0 12px }
.fx-settings h2{font-size:clamp(21px,4vw,28px);line-height:1.2;margin:.3rem 0 .7rem}
.fx-overline{color:#f4ba79;font:700 11px/1.4 ui-monospace,monospace;letter-spacing:.15em;margin:0}
.fx-help{color:#d8c1cf;font-size:13px;margin:.5rem 0 1rem}
.fx-motion-status{margin:16px 0 0}
.fx-settings :is(button,select),.fx-dialog .fx-close {
  background:#332336; color:#ffe7cb; border:1px solid #76513f; border-radius:8px; min-height:38px; padding:7px 10px; font:inherit; cursor:pointer
}
.fx-settings button[aria-pressed=true] { background:#f0ae66;color:#211327;border-color:#ffda9e; box-shadow:0 0 14px #e79b4b39; font-weight:750 }
.fx-settings :is(button,select):hover,.fx-dialog .fx-close:hover{border-color:#e1a56a}
.fx-settings :focus-visible,.fx-dialog .fx-close:focus-visible { outline:2px solid #ffd78a; outline-offset:2px }
.fx-presets{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 15px}
.fx-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 16px;margin:8px 0 12px}
.fx-field{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 8px;min-width:0;color:#fff0df;font-size:13px}
.fx-field input[type=range]{grid-column:1/-1;width:100%;grid-row:2;accent-color:#f2b478;min-height:22px;margin:0}
.fx-field output{grid-column:2;grid-row:1;font:600 11px/1.4 ui-monospace,monospace;color:#ffd49a;text-align:right}
.fx-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin-top:10px}
.fx-check{display:flex;flex-direction:row-reverse;justify-content:flex-end;gap:7px;min-height:30px;cursor:pointer}
.fx-check input { accent-color:#eeb075;width:16px;height:16px;flex:none;cursor:pointer }
.fx-details { border-top:1px solid #79574088;padding-top:11px;margin-top:13px }
.fx-details summary{cursor:pointer;color:#ffd6a5;font-size:13px}
@media(max-width:900px){.fx-arcade-badge{display:none}}
@media(max-width:550px){.fx-fields,.fx-checks{grid-template-columns:1fr}.fx-world .fx-crt{opacity:.05}.fx-dialog{padding:9px}.fx-settings button{font-size:12px}}
@media(prefers-reduced-motion:reduce){
  .fx-world,.fx-dissolve,.fx-burst{display:none!important}
  .fx-reveal{animation:none!important}
  .new-hero-art.fx-scape .new-hero-bg{transform:none!important;transition:none!important}
}
