/* Mobile splash screen (home page, once per session) */
#mobileSplash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at 50% 35%, #163a8f 0%, #0B2265 55%, #061444 100%);
  display: flex;
  flex-direction: column;
  transition: opacity .6s ease;
}
#mobileSplash[hidden] { display: none; }
#mobileSplash.fade-out { opacity: 0; pointer-events: none; }

#splashCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.msplash-inner {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 16px 0 20px;
  overflow: hidden;
}

/* Two square ads, above and below the logo, each in a grey-bordered navy frame */
.msplash-ad {
  display: block;
  box-sizing: border-box;
  align-self: center;
  width: 300px;                 /* same box as the desktop header ad (.masthead-ad) */
  max-width: calc(100% - 28px);
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid #9aa3b5;
  border-radius: 6px;
  background: #0B2265;
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
.msplash-ad img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Logo card: rounded, inset from the screen edges */
.msplash-logo {
  position: relative;
  align-self: center;
  width: calc(100% - 28px);      /* never touches the left/right screen edges */
  box-sizing: border-box;
  background: #fff;
  border-radius: 16px;
  padding: 6px 8px 8px;
  overflow: hidden;
  /* blue glow: inside the card and softly outside */
  box-shadow: inset 0 0 26px rgba(47,107,255,.35), 0 0 22px rgba(47,107,255,.5);
}
#splashLogoFx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.msplash-logo img {
  display: block;
  width: 100%;
  height: auto;
}
.msplash-logo-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 14px 0;
}
.msplash-prgi {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .4px;
  color: #0F2557;
}
.msplash-lang {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #C0001A;
}

.msplash-bar-wrap {
  align-self: center;
  width: calc(100% - 40px);
  height: 3px;
  background: rgba(255,255,255,.25);
  border-radius: 2px;
  overflow: hidden;
}
.msplash-bar {
  height: 100%;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transform-origin: left;
  animation: splashProgress 10s linear forwards;
}
@keyframes splashProgress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

.msplash-skip {
  align-self: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 20px;
  cursor: pointer;
}
.msplash-skip:active { background: rgba(255,255,255,.25); }
.msplash-skip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .msplash-bar { animation: none; }
}

/* No page scrollbar while the splash is up */
html.splash-open, html.splash-open body { overflow: hidden; }
#mobileSplash { overflow: hidden; }
