/* IG208.63 KRUH AUTH SPLASH THEME AWARE SAFE PATCH
   Scoped authenticated launch splash polish. Dark/light adaptive only. No observers, no chat/realtime/voice/E2EE hooks. */
.kruh-auth-splash{
  position:fixed !important;
  inset:-10px !important;
  width:auto !important;
  min-width:100vw !important;
  min-height:calc(100vh + 20px) !important;
  min-height:calc(100svh + 20px) !important;
  min-height:calc(100dvh + 20px) !important;
  z-index:2147483647 !important;
  display:none !important;
  place-items:center !important;
  overflow:hidden !important;
  background:#02040a !important;
  color:#fff !important;
  opacity:1 !important;
  pointer-events:auto !important;
  isolation:isolate !important;
  contain:layout paint style !important;
  transform:translate3d(0,0,0) !important;
  backface-visibility:hidden !important;
  -webkit-font-smoothing:antialiased !important;
  touch-action:none !important;
  will-change:opacity;
}

/* IG209.83: critical first-paint splash gate.
   The overlay is present in server HTML but visible only when the head bootstrap marks html as active.
   This prevents profile/home content from painting first and the splash appearing late. */
html.kruh-auth-splash-active .kruh-auth-splash{
  display:grid !important;
  opacity:1 !important;
}
.kruh-auth-splash.is-mounted{
  opacity:1 !important;
  transition:opacity .82s cubic-bezier(.16,1,.3,1) !important;
}
.kruh-auth-splash::before{
  content:"";
  position:absolute;
  inset:-22%;
  z-index:-3;
  background:
    radial-gradient(ellipse 60% 42% at 50% 50%, rgba(59,130,246,.205) 0%, rgba(37,99,235,.135) 28%, rgba(5,12,28,.99) 64%, #02040a 100%),
    linear-gradient(180deg,#02040a 0%,#08142b 50%,#02040a 100%) !important;
  transform:translate3d(0,0,0);
}
.kruh-auth-splash::after{
  content:"";
  position:absolute;
  inset:-30%;
  z-index:-2;
  background:
    radial-gradient(ellipse 28% 22% at 50% 48%, rgba(125,168,255,.18), transparent 74%),
    radial-gradient(ellipse 50% 34% at 50% 56%, rgba(37,99,235,.12), transparent 78%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(8,16,36,.52), transparent 76%);
  filter:blur(46px);
  opacity:.72;
  transform:translate3d(0,0,0) scale(1);
  animation:kruhAuthSplashAura 5.8s ease-in-out infinite alternate;
}
.kruh-auth-splash.is-leaving{
  opacity:0 !important;
  transition:opacity .92s cubic-bezier(.22,1,.36,1) !important;
  pointer-events:none !important;
}
.kruh-auth-splash__center{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
  text-align:center;
  transform:translate3d(0,-.2vh,0);
  animation:kruhAuthSplashIn .96s cubic-bezier(.16,1,.3,1) .04s both;
}
.kruh-auth-splash__logoShell{
  position:relative;
  width:92px;
  height:92px;
  border-radius:30px;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#f9fbff 0%,#dbeafe 11%,#3b82f6 43%,#2563eb 69%,#1e1b4b 100%);
  box-shadow:
    0 24px 72px rgba(37,99,235,.28),
    0 0 0 1px rgba(255,255,255,.19) inset,
    0 0 28px rgba(96,165,250,.22);
  transform:translate3d(0,0,0);
  animation:kruhAuthSplashBreath 3.8s ease-in-out .32s infinite;
  will-change:transform,box-shadow;
}
.kruh-auth-splash__logoShell::before{
  content:"";
  position:absolute;
  inset:-18px;
  border-radius:45px;
  background:radial-gradient(ellipse at center,rgba(111,171,255,.22),rgba(99,102,241,.12) 42%,transparent 73%);
  filter:blur(20px);
  opacity:.64;
  z-index:-1;
  transform:translate3d(0,0,0);
  animation:kruhAuthSplashGlow 3.8s ease-in-out .32s infinite;
}
.kruh-auth-splash__logoShell::after{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:inherit;
  background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,0) 42%);
  pointer-events:none;
}
.kruh-auth-splash__logoLetter{
  position:relative;
  z-index:1;
  font-size:52px;
  line-height:1;
  font-weight:950;
  letter-spacing:-.08em;
  color:#fff;
  text-shadow:0 12px 28px rgba(0,0,0,.40);
  transform:translate3d(-1px,-1px,0);
}
.kruh-auth-splash__wordmark{
  font-size:22px;
  font-weight:950;
  letter-spacing:.205em;
  text-transform:uppercase;
  color:#fff;
  text-shadow:0 0 18px rgba(96,165,250,.42),0 2px 14px rgba(0,0,0,.42);
  animation:kruhAuthSplashWord .92s cubic-bezier(.16,1,.3,1) .18s both;
}
.kruh-auth-splash__from{
  position:absolute;
  z-index:1;
  left:50%;
  bottom:calc(42px + env(safe-area-inset-bottom));
  transform:translate3d(-50%,0,0);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0;
  line-height:1;
  color:rgba(255,255,255,.50);
  animation:kruhAuthSplashFrom .74s cubic-bezier(.16,1,.3,1) .42s both;
}
.kruh-auth-splash__from span:first-child{display:none !important;}
.kruh-auth-splash__fromStrong{
  font-size:14px;
  font-weight:850;
  letter-spacing:.018em;
  color:rgba(255,255,255,.72);
  -webkit-text-fill-color:currentColor;
  filter:drop-shadow(0 0 12px rgba(96,165,250,.22));
}
.kruh-auth-splash__fromStrong::after{
  content:"";
  display:block;
  width:72px;
  height:1px;
  margin:10px auto 0;
  border-radius:999px;
  background:linear-gradient(90deg,transparent,rgba(96,165,250,.48),transparent);
  box-shadow:0 0 12px rgba(59,130,246,.38);
  opacity:.70;
}
html.kruh-auth-splash-active,
html.kruh-auth-splash-active body{
  overflow:hidden !important;
  background:#02040a !important;
}
html.kruh-auth-splash-active::before{
  content:"";
  position:fixed;
  inset:-12px -12px auto -12px;
  height:34px;
  z-index:2147483599;
  background:#02040a;
  pointer-events:none;
}

