/* FolmioX 4.9.9 — Cinematic Gateway / original mark / selectable color atmospheres.
   Scoped to #authGate: never affects the authenticated app, billing or admin. */
#authGate{
  --fx499-cyan:#29e8ff;--fx499-violet:#9258ff;--fx499-rgb:92,88,255;
  --fx499-flare:rgba(102,54,255,.40);--fx499-tint:0deg;
  --fx499-scene-top:#090d32;--fx499-scene-bottom:#020717;
  color:#f3f7ff;
}
#authGate[data-gateway-scene="terra"]{--fx499-cyan:#6af8cf;--fx499-violet:#2bcf9c;--fx499-rgb:37,208,159;--fx499-flare:rgba(5,178,143,.32);--fx499-tint:112deg;--fx499-scene-top:#032725;--fx499-scene-bottom:#04120f}
#authGate[data-gateway-scene="aurora"]{--fx499-cyan:#6cf2ff;--fx499-violet:#6f96ff;--fx499-rgb:80,181,255;--fx499-flare:rgba(49,153,254,.35);--fx499-tint:303deg;--fx499-scene-top:#051a38;--fx499-scene-bottom:#020a20}
#authGate[data-gateway-scene="nexus"]{--fx499-cyan:#24dffb;--fx499-violet:#aa65ff;--fx499-rgb:107,88,255;--fx499-flare:rgba(127,65,250,.45);--fx499-tint:0deg;--fx499-scene-top:#10103b;--fx499-scene-bottom:#030719}
#authGate[data-gateway-scene="eclissi"]{--fx499-cyan:#ffb564;--fx499-violet:#ff558e;--fx499-rgb:237,81,137;--fx499-flare:rgba(255,61,110,.32);--fx499-tint:112deg;--fx499-scene-top:#341029;--fx499-scene-bottom:#160512}
#authGate[data-gateway-scene="origini"]{--fx499-cyan:#fce49b;--fx499-violet:#f59b48;--fx499-rgb:238,171,72;--fx499-flare:rgba(239,161,65,.33);--fx499-tint:165deg;--fx499-scene-top:#312010;--fx499-scene-bottom:#160e08}
#authGate:not(.hidden){display:block!important;inset:0!important;position:fixed!important;z-index:200!important;overflow-y:auto!important;overflow-x:hidden!important;padding:0!important;backdrop-filter:none!important;background:var(--fx499-scene-bottom)!important;}
#authGate .auth-gate-shell{
  display:flex!important;flex-direction:column;position:relative;isolation:isolate;
  min-width:0!important;width:100%!important;min-height:100svh!important;max-height:none!important;
  padding:0!important;margin:0!important;border:0!important;border-radius:0!important;overflow:hidden!important;
  background:
    linear-gradient(90deg,rgba(2,5,16,.88) 0%,rgba(1,7,21,.63) 30%,rgba(0,7,25,.08) 58%,rgba(1,7,22,.58) 100%),
    radial-gradient(ellipse at 57% 42%,var(--fx499-flare),transparent 46%),
    radial-gradient(ellipse at 90% 4%,rgba(var(--fx499-rgb),.35),transparent 48%),
    linear-gradient(155deg,var(--fx499-scene-top),var(--fx499-scene-bottom)),
    url('/assets/fx-nebula-gemini.jpg') center/cover no-repeat!important;
  background-blend-mode:normal,screen,screen,normal,screen!important;
  box-shadow:none!important;
  transition:background-color .5s ease,filter .5s ease;
}
#authGate .auth-gate-shell::before{content:"";pointer-events:none;position:absolute;z-index:0;inset:0;
  background:
  radial-gradient(circle at 13% 23%,#ffffff86 0 .65px,transparent 1.3px) 0 0/75px 110px,
  radial-gradient(circle at 58% 43%,#b4e9ff96 0 .65px,transparent 1.5px) 30px 70px/105px 143px,
  radial-gradient(ellipse at 53% 51%,rgba(var(--fx499-rgb),.24),transparent 35%);
  opacity:.54;
}
#authGate .auth-gate-shell::after{content:"";pointer-events:none;position:absolute;z-index:0;width:min(72vw,1150px);height:min(85vw,1180px);left:25%;top:-29%;border-radius:50%;transform:rotate(-22deg) scaleY(.73);
  background:radial-gradient(ellipse at 50% 50%,transparent 41%,rgba(var(--fx499-rgb),.15) 48%,rgba(var(--fx499-rgb),.35) 49%,transparent 52%),radial-gradient(ellipse,transparent 58%,rgba(110,202,255,.12) 65%,transparent 74%);
  filter:blur(4px);transition:background 450ms ease;
}
#authGate .fx499-scene-atmosphere{position:absolute;inset:-4% -3% -6% 0;z-index:0;pointer-events:none;opacity:.9;
  background:radial-gradient(ellipse at 54% 55%,var(--fx499-flare),transparent 33%),radial-gradient(ellipse at 85% 14%,rgba(var(--fx499-rgb),.31),transparent 35%);
  transition:opacity .5s ease;
}
#authGate .auth-gate-top{width:100%;max-width:none!important;z-index:10!important;padding:24px clamp(24px,4.5vw,90px)!important;border:0!important;background:transparent!important;display:flex;align-items:center;justify-content:space-between;}
#authGate .auth-gate-brand{display:flex;align-items:center;gap:12px}
#authGate .auth-gate-brand img{width:51px!important;height:51px!important;object-fit:contain;filter:drop-shadow(0 0 10px rgba(var(--fx499-rgb),.6))}
#authGate .auth-gate-brand strong{font-size:clamp(21px,2vw,30px)!important;font-weight:800;color:white!important;letter-spacing:-.045em}
#authGate .auth-gate-brand strong::first-letter{color:#fff}
#authGate .auth-gate-brand small{font-size:9px;color:#aab9d8!important;letter-spacing:.14em}
#authGate .auth-lang-switch{display:flex;border:1px solid #729ce67c;border-radius:14px;background:#060e25db!important;padding:3px;gap:2px}
#authGate .auth-lang-switch button{min-width:44px;min-height:40px;color:#d4ddf8;border-radius:10px;cursor:pointer;font-weight:800}
#authGate .auth-lang-switch button.active{background:linear-gradient(130deg,rgba(var(--fx499-rgb),.38),rgba(var(--fx499-rgb),.18));border:1px solid var(--fx499-cyan);color:white;box-shadow:0 0 17px rgba(var(--fx499-rgb),.32)}
#authGate .auth-gate-main.fx498-gateway-main{flex:1;position:relative;z-index:2;display:grid!important;grid-template-columns:minmax(0,1.18fr) minmax(345px,.84fr)!important;gap:clamp(24px,6vw,130px)!important;max-width:1900px!important;margin:0 auto!important;width:100%;min-height:0!important;align-items:center!important;padding:clamp(24px,4vw,70px) clamp(25px,5vw,95px) 106px!important;}
#authGate .fx498-gateway-copy{position:relative;z-index:3!important;align-self:center!important;justify-content:center;display:flex;flex-direction:column;min-height:0!important;padding:clamp(20px,6vh,84px) 0!important;max-width:720px;text-align:left!important;}
#authGate .fx498-gateway-copy .auth-kicker{font-size:11px;letter-spacing:.22em;color:var(--fx499-cyan);margin-bottom:15px}
#authGate .fx498-gateway-copy h1{font-size:clamp(56px,5.35vw,92px)!important;line-height:1.05!important;letter-spacing:-.05em!important;max-width:710px!important;min-width:0;z-index:3;margin:0 0 25px!important;font-weight:850;text-wrap:balance;}
#authGate .fx498-gateway-copy h1 em{background-image:linear-gradient(95deg,var(--fx499-cyan),#69a6ff 55%,var(--fx499-violet))!important;color:transparent;-webkit-background-clip:text;background-clip:text;font-style:normal}
#authGate .fx498-gateway-copy>p{font-size:clamp(19px,1.8vw,28px)!important;max-width:710px;line-height:1.32;margin:0!important;color:#e2e9fc!important;text-shadow:0 2px 15px #020713}
#authGate .fx498-gateway-art{display:none!important}
#authGate .fx4981-cosmos{display:block!important;left:37%!important;top:8%!important;z-index:1!important;width:min(41vw,690px)!important;height:min(85svh,830px)!important;opacity:1!important;
  background:url('/assets/nebula-gateway-cosmic-art-v4981.webp') center / contain no-repeat!important;
  filter:hue-rotate(var(--fx499-tint)) drop-shadow(0 0 42px var(--fx499-flare))!important;
  transform:rotate(-5deg)!important;transform-origin:center center;
  transition:filter 650ms ease,opacity 400ms ease;
  mask-image:linear-gradient(90deg,transparent 0%,#000 8%,#000 91%,transparent 100%);
}
#authGate .fx498-features{position:relative;z-index:5;display:flex;flex-wrap:wrap;gap:12px!important;margin-top:38px!important}
#authGate .fx498-features>div{display:flex;align-items:center;gap:12px;min-height:86px;min-width:0;max-width:225px;flex:0 1 205px;padding:14px 16px!important;border:1px solid rgba(var(--fx499-rgb),.40)!important;background:linear-gradient(115deg,#0b183edb,#1b2350bc)!important;box-shadow:inset 0 1px #ffffff24,0 15px 40px #0007;border-radius:17px!important;color:white!important;backdrop-filter:blur(12px)}
#authGate .fx498-features>div i{font-style:normal;display:grid;place-items:center;flex:0 0 43px;width:43px!important;height:43px!important;margin:0!important;color:var(--fx499-cyan)!important;border:1px solid rgba(var(--fx499-rgb),.55)!important;border-radius:13px;background:rgba(var(--fx499-rgb),.14);font-size:23px}
#authGate .fx498-features>div span{display:flex;flex-direction:column;gap:3px;line-height:1.3}
#authGate .fx498-features strong{font-size:14px;white-space:nowrap}
#authGate .fx498-features small{font-size:10px;color:#bfcce7;font-weight:500;line-height:1.35}
#authGate .fx498-login-card{position:relative!important;z-index:8!important;width:min(100%,505px)!important;max-width:505px!important;min-width:0;justify-self:end!important;align-self:center;margin:0!important;padding:clamp(30px,3.3vw,54px)!important;border-radius:28px!important;border:1px solid rgba(var(--fx499-rgb),.58)!important;background:linear-gradient(153deg,rgba(28,51,103,.9),rgba(10,21,52,.95) 74%,rgba(23,20,59,.9))!important;box-shadow:inset 0 1px #fff4,0 28px 75px #010513af,0 0 55px rgba(var(--fx499-rgb),.16)!important;backdrop-filter:blur(24px);text-align:center}
#authGate .fx498-login-card .auth-mark-wrap{width:106px!important;height:106px!important;margin:0 auto 22px!important;filter:drop-shadow(0 0 18px var(--fx499-flare))}
#authGate .fx498-login-card .auth-mark-wrap img{width:100%;height:100%;object-fit:contain}
#authGate .fx498-login-card h2{font-size:clamp(27px,2.2vw,36px)!important;letter-spacing:-.035em;margin:0 0 13px}
#authGate .fx498-login-card>p{font-size:16px!important;line-height:1.45;color:#c9d3e8!important;margin:0 0 27px!important}
#authGate .fx498-login-card .btn{width:100%;display:flex!important;justify-content:center;align-items:center;gap:12px;min-height:61px!important;cursor:pointer;border-radius:13px!important;font-size:15px!important;font-weight:800;letter-spacing:-.018em}
#authGate .fx498-login-card .auth-primary{background:linear-gradient(103deg,var(--fx499-cyan),#6b9dff 55%,var(--fx499-violet))!important;border:1px solid #ffffff47;color:#071026!important;box-shadow:0 0 36px rgba(var(--fx499-rgb),.28)!important}
#authGate .fx498-login-card .auth-secondary{background:#071632c7!important;border:1px solid rgba(var(--fx499-rgb),.72)!important;color:#f1f8ff!important}
#authGate .fx499-login-divider{display:flex;align-items:center;gap:15px;color:#b3c5e4;font-size:13px;margin:12px 0 2px}
#authGate .fx499-login-divider:before,#authGate .fx499-login-divider:after{content:"";height:1px;background:#9fc2fc4b;flex:1}
#authGate .fx498-login-card .auth-note{margin-top:24px!important;font-size:12px!important;color:#b1bed5!important}
#authGate .fx498-login-card .auth-legal-links{margin-top:21px!important;font-size:12px;gap:7px}
#authGate .fx498-login-card .auth-legal-links a{color:#8fdaf7}
#authGate .fx498-login-card .auth-legal-links a:hover{color:white;text-decoration:underline}
#authGate .fx499-scene-selector{position:absolute!important;z-index:10!important;bottom:20px!important;left:0;right:0;margin:0 auto;display:flex!important;justify-content:center!important;gap:clamp(6px,1.4vw,25px)!important;padding:12px!important;max-width:760px;pointer-events:auto}
#authGate .fx499-scene-choice{appearance:none;-webkit-appearance:none;position:relative;min-width:70px;min-height:89px;display:flex;align-items:center;flex-direction:column;gap:9px;padding:6px 5px 8px;border:0;border-radius:15px;background:transparent;color:#bfcee8;cursor:pointer;transition:background .2s ease,transform .2s ease;color-scheme:dark}
#authGate .fx499-scene-choice .fx499-orb{display:block;width:40px;height:40px;aspect-ratio:1;border-radius:50%;border:1px solid #a3cafc7b;box-shadow:inset -9px -6px 10px #000c,0 0 13px #213b8c7c;background:radial-gradient(circle at 34% 29%,#e3fcff 0 2%,#60c4a7 15%,#194459 42%,#092136 70%,#050915 100%)}
#authGate .fx499-scene-choice[data-gateway-color="aurora"] .fx499-orb{background:radial-gradient(circle at 33% 25%,#e6ffff,#91caff 15%,#365ad8 40%,#142e7a 70%,#070b29)}
#authGate .fx499-scene-choice[data-gateway-color="nexus"] .fx499-orb{background:radial-gradient(circle at 40% 28%,#e7cbff,#b07cff 13%,#7049de 42%,#21216c 72%,#0b103e)}
#authGate .fx499-scene-choice[data-gateway-color="eclissi"] .fx499-orb{background:radial-gradient(circle at 75% 40%,#ffc3aa,#ff6d8a 16%,#822852 40%,#2b0b35 75%,#070514)}
#authGate .fx499-scene-choice[data-gateway-color="origini"] .fx499-orb{background:radial-gradient(circle at 25% 25%,#fff6b7,#e8b95b 18%,#bb7833 43%,#5d341b 75%,#1b0b09)}
#authGate .fx499-scene-choice .fx499-scene-label{font-size:10px;letter-spacing:.13em;font-weight:700}
#authGate .fx499-scene-choice[aria-pressed="true"]{color:#fff;background:rgba(var(--fx499-rgb),.14)}
#authGate .fx499-scene-choice[aria-pressed="true"] .fx499-orb{outline:2px solid var(--fx499-cyan);outline-offset:5px;box-shadow:inset -9px -6px 10px #0008,0 0 27px rgba(var(--fx499-rgb),.8)}
#authGate .fx499-scene-choice[aria-pressed="true"]:after{content:"";position:absolute;bottom:0;width:43px;height:3px;border-radius:10px;background:var(--fx499-cyan);box-shadow:0 0 12px var(--fx499-cyan)}
#authGate .fx499-scene-choice:hover{background:rgba(var(--fx499-rgb),.15);transform:translateY(-2px)}
#authGate .fx499-scene-choice:focus-visible{outline:2px solid var(--fx499-cyan);outline-offset:3px}
#authGate .auth-primary:focus-visible,#authGate .auth-secondary:focus-visible,#authGate .auth-lang-switch button:focus-visible{outline:2px solid var(--fx499-cyan);outline-offset:4px}
@media(prefers-reduced-motion:no-preference){
  #authGate .fx4981-cosmos{animation:fx499-card-float 10s ease-in-out infinite alternate!important}
  #authGate .auth-gate-shell::after{animation:fx499-nebula-breathe 15s ease-in-out infinite alternate}
  #authGate .fx499-scene-atmosphere{animation:fx499-light-pulse 12s ease-in-out infinite alternate}
  @keyframes fx499-card-float{from{transform:translate(0,0) rotate(-5deg)}to{transform:translate(3px,-19px) rotate(-3deg)}}
  @keyframes fx499-nebula-breathe{from{opacity:.65}to{opacity:1}}
  @keyframes fx499-light-pulse{from{opacity:.65}to{opacity:1}}
}
@media(min-width:1400px){#authGate .fx498-gateway-copy{margin-top:-30px}#authGate .fx498-login-card{transform:translateY(-12px)}}
@media(max-width:1050px){
  #authGate .auth-gate-main.fx498-gateway-main{grid-template-columns:minmax(0,1fr) minmax(315px,.9fr)!important;gap:20px!important;padding:30px 25px 120px!important}
  #authGate .fx498-gateway-copy h1{font-size:clamp(41px,5.8vw,64px)!important}
  #authGate .fx4981-cosmos{left:30%!important;width:53vw!important;opacity:.77!important}
  #authGate .fx498-features>div{flex:1 1 155px!important;padding:12px!important;min-height:64px}
  #authGate .fx498-features small{font-size:9px}
  #authGate .fx498-login-card{padding:25px!important}
}
@media(max-width:760px){
  #authGate .auth-gate-shell{min-height:100svh!important;height:auto!important;background-position:center center!important}
  #authGate .auth-gate-top{padding:14px 18px!important}
  #authGate .auth-gate-brand img{width:40px!important;height:40px!important}
  #authGate .auth-gate-brand strong{font-size:21px!important}
  #authGate .auth-gate-brand small{font-size:8px}
  #authGate .auth-lang-switch button{min-width:37px;min-height:34px}
  #authGate .auth-gate-main.fx498-gateway-main{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;min-height:0!important;padding:22px 18px 18px!important}
  #authGate .fx498-gateway-copy{align-self:auto!important;max-width:650px;text-align:center!important;margin:0 auto!important;padding:14px 0 10px!important}
  #authGate .fx498-gateway-copy .auth-kicker{font-size:9px;margin-bottom:11px}
  #authGate .fx498-gateway-copy h1{font-size:clamp(38px,9vw,59px)!important;margin:0 auto 12px!important;max-width:560px!important}
  #authGate .fx498-gateway-copy>p{font-size:clamp(14px,3.5vw,19px)!important}
  #authGate .fx4981-cosmos{left:19%!important;top:18%!important;width:73vw!important;height:54svh!important;opacity:.38!important;filter:hue-rotate(var(--fx499-tint)) blur(1px) drop-shadow(0 0 25px var(--fx499-flare))!important}
  #authGate .fx498-features{justify-content:center!important;margin-top:22px!important;gap:6px!important}
  #authGate .fx498-features>div{padding:8px!important;min-height:55px!important;flex:1 1 100px!important;max-width:none!important;gap:6px;border-radius:12px!important}
  #authGate .fx498-features>div i{width:26px!important;height:26px!important;flex-basis:26px;font-size:17px}
  #authGate .fx498-features strong{font-size:11px}
  #authGate .fx498-features small{font-size:9px}
  #authGate .fx498-login-card{align-self:stretch!important;justify-self:stretch!important;width:min(100%,540px)!important;margin:12px auto 10px!important;transform:none!important;padding:20px!important;border-radius:23px!important}
  #authGate .fx498-login-card .auth-mark-wrap{width:66px!important;height:66px!important;margin-bottom:12px!important}
  #authGate .fx498-login-card h2{font-size:24px!important;margin-bottom:6px}
  #authGate .fx498-login-card>p{font-size:13px!important;margin-bottom:14px!important}
  #authGate .fx498-login-card .btn{min-height:49px!important;margin-top:8px!important;font-size:13px!important}
  #authGate .fx499-login-divider{margin:7px 0 1px;font-size:11px}
  #authGate .fx498-login-card .auth-note{margin-top:12px!important;font-size:10px!important}
  #authGate .fx498-login-card .auth-legal-links{font-size:10px;margin-top:11px!important}
  #authGate .fx499-scene-selector{position:relative!important;bottom:auto!important;padding:8px 9px 20px!important;gap:1px!important;max-width:540px;justify-content:space-around!important}
  #authGate .fx499-scene-choice{min-width:53px;min-height:73px;padding:4px 4px 9px}
  #authGate .fx499-scene-choice .fx499-orb{width:31px;height:31px}
  #authGate .fx499-scene-choice .fx499-scene-label{font-size:8px}
}
@media(max-width:360px){#authGate .fx498-gateway-copy h1{font-size:35px!important}#authGate .fx498-features>div i{display:none!important}#authGate .fx498-features>div{padding:6px!important}#authGate .fx499-scene-choice{min-width:48px}}
@media(prefers-reduced-motion:reduce){#authGate *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
/* Visual QA refinements (desktop and Android/iOS viewport). */
#authGate .fx498-gateway-copy h1 em{display:block;white-space:nowrap}
#authGate .fx4981-cosmos{mask-image:radial-gradient(ellipse 72% 63% at 50% 49%,#000 42%,rgba(0,0,0,.9) 64%,transparent 100%)}
#authGate .fx498-login-card .auth-mark-wrap{display:block;position:relative}
#authGate .fx498-login-card .auth-mark-wrap img{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}
@media(max-width:760px){
  #authGate .fx498-login-card .auth-mark-wrap{width:65px!important;height:65px!important;margin:0 auto 15px!important}
  #authGate .fx498-login-card .auth-mark-wrap img{width:65px!important;height:65px!important;object-fit:contain!important}
  #authGate .fx498-gateway-copy h1 em{font-size:.98em}
  #authGate .fx499-scene-selector{padding-bottom:12px!important}
}
@media(max-width:760px){
 #authGate .auth-gate-main.fx498-gateway-main{padding-top:14px!important;padding-bottom:10px!important}
 #authGate .fx498-gateway-copy{padding:8px 0 7px!important}
 #authGate .fx498-features>div{min-height:50px!important}
 #authGate .fx498-login-card{margin-top:8px!important;margin-bottom:6px!important}
}
