/* Outside the React root: the first screen stays stable while routes load. */
#root[data-dfan-config="pending"] { visibility: hidden; }
.dfan-splash-pending { position:fixed; inset:0; z-index:2147483647; background:#10141e; }
.dfan-splash {
  position: fixed; inset: 0; z-index: 2147483647;
  overflow: hidden; isolation: isolate; background: #10141e; color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  opacity: 1; transition: opacity var(--splash-out, 700ms) cubic-bezier(.4, 0, .2, 1);
  will-change: opacity;
  touch-action: none; overscroll-behavior: none;
}
.dfan-splash__scene {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity var(--splash-in, 350ms) ease-out;
}
.dfan-splash[data-phase="visible"] .dfan-splash__scene,
.dfan-splash[data-phase="leaving"] .dfan-splash__scene { opacity: 1; }
.dfan-splash[data-phase="visible"] .dfan-splash__content,
.dfan-splash[data-phase="leaving"] .dfan-splash__content { opacity: 1; }
.dfan-splash__image { width: 100%; height: 100%; object-fit: cover; display: block; }
.dfan-splash__scene::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,13,23,.48), transparent 32%, rgba(9,13,23,.18) 48%, rgba(9,13,23,.9) 100%);
}
.dfan-splash__content {
  opacity: 0; transition: opacity var(--splash-in, 350ms) ease-out;
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: max(40px, env(safe-area-inset-top)) 30px max(42px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}
.dfan-splash__brand { font-size: 26px; font-weight: 850; letter-spacing: .12em; }
.dfan-splash__brand::after { content: ""; display: block; width: 24px; height: 3px; background: #ff7600; margin-top: 12px; }
.dfan-splash__message { margin-top: auto; padding-top: 24px; }
.dfan-splash__title { margin: 0; font-size: clamp(26px, 7.5vw, 38px); line-height: 1.38; font-weight: 750; letter-spacing: -.045em; white-space: pre-line; word-break: keep-all; }
.dfan-splash__subtitle { margin: 18px 0 0; font-size: 14px; line-height: 1.7; letter-spacing: -.015em; color: #eedbc7; white-space:pre-line; overflow-wrap:anywhere; }
.dfan-splash[data-phase="leaving"] { opacity: 0; }
/* Opacity preserves layout, scroll position and fixed-position descendants. */
#root[data-dfan-launch="covered"] { opacity: 0; }
#root[data-dfan-launch="revealing"] {
  opacity: 1;
  transition: opacity var(--dfan-launch-out, 700ms) cubic-bezier(.4, 0, .2, 1);
  will-change: opacity;
}
@media (min-aspect-ratio: 1/1) {
  .dfan-splash__content { padding: max(24px, env(safe-area-inset-top)) 7vw max(24px, env(safe-area-inset-bottom)); }
  .dfan-splash__scene::after { background: linear-gradient(90deg, rgba(9,13,23,.88), rgba(9,13,23,.4) 50%, transparent); }
  .dfan-splash__title { font-size: clamp(24px, 4vw, 40px); }
  .dfan-splash__subtitle { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .dfan-splash, .dfan-splash__scene, .dfan-splash__content,
  #root[data-dfan-launch="revealing"] { transition: none; }
}