/* IG208.61: True splash isolation. Hide every normal app child while the splash is active,
   so floating message launchers with their own high z-index cannot appear above the overlay. */
html.kruh-auth-splash-active body > :not(.kruh-auth-splash):not(script):not(style):not(link):not(noscript){
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

html.kruh-auth-splash-active .chat-launcher,
html.kruh-auth-splash-active .chat-dock,
html.kruh-auth-splash-active [data-chat-launcher],
html.kruh-auth-splash-active [data-float-dock-btn],
html.kruh-auth-splash-active [data-chat-dock],
html.kruh-auth-splash-active .pk-float-dock-btn,
html.kruh-auth-splash-active .pk-float-dock,
html.kruh-auth-splash-active .pk-mobile-dock,
html.kruh-auth-splash-active .kruh-chat-launcher,
html.kruh-auth-splash-active .kruh-chat-dock,
html.kruh-auth-splash-active .cookie-consent,
html.kruh-auth-splash-active .cookie-banner,
html.kruh-auth-splash-active [data-cookie-banner],
html.kruh-auth-splash-active #cookie-consent,
html.kruh-auth-splash-active #cookie-banner{
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}


/* IG208.63: Theme-aware splash surface.
   Dark keeps the cinematic navy native-app look; light switches to a soft web-matched airy surface. */
