.php-preview-loading, .php-preview-error { display: none; }
[data-preview-state] #php-home-root { position: absolute; inset: 0 0 auto; visibility: hidden; }
[data-preview-state="loading"] .php-preview-loading,
[data-preview-state="failed"] .php-preview-error {
  display: flex; min-height: 100vh; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; background: #f5f8fb; color: #041b58; text-align: center;
}
.php-preview-error { flex-direction: column; }
.php-preview-error a { text-decoration: underline; }
[data-preview-state="loading"] .php-preview-loading {
  flex-direction: column;
  background: #071741;
  color: #fff;
  font-family: var(--bpk-ui-font-body, system-ui, sans-serif);
  font-weight: 600;
}
.php-ink-magic {
  position: relative;
  width: 108px;
  height: 90px;
  --ink: #67dbd3;
  --spark: #ffd86b;
}
.php-ink-magic > span { position: absolute; display: block; }
.php-ink-drop {
  top: 41px;
  left: 47px;
  width: 14px;
  height: 17px;
  border-radius: 53% 48% 52% 48%;
  background: var(--ink);
  opacity: 0;
  animation: php-ink-fall .34s ease-in both;
}
.php-ink-blot {
  top: 28px;
  left: 26px;
  width: 58px;
  height: 46px;
  background:
    radial-gradient(ellipse at 43% 52%, var(--ink) 0 32%, transparent 34%),
    radial-gradient(ellipse at 25% 46%, var(--ink) 0 16%, transparent 18%),
    radial-gradient(ellipse at 77% 40%, var(--ink) 0 14%, transparent 16%),
    radial-gradient(ellipse at 68% 73%, var(--ink) 0 14%, transparent 16%),
    radial-gradient(ellipse at 38% 22%, var(--ink) 0 9%, transparent 11%),
    radial-gradient(ellipse at 14% 87%, var(--ink) 0 5%, transparent 7%);
  animation: php-ink-spread .42s .28s ease-out both;
}
.php-ink-spark {
  width: 12px;
  height: 12px;
  background: var(--spark);
  clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
  animation: php-ink-sparkle .55s .47s ease-out both;
}
.php-ink-spark-left { top: 30px; left: 12px; }
.php-ink-spark-top { top: 12px; right: 31px; width: 9px; height: 9px; animation-delay: .53s; }
.php-ink-spark-right { top: 50px; right: 10px; width: 16px; height: 16px; animation-delay: .59s; }
@keyframes php-ink-fall {
  from { opacity: 1; transform: translateY(-34px) scale(.85, 1.1); }
  83% { opacity: 1; }
  to { opacity: 0; transform: translateY(2px) scale(1.22, .65); }
}
@keyframes php-ink-spread {
  from { opacity: 0; transform: scale(.18, .31); }
  60% { opacity: 1; transform: scale(1.13, .93); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes php-ink-sparkle {
  from { opacity: 0; transform: scale(.1) rotate(-25deg); }
  48% { opacity: 1; transform: scale(1.22) rotate(12deg); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .php-ink-magic > span { animation: none; } }
