.startup-splash {
  --start-surface: #f8f5ef;
  --start-ink: #292331;
  --start-muted: #66596c;
  --start-card: #fffafa;
  --start-line: #ded1e4;
  --start-purple: #7254a3;
  --start-gold: #b68a48;
  --start-mesh: #ecddeb;
  --start-ambient: #e1ccef;
  --start-brand: var(--start-purple);
  --start-highlight: var(--start-gold);
  color-scheme: light;
}

:root[data-theme="dark"] .startup-splash:not([data-preview-theme]),
.startup-splash[data-preview-theme="dark"] {
  --start-surface: #100e16; --start-ink: #f5f1ea; --start-muted: #bcb0c4; --start-card: #242031;
  --start-line: #4e3b57; --start-purple: #a78bfa; --start-gold: #d9b780;
  --start-mesh: #251b32; --start-ambient: #765082;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .startup-splash:not([data-preview-theme]) {
    --start-surface: #100e16; --start-ink: #f5f1ea; --start-muted: #bcb0c4; --start-card: #242031;
    --start-line: #4e3b57; --start-purple: #a78bfa; --start-gold: #d9b780;
    --start-mesh: #251b32; --start-ambient: #765082;
    color-scheme: dark;
  }
}

.startup-splash {
  position: fixed; inset: 0; z-index: 100; isolation: isolate;
  display: grid; place-items: center; box-sizing: border-box;
  padding: clamp(14px, 5vw, 48px); overflow: auto;
  color: var(--start-ink); font-family: "Segoe UI", "Noto Sans Devanagari", system-ui, sans-serif;
  background:
    radial-gradient(ellipse at 78% 29%, color-mix(in srgb, var(--start-ambient) 44%, transparent), transparent 50%),
    radial-gradient(ellipse at 21% 83%, color-mix(in srgb, var(--start-mesh) 80%, transparent), transparent 44%),
    var(--start-surface);
  transition: opacity 220ms ease;
}
.startup-splash[data-phase="leaving"] { opacity: 0; pointer-events: none; }
.startup-splash[data-phase="leaving"] .startup-panel { transform: translateY(-7px) scale(1.025); }
.startup-splash [hidden], .startup-splash[hidden] { display: none !important; }
.startup-panel {
  position: relative; z-index: 1; box-sizing: border-box;
  display: grid; justify-items: center; text-align: center;
  width: min(100%, 440px); padding: clamp(26px, 5.5vw, 45px) clamp(18px, 5vw, 42px) 27px;
  border-radius: 30px; border: 1px solid var(--start-line);
  background: linear-gradient(150deg, color-mix(in srgb, var(--start-card) 94%, transparent), color-mix(in srgb, var(--start-card) 64%, transparent));
  box-shadow: 0 26px 75px color-mix(in srgb, var(--start-ink) 13%, transparent);
  backdrop-filter: blur(14px); transition: transform 220ms ease;
}
.startup-ambient {
  position: absolute; inset: 12% 13%; pointer-events: none;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--start-brand) 16%, transparent), transparent 62%);
  opacity: .68; animation: startup-glow 5s ease-in-out infinite alternate;
}
.startup-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.startup-particles i {
  position: absolute; left: var(--x); top: var(--y); width: var(--size, 4px); aspect-ratio: 1; border-radius: 50%;
  background: var(--start-highlight); opacity: .48; animation: startup-drift 7s ease-in-out var(--delay) infinite alternate;
}
.startup-particles i:nth-child(1) { --x: 12%; --y: 28%; --delay: -2s; }
.startup-particles i:nth-child(2) { --x: 23%; --y: 72%; --delay: -5s; --size: 3px; }
.startup-particles i:nth-child(3) { --x: 78%; --y: 19%; --delay: -3s; --size: 5px; }
.startup-particles i:nth-child(4) { --x: 87%; --y: 56%; --delay: -1s; }
.startup-particles i:nth-child(5) { --x: 73%; --y: 80%; --delay: -4s; --size: 3px; }
.startup-particles i:nth-child(6) { --x: 35%; --y: 15%; --delay: -6s; --size: 3px; }
.startup-orbits { display: grid; place-items: center; position: relative; width: clamp(125px, 36vw, 175px); aspect-ratio: 1; margin-bottom: 21px; }
.startup-orbits > i {
  position: absolute; inset: 1%; border-radius: 50%; border: 1px solid var(--start-line);
  border-top-color: var(--start-brand); animation: startup-spin 12s linear infinite;
}
.startup-orbits > i::after { content: ""; position: absolute; top: 9%; right: 15%; width: 6px; aspect-ratio: 1; border-radius: 50%; background: var(--start-highlight); }
.startup-orbits > i:nth-child(2) { inset: 11%; border-bottom-color: var(--start-highlight); animation-duration: 8s; animation-direction: reverse; }
.startup-orbits > i:nth-child(3) { inset: 21%; border-style: dashed; opacity: .65; animation-duration: 17s; }
.startup-logo {
  z-index: 1; display: grid; place-items: center; width: 49%; aspect-ratio: 1; border-radius: 25%;
  border: 1px solid var(--start-line); color: var(--start-purple); overflow: hidden;
  background: linear-gradient(150deg, var(--start-card), var(--start-mesh));
  box-shadow: 0 10px 27px color-mix(in srgb, var(--start-purple) 21%, transparent);
  animation: startup-float 3.3s ease-in-out infinite alternate;
}
.startup-logo svg { width: 63%; }
.startup-logo img { width: 82%; height: 82%; object-fit: contain; }
.startup-copy { max-width: 100%; animation: startup-reveal 360ms ease-out both; overflow-wrap: anywhere; }
.startup-copy h1 { margin: 0; font: 400 clamp(1.85rem, 7vw, 3rem)/1.03 Georgia, "Noto Serif Devanagari", serif; letter-spacing: -.045em; }
.startup-copy p { margin: 8px 0 0; color: var(--start-muted); font-size: .86rem; }
.startup-track { width: min(100%, 200px); height: 3px; margin-top: 22px; overflow: hidden; border-radius: 4px; background: var(--start-line); }
.startup-track i { display: block; width: 42%; height: 100%; background: linear-gradient(90deg, var(--start-brand), var(--start-highlight)); border-radius: inherit; animation: startup-sweep 1.6s ease-in-out infinite; }
.startup-status { color: var(--start-muted); margin: 11px 0 0; min-height: 1.4em; font-size: .81rem; line-height: 1.4; }
.startup-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 17px; }
.startup-actions :is(button,a), .startup-preview-controls button {
  display: inline-grid; place-items: center; min-height: 42px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--start-line, var(--border));
  color: inherit; background: var(--start-card, var(--card)); font: 600 .82rem "Segoe UI", system-ui, sans-serif; text-decoration: none; cursor: pointer;
}
.startup-actions button[data-startup-retry] { color: var(--start-surface); background: var(--start-purple); }
.startup-static-reload { margin-top: 15px; color: var(--start-purple); font-size: .82rem; }
.startup-splash[data-active] .startup-static-reload { display: none; }
.startup-preview { position: fixed; inset: 0; padding: 0; margin: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; border: 0; background: transparent; }
.startup-preview .startup-splash { padding-top: max(65px, 5vw); }
.startup-preview-controls { position: fixed; z-index: 102; top: max(10px, env(safe-area-inset-top)); right: 12px; display: flex; gap: 6px; color: var(--ink); }
.startup-preview-controls button[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: -2px; }
.startup-preview[data-theme="light"] .startup-preview-controls { --card: #fffafa; --ink: #292331; --border: #ded1e4; --accent: #7254a3; }
.startup-preview[data-theme="dark"] .startup-preview-controls { --card: #242031; --ink: #f5f1ea; --border: #4e3b57; --accent: #a78bfa; }

@keyframes startup-spin { to { transform: rotate(1turn); } }
@keyframes startup-float { to { transform: translateY(-5px); } }
@keyframes startup-glow { to { transform: scale(1.1); opacity: .89; } }
@keyframes startup-drift { to { transform: translate(10px, -13px); opacity: .78; } }
@keyframes startup-sweep { from { transform: translateX(-105%); } to { transform: translateX(250%); } }
@keyframes startup-reveal { from { opacity: .65; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .startup-splash, .startup-splash * { animation: none !important; transition: none !important; }
  .startup-track i { width: 100%; opacity: .65; }
}
.startup-splash[data-motion-off], .startup-splash[data-motion-off] * { animation: none !important; transition: none !important; }