html[data-theme="light"] .kruh-auth-splash,
body.theme-light .kruh-auth-splash{
  background:#f7faff !important;
  color:#1d4ed8 !important;
}
html[data-theme="light"] .kruh-auth-splash::before,
body.theme-light .kruh-auth-splash::before{
  background:
    radial-gradient(ellipse 58% 40% at 50% 50%, rgba(96,165,250,.20) 0%, rgba(147,197,253,.135) 30%, rgba(239,246,255,.94) 66%, #f8fbff 100%),
    linear-gradient(180deg,#ffffff 0%,#eef5ff 52%,#f8fbff 100%) !important;
}
html[data-theme="light"] .kruh-auth-splash::after,
body.theme-light .kruh-auth-splash::after{
  background:
    radial-gradient(ellipse 26% 20% at 50% 48%, rgba(37,99,235,.16), transparent 74%),
    radial-gradient(ellipse 52% 36% at 50% 56%, rgba(96,165,250,.16), transparent 78%),
    radial-gradient(ellipse 82% 60% at 50% 50%, rgba(219,234,254,.42), transparent 76%);
  filter:blur(48px);
  opacity:.84;
}
html[data-theme="light"] .kruh-auth-splash__logoShell,
body.theme-light .kruh-auth-splash__logoShell{
  background:linear-gradient(145deg,#ffffff 0%,#dbeafe 12%,#60a5fa 42%,#2563eb 70%,#1d4ed8 100%);
  box-shadow:
    0 24px 70px rgba(37,99,235,.22),
    0 0 0 1px rgba(255,255,255,.62) inset,
    0 0 30px rgba(96,165,250,.18);
}
html[data-theme="light"] .kruh-auth-splash__logoShell::before,
body.theme-light .kruh-auth-splash__logoShell::before{
  background:radial-gradient(ellipse at center,rgba(37,99,235,.18),rgba(96,165,250,.11) 42%,transparent 73%);
  opacity:.58;
}
html[data-theme="light"] .kruh-auth-splash__wordmark,
body.theme-light .kruh-auth-splash__wordmark{
  color:#2563eb;
  text-shadow:0 0 16px rgba(96,165,250,.18),0 2px 12px rgba(37,99,235,.10);
}
html[data-theme="light"] .kruh-auth-splash__from,
body.theme-light .kruh-auth-splash__from{
  color:rgba(30,64,175,.42);
}
html[data-theme="light"] .kruh-auth-splash__fromStrong,
body.theme-light .kruh-auth-splash__fromStrong{
  color:rgba(30,64,175,.48);
  filter:drop-shadow(0 0 10px rgba(96,165,250,.14));
}
html[data-theme="light"] .kruh-auth-splash__fromStrong::after,
body.theme-light .kruh-auth-splash__fromStrong::after{
  background:linear-gradient(90deg,transparent,rgba(59,130,246,.32),transparent);
  box-shadow:0 0 10px rgba(96,165,250,.24);
  opacity:.52;
}
html[data-theme="light"].kruh-auth-splash-active,
html[data-theme="light"].kruh-auth-splash-active body,
html.kruh-auth-splash-theme-light,
html.kruh-auth-splash-theme-light body{
  background:#f7faff !important;
}
html[data-theme="light"].kruh-auth-splash-active::before,
html.kruh-auth-splash-theme-light::before{
  background:#f7faff !important;
}
html.kruh-auth-splash-theme-dark,
html.kruh-auth-splash-theme-dark body{
  background:#02040a !important;
}


html[data-theme="light"] .kruh-auth-splash__logoShell,
body.theme-light .kruh-auth-splash__logoShell{animation:kruhAuthSplashBreathLight 3.8s ease-in-out .32s infinite;}
@keyframes kruhAuthSplashBreathLight{0%,100%{transform:translate3d(0,0,0) scale(1);box-shadow:0 24px 70px rgba(37,99,235,.22),0 0 0 1px rgba(255,255,255,.62) inset,0 0 30px rgba(96,165,250,.18);}50%{transform:translate3d(0,-1px,0) scale(1.014);box-shadow:0 27px 76px rgba(37,99,235,.26),0 0 0 1px rgba(255,255,255,.72) inset,0 0 34px rgba(96,165,250,.22);}}

@keyframes kruhAuthSplashIn{0%{opacity:0;transform:translate3d(0,8px,0) scale(.972);}100%{opacity:1;transform:translate3d(0,-.2vh,0) scale(1);}}
@keyframes kruhAuthSplashBreath{0%,100%{transform:translate3d(0,0,0) scale(1);box-shadow:0 24px 72px rgba(37,99,235,.28),0 0 0 1px rgba(255,255,255,.19) inset,0 0 28px rgba(96,165,250,.22);}50%{transform:translate3d(0,-1px,0) scale(1.014);box-shadow:0 27px 78px rgba(37,99,235,.33),0 0 0 1px rgba(255,255,255,.22) inset,0 0 34px rgba(96,165,250,.26);}}
@keyframes kruhAuthSplashGlow{0%,100%{opacity:.48;transform:translate3d(0,0,0) scale(.99);}50%{opacity:.70;transform:translate3d(0,0,0) scale(1.035);}}
@keyframes kruhAuthSplashFrom{0%{opacity:0;transform:translate3d(-50%,8px,0);}100%{opacity:1;transform:translate3d(-50%,0,0);}}
@keyframes kruhAuthSplashAura{0%{transform:translate3d(0,0,0) scale(1);opacity:.58;}100%{transform:translate3d(0,0,0) scale(1.018);opacity:.74;}}
@keyframes kruhAuthSplashWord{0%{opacity:0;transform:translate3d(0,5px,0);letter-spacing:.29em;}100%{opacity:1;transform:translate3d(0,0,0);letter-spacing:.205em;}}
@media (max-width:520px){
  .kruh-auth-splash__center{transform:translate3d(0,-.35vh,0);gap:15px}
  .kruh-auth-splash__logoShell{width:84px;height:84px;border-radius:28px}
  .kruh-auth-splash__logoLetter{font-size:46px}
  .kruh-auth-splash__wordmark{font-size:19px;letter-spacing:.185em}
  .kruh-auth-splash__from{bottom:calc(38px + env(safe-area-inset-bottom))}
  

/* IG208.63: Theme-aware splash surface.
   Dark keeps the cinematic navy native-app look; light switches to a soft web-matched airy surface. */
html[data-theme="light"] .kruh-auth-splash,
body.theme-light .kruh-auth-splash{
  background:#f7faff !important;
  color:#1d4ed8 !important;
}
html[data-theme="light"] .kruh-auth-splash::before,
body.theme-light .kruh-auth-splash::before{
  background:
    radial-gradient(ellipse 58% 40% at 50% 50%, rgba(96,165,250,.20) 0%, rgba(147,197,253,.135) 30%, rgba(239,246,255,.94) 66%, #f8fbff 100%),
    linear-gradient(180deg,#ffffff 0%,#eef5ff 52%,#f8fbff 100%) !important;
}
html[data-theme="light"] .kruh-auth-splash::after,
body.theme-light .kruh-auth-splash::after{
  background:
    radial-gradient(ellipse 26% 20% at 50% 48%, rgba(37,99,235,.16), transparent 74%),
    radial-gradient(ellipse 52% 36% at 50% 56%, rgba(96,165,250,.16), transparent 78%),
    radial-gradient(ellipse 82% 60% at 50% 50%, rgba(219,234,254,.42), transparent 76%);
  filter:blur(48px);
  opacity:.84;
}
html[data-theme="light"] .kruh-auth-splash__logoShell,
body.theme-light .kruh-auth-splash__logoShell{
  background:linear-gradient(145deg,#ffffff 0%,#dbeafe 12%,#60a5fa 42%,#2563eb 70%,#1d4ed8 100%);
  box-shadow:
    0 24px 70px rgba(37,99,235,.22),
    0 0 0 1px rgba(255,255,255,.62) inset,
    0 0 30px rgba(96,165,250,.18);
}
html[data-theme="light"] .kruh-auth-splash__logoShell::before,
body.theme-light .kruh-auth-splash__logoShell::before{
  background:radial-gradient(ellipse at center,rgba(37,99,235,.18),rgba(96,165,250,.11) 42%,transparent 73%);
  opacity:.58;
}
html[data-theme="light"] .kruh-auth-splash__wordmark,
body.theme-light .kruh-auth-splash__wordmark{
  color:#2563eb;
  text-shadow:0 0 16px rgba(96,165,250,.18),0 2px 12px rgba(37,99,235,.10);
}
html[data-theme="light"] .kruh-auth-splash__from,
body.theme-light .kruh-auth-splash__from{
  color:rgba(30,64,175,.42);
}
html[data-theme="light"] .kruh-auth-splash__fromStrong,
body.theme-light .kruh-auth-splash__fromStrong{
  color:rgba(30,64,175,.48);
  filter:drop-shadow(0 0 10px rgba(96,165,250,.14));
}
html[data-theme="light"] .kruh-auth-splash__fromStrong::after,
body.theme-light .kruh-auth-splash__fromStrong::after{
  background:linear-gradient(90deg,transparent,rgba(59,130,246,.32),transparent);
  box-shadow:0 0 10px rgba(96,165,250,.24);
  opacity:.52;
}
html[data-theme="light"].kruh-auth-splash-active,
html[data-theme="light"].kruh-auth-splash-active body,
html.kruh-auth-splash-theme-light,
html.kruh-auth-splash-theme-light body{
  background:#f7faff !important;
}
html[data-theme="light"].kruh-auth-splash-active::before,
html.kruh-auth-splash-theme-light::before{
  background:#f7faff !important;
}
html.kruh-auth-splash-theme-dark,
html.kruh-auth-splash-theme-dark body{
  background:#02040a !important;
}


html[data-theme="light"] .kruh-auth-splash__logoShell,
body.theme-light .kruh-auth-splash__logoShell{animation:kruhAuthSplashBreathLight 3.8s ease-in-out .32s infinite;}
@keyframes kruhAuthSplashBreathLight{0%,100%{transform:translate3d(0,0,0) scale(1);box-shadow:0 24px 70px rgba(37,99,235,.22),0 0 0 1px rgba(255,255,255,.62) inset,0 0 30px rgba(96,165,250,.18);}50%{transform:translate3d(0,-1px,0) scale(1.014);box-shadow:0 27px 76px rgba(37,99,235,.26),0 0 0 1px rgba(255,255,255,.72) inset,0 0 34px rgba(96,165,250,.22);}}

@keyframes kruhAuthSplashIn{0%{opacity:0;transform:translate3d(0,8px,0) scale(.972);}100%{opacity:1;transform:translate3d(0,-.2vh,0) scale(1);}}
}
@media (max-height:620px){
  .kruh-auth-splash__center{transform:translate3d(0,-.2vh,0);gap:13px}
  .kruh-auth-splash__from{bottom:calc(22px + env(safe-area-inset-bottom))}
}
@media (prefers-reduced-motion:reduce){
  .kruh-auth-splash,.kruh-auth-splash *{animation:none !important;transition:none !important}
  .kruh-auth-splash.is-mounted{opacity:1 !important}
  .kruh-auth-splash__center,.kruh-auth-splash__from{opacity:1 !important;transform:translate3d(0,0,0) !important}
}


/* IG209.77 STARTUP FLOW HARD GUARD
   Keep the normal app paintable whenever a stale/cached script still toggles the old active class. */
html.kruh-auth-splash-active body > :not(.kruh-auth-splash):not(script):not(style):not(link):not(noscript){
  opacity:1 !important;
  visibility:visible !important;
}

/* IG209.79: splash session restore marker; KRUH intro remains overlay-only and app stays paintable behind it. */

/* IG209.80: JS minified syntax fix; splash CSS unchanged, overlay remains app-paint-behind safe. */
