/* Welcome overlay: shown once per browser session (sessionStorage).
   - fixed full-screen, above content
   - CSS-only progress bar (5s linear)
   - prefers-reduced-motion: bar static, overlay still hides via JS setTimeout
   - no external assets, no CDN (DPI-safe, sprint 5.0)
*/
#welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none; /* JS sets flex only if sessionStorage flag absent */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem 1.5rem 8rem;
  text-align: center;
  color: #fff;
  background: #18181B;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#welcome-overlay.is-visible { display: flex; }
#welcome-overlay:focus { outline: none; }
#welcome-overlay .welcome-title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: .5px;
  margin: 0;
  color: #FF8A6E;
}
.welcome-lead {
  font-size: 1.5rem;
  font-weight: 600;
  color: #FF6B4A;
  margin: 0;
  max-width: 30rem;
  line-height: 1.3;
}
#welcome-overlay .welcome-sub {
  font-size: 1.25rem;
  opacity: .9;
  margin: 0;
  max-width: 28rem;
  color: #F8FAFC;
  line-height: 1.4;
}
#welcome-overlay .welcome-progress {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(20rem, 80vw);
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.15);
  overflow: hidden;
}
#welcome-overlay .welcome-progress-bar {
  height: 100%;
  width: 100%;
  background: #FF6B4A;
  animation: welcome-shrink 5s linear forwards;
}
#welcome-overlay .welcome-hint {
  font-size: 1.15rem;
  opacity: .8;
  margin: 0;
  color: #F8FAFC;
  max-width: 28rem;
  line-height: 1.4;
}
@keyframes welcome-shrink { from { width: 100%; } to { width: 0%; } }
@keyframes welcome-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
  #welcome-overlay .welcome-progress-bar { animation: none; }
  .welcome-bg-icon { animation: none; }
}


/* Decorative background icons (categories) — floating behind overlay content. */
.welcome-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.welcome-bg-icon {
  position: absolute;
  font-size: 3rem;
  opacity: 0.22;
  color: #FF6B4A;
  animation: welcome-float 6.4s ease-in-out infinite alternate;
}
.welcome-bg-icon-1 { top: 8%;  left: 6%;  font-size: 7rem; animation-duration: 7.2s; animation-delay: 0s; }
.welcome-bg-icon-2 { top: 18%; right: 8%; font-size: 5rem; animation-duration: 5.6s; animation-delay: -2s; }
.welcome-bg-icon-3 { top: 38%; left: 12%; font-size: 8rem;   animation-duration: 8s; animation-delay: -4s; }
.welcome-bg-icon-4 { top: 55%; right: 15%; font-size: 6rem;  animation-duration: 6.4s; animation-delay: -1s; }
.welcome-bg-icon-5 { bottom: 20%; left: 20%; font-size: 5.6rem; animation-duration: 7.2s; animation-delay: -3s; }
.welcome-bg-icon-6 { bottom: 12%; right: 25%; font-size: 6.4rem; animation-duration: 5.6s; animation-delay: -5s; }
.welcome-bg-icon-7 { top: 70%; left: 45%; font-size: 5.2rem; animation-duration: 6.4s; animation-delay: -2.5s; }
.welcome-bg-icon-8 { top: 30%; right: 40%; font-size: 7.2rem; animation-duration: 8s; animation-delay: -6s; }
@keyframes welcome-float {
  from { transform: translate(-40px, 40px) rotate(-6deg); }
  to   { transform: translate(40px, -40px) rotate(6deg); }
}
/* welcome-active on <html> set by welcome-init.js before DOMContentLoaded.
   Sets html background (matches overlay gradient start) and shows overlay -> no FOUC. */
html.welcome-active { background: #18181B; }
.welcome-active #welcome-overlay { display: flex; }
