/* Startbildschirm (epische Fassung): sichtbar ab dem ersten Bild, mindestens 2,4 Sekunden (src/splash.ts), Antippen
   überspringt. Bild, Partikel und Farben je Gestaltung (data-look, bei Mein Rhythmus data-splash für Möhrchen) und
   Hell/Dunkel. Bei «Weniger Bewegung» steht alles still. */
#splash {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  color: var(--sp-ink);
  background: radial-gradient(120% 70% at 50% 40%, var(--sp-glow) 0%, transparent 62%), var(--sp-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#splash { --sp-glow: color-mix(in srgb, var(--sp-acc) 26%, transparent); }
#splash.is-out { opacity: 0; visibility: hidden; }
#splash.is-out .sp-stage { transform: scale(1.12); filter: blur(6px); }
#splash .sp-fx { position: absolute; inset: 0; pointer-events: none; }
#splash .sp-fx i {
  position: absolute;
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sp-acc);
  opacity: 0;
  transform: scale(var(--s, 1));
  animation: sp-twinkle var(--t, 4s) ease-in-out infinite;
}
#splash .sp-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: transform 0.6s ease, filter 0.6s ease;
}
#splash .sp-art {
  display: none;
  width: min(64vw, 300px);
  height: auto;
  color: var(--sp-acc);
  overflow: visible;
  filter: drop-shadow(0 0 28px color-mix(in srgb, var(--sp-acc) 45%, transparent));
  animation: sp-in 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#splash .sp-name {
  margin: 14px 0 0;
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  font-weight: 760;
  letter-spacing: 0.01em;
  line-height: 1.1;
  animation: sp-name 1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}
#splash .sp-line {
  margin: 0;
  font-size: clamp(0.95rem, 3.6vw, 1.1rem);
  opacity: 0.78;
  animation: sp-up 0.8s ease 0.8s both;
}
#splash .sp-line > span { display: none; }
#splash .sp-bar {
  position: relative;
  width: min(52vw, 220px);
  height: 3px;
  margin-top: 18px;
  border-radius: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--sp-ink) 14%, transparent);
  animation: sp-up 0.6s ease 0.9s both;
}
#splash .sp-bar b {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--sp-acc) 40%, transparent), var(--sp-acc));
  box-shadow: 0 0 12px var(--sp-acc);
  transform-origin: left;
  animation: sp-load 2.3s cubic-bezier(0.5, 0, 0.2, 1) 0.2s both;
}
@keyframes sp-in { 0% { opacity: 0; transform: scale(0.55) rotate(-8deg); filter: blur(10px) } 60% { opacity: 1 } 100% { opacity: 1; transform: scale(1) rotate(0); filter: blur(0) drop-shadow(0 0 28px color-mix(in srgb, var(--sp-acc) 45%, transparent)) } }
@keyframes sp-name { 0% { opacity: 0; transform: translateY(18px); letter-spacing: 0.4em } 100% { opacity: 1; transform: none; letter-spacing: 0.01em } }
@keyframes sp-up { 0% { opacity: 0; transform: translateY(10px) } 100% { opacity: 1; transform: none } }
@keyframes sp-load { 0% { transform: scaleX(0) } 70% { transform: scaleX(0.86) } 100% { transform: scaleX(1) } }
@keyframes sp-breathe { 0%, 100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.07); opacity: 0.85 } }
@keyframes sp-spin { to { transform: rotate(360deg) } }
@keyframes sp-spin-back { to { transform: rotate(-360deg) } }
@keyframes sp-twinkle { 0%, 100% { opacity: 0; transform: scale(calc(var(--s, 1) * 0.6)) } 50% { opacity: 0.9; transform: scale(var(--s, 1)) } }
@keyframes sp-flow { to { transform: translateX(-100px) } }
@keyframes sp-rise { 0% { transform: translateY(0); opacity: 0 } 15% { opacity: 1 } 100% { transform: translateY(-70px); opacity: 0 } }
@keyframes sp-drift { 0%, 100% { transform: translateX(0) skewX(0) } 50% { transform: translateX(8px) skewX(-4deg) } }
@keyframes sp-ring-out { 0% { transform: scale(0.82); opacity: 0.7 } 100% { transform: scale(1.32); opacity: 0 } }
@keyframes sp-draw { 0% { stroke-dashoffset: 100 } 55%, 100% { stroke-dashoffset: 0 } }
@keyframes sp-beat { 0% { stroke-dashoffset: 100; opacity: 1 } 50% { stroke-dashoffset: 0; opacity: 1 } 80% { stroke-dashoffset: 0; opacity: 1 } 100% { stroke-dashoffset: 0; opacity: 0 } }
@keyframes sp-bob { 0%, 100% { transform: translateY(0) rotate(-3deg) } 50% { transform: translateY(-6px) rotate(3deg) } }
@keyframes sp-sunrise { 0% { transform: translateY(40px) } 100% { transform: translateY(0) } }
@keyframes sp-ember { 0% { opacity: 0; transform: translateY(30vh) scale(var(--s, 1)) } 15% { opacity: 1 } 100% { opacity: 0; transform: translateY(-60vh) translateX(20px) scale(calc(var(--s, 1) * 0.4)) } }
@keyframes sp-bubble { 0% { opacity: 0; transform: translateY(20vh) scale(var(--s, 1)) } 20% { opacity: 0.7 } 100% { opacity: 0; transform: translateY(-40vh) scale(calc(var(--s, 1) * 1.3)) } }
@keyframes sp-heart { 0% { opacity: 0; transform: translateY(25vh) rotate(-12deg) scale(var(--s, 1)) } 15% { opacity: 1 } 50% { transform: translateY(0) translateX(14px) rotate(10deg) scale(var(--s, 1)) } 100% { opacity: 0; transform: translateY(-30vh) translateX(-8px) rotate(-8deg) scale(var(--s, 1)) } }
@keyframes sp-blip { 0%, 100% { opacity: 0 } 10%, 30% { opacity: 1 } 40% { opacity: 0.2 } }
@keyframes sp-scan { 0% { transform: translateY(-100%) } 100% { transform: translateY(100vh) } }
@keyframes sp-aurora { 0%, 100% { transform: translateX(-6%) skewX(-8deg); opacity: 0.55 } 50% { transform: translateX(6%) skewX(6deg); opacity: 0.9 } }
@keyframes sp-pop { 0% { opacity: 0; transform: scale(0.2) rotate(-25deg) } 60% { opacity: 1; transform: scale(1.12) rotate(6deg) } 80% { transform: scale(0.96) rotate(-2deg) } 100% { opacity: 1; transform: scale(1) rotate(0) } }
@keyframes sp-rays { to { transform: rotate(360deg) } }
#splash .sp-art * { transform-box: fill-box; transform-origin: center; }
#splash .sp-halo-1, #splash .sp-moon { animation: sp-breathe 3.2s ease-in-out infinite; }
#splash .sp-halo-2 { animation: sp-breathe 3.2s ease-in-out 0.6s infinite; }
#splash .sp-stars circle { animation: sp-twinkle 2.4s ease-in-out infinite; }
#splash .sp-stars circle:nth-child(2n) { animation-delay: 0.8s; }
#splash .sp-stars circle:nth-child(3n) { animation-delay: 1.5s; }
#splash .sp-wave { animation: sp-flow 2.4s linear infinite; transform-box: view-box; }
#splash .sp-wave-2 { animation-duration: 3.1s; }
#splash .sp-wave-3 { animation-duration: 3.9s; }
#splash .sp-ember { animation: sp-breathe 2.6s ease-in-out infinite; }
#splash .sp-spark { animation: sp-rise 2.2s ease-out infinite; }
#splash .sp-spark-2 { animation-delay: 0.45s; }
#splash .sp-spark-3 { animation-delay: 0.9s; }
#splash .sp-spark-4 { animation-delay: 1.35s; }
#splash .sp-spark-5 { animation-delay: 1.8s; }
#splash .sp-veil-1 { animation: sp-drift 5s ease-in-out infinite; }
#splash .sp-veil-2 { animation: sp-drift 6.5s ease-in-out 1s infinite reverse; }
#splash .sp-ring-1 { animation: sp-spin 14s linear infinite; }
#splash .sp-ring-2 { animation: sp-spin-back 6s linear infinite; }
#splash .sp-ring-4 { animation: sp-spin 2.8s linear infinite; }
#splash .sp-core { animation: sp-breathe 1.6s ease-in-out infinite; }
#splash .sp-bow { animation: sp-breathe 2.4s ease-in-out infinite; }
#splash .sp-carrot { animation: sp-bob 2.2s ease-in-out infinite; }
#splash .sp-tw { animation: sp-twinkle 1.8s ease-in-out infinite; }
#splash .sp-tw-2 { animation-delay: 0.6s; }
#splash .sp-tw-3 { animation-delay: 1.2s; }
#splash .sp-pulse { animation: sp-ring-out 1.8s ease-out infinite; }
#splash .sp-pulse-2 { animation-delay: 0.9s; }
#splash .sp-beat { stroke-dasharray: 100; animation: sp-beat 1.9s ease-in-out infinite; }
#splash .sp-enso { stroke-dasharray: 100; animation: sp-draw 2.6s cubic-bezier(0.6, 0, 0.3, 1) infinite alternate; }
#splash .sp-sun, #splash .sp-glow { animation: sp-sunrise 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
#splash .sp-moon-cut { fill: var(--sp-bg); }
#splash .sp-stop { stop-color: var(--sp-acc); }
#splash .sp-sun { fill: var(--sp-acc); }
#splash .sp-r1 { fill: var(--sp-r1, #a2b2c9); }
#splash .sp-r2 { fill: var(--sp-r2, #6f829f); }
#splash .sp-r3 { fill: var(--sp-r3, #33435f); }
#splash .sp-outline { stroke: var(--sp-ink); }
#splash .sp-fx i:nth-child(1) { left: 43%; top: 23%; animation-delay: -1.78s; --s: 0.64; --t: 7.20s; }
#splash .sp-fx i:nth-child(2) { left: 14%; top: 50%; animation-delay: -2.62s; --s: 1.42; --t: 4.47s; }
#splash .sp-fx i:nth-child(3) { left: 13%; top: 59%; animation-delay: -1.88s; --s: 0.82; --t: 5.98s; }
#splash .sp-fx i:nth-child(4) { left: 9%; top: 76%; animation-delay: -0.56s; --s: 0.80; --t: 6.32s; }
#splash .sp-fx i:nth-child(5) { left: 9%; top: 77%; animation-delay: -2.63s; --s: 0.64; --t: 4.49s; }
#splash .sp-fx i:nth-child(6) { left: 73%; top: 21%; animation-delay: -1.30s; --s: 0.73; --t: 4.03s; }
#splash .sp-fx i:nth-child(7) { left: 41%; top: 75%; animation-delay: -3.67s; --s: 0.76; --t: 6.12s; }
#splash .sp-fx i:nth-child(8) { left: 83%; top: 28%; animation-delay: -1.68s; --s: 1.09; --t: 3.78s; }
#splash .sp-fx i:nth-child(9) { left: 9%; top: 83%; animation-delay: -0.93s; --s: 1.21; --t: 5.42s; }
#splash .sp-fx i:nth-child(10) { left: 42%; top: 63%; animation-delay: -2.64s; --s: 1.01; --t: 4.85s; }
#splash .sp-fx i:nth-child(11) { left: 25%; top: 93%; animation-delay: -3.51s; --s: 0.67; --t: 4.85s; }
#splash .sp-fx i:nth-child(12) { left: 65%; top: 47%; animation-delay: -3.28s; --s: 0.86; --t: 7.91s; }
#splash .sp-fx i:nth-child(13) { left: 17%; top: 69%; animation-delay: -1.88s; --s: 1.28; --t: 4.18s; }
#splash .sp-fx i:nth-child(14) { left: 64%; top: 57%; animation-delay: -0.18s; --s: 1.20; --t: 6.94s; }
#splash .sp-fx i:nth-child(15) { left: 75%; top: 44%; animation-delay: -1.53s; --s: 0.92; --t: 5.74s; }
#splash .sp-fx i:nth-child(16) { left: 60%; top: 12%; animation-delay: -3.78s; --s: 1.45; --t: 5.63s; }
#splash .sp-fx i:nth-child(17) { left: 87%; top: 12%; animation-delay: -0.27s; --s: 1.23; --t: 6.41s; }
#splash .sp-fx i:nth-child(18) { left: 89%; top: 61%; animation-delay: -1.28s; --s: 0.95; --t: 6.51s; }
#splash .sp-fx i:nth-child(19) { left: 4%; top: 63%; animation-delay: -1.60s; --s: 1.15; --t: 5.72s; }
#splash .sp-fx i:nth-child(20) { left: 29%; top: 40%; animation-delay: -0.58s; --s: 0.82; --t: 5.26s; }
#splash .sp-fx i:nth-child(21) { left: 65%; top: 14%; animation-delay: -0.75s; --s: 0.96; --t: 4.75s; }
#splash .sp-fx i:nth-child(22) { left: 19%; top: 59%; animation-delay: -3.89s; --s: 0.85; --t: 5.37s; }
#splash .sp-fx i:nth-child(23) { left: 47%; top: 91%; animation-delay: -3.98s; --s: 1.46; --t: 4.18s; }
#splash .sp-fx i:nth-child(24) { left: 24%; top: 23%; animation-delay: -1.04s; --s: 0.81; --t: 5.68s; }
#splash .sp-fx i:nth-child(25) { left: 77%; top: 27%; animation-delay: -1.18s; --s: 0.60; --t: 5.39s; }
#splash .sp-fx i:nth-child(26) { left: 49%; top: 82%; animation-delay: -2.55s; --s: 1.46; --t: 6.61s; }
#splash .sp-fx i:nth-child(27) { left: 67%; top: 83%; animation-delay: -2.95s; --s: 1.27; --t: 5.55s; }
#splash .sp-fx i:nth-child(28) { left: 89%; top: 75%; animation-delay: -1.77s; --s: 0.96; --t: 3.97s; }
#splash { --sp-bg: #04161d; --sp-ink: #e4f5f5; --sp-acc: #56e8d8; }
[data-look='aare'][data-theme='dark'] #splash { --sp-bg: #04161d; --sp-ink: #e4f5f5; --sp-acc: #56e8d8; }
[data-look='aare'][data-theme='light'] #splash { --sp-bg: #edf5f4; --sp-ink: #062a30; --sp-acc: #08756e; }
[data-look='aare'] #splash .sp-a-glut { display: none; }
[data-look='aare'] #splash .sp-a-polar { display: none; }
[data-look='aare'] #splash .sp-a-schleifchen { display: none; }
[data-look='aare'] #splash .sp-line .sp-l-glut { display: none; }
[data-look='aare'] #splash .sp-line .sp-l-polar { display: none; }
[data-look='aare'] #splash .sp-line .sp-l-schleifchen { display: none; }
[data-look='aare'] #splash .sp-a-aare { display: block; }
[data-look='aare'] #splash .sp-line .sp-l-aare { display: inline; }
[data-look='glut'][data-theme='dark'] #splash { --sp-bg: #170c12; --sp-ink: #fff2ea; --sp-acc: #ffbf4d; }
[data-look='glut'][data-theme='light'] #splash { --sp-bg: #fbf6f2; --sp-ink: #2a1420; --sp-acc: #c26f00; }
[data-look='glut'] #splash .sp-a-aare { display: none; }
[data-look='glut'] #splash .sp-a-polar { display: none; }
[data-look='glut'] #splash .sp-a-schleifchen { display: none; }
[data-look='glut'] #splash .sp-line .sp-l-aare { display: none; }
[data-look='glut'] #splash .sp-line .sp-l-polar { display: none; }
[data-look='glut'] #splash .sp-line .sp-l-schleifchen { display: none; }
[data-look='glut'] #splash .sp-a-glut { display: block; }
[data-look='glut'] #splash .sp-line .sp-l-glut { display: inline; }
[data-look='polar'][data-theme='dark'] #splash { --sp-bg: #090b1f; --sp-ink: #eceeff; --sp-acc: #ad97ff; }
[data-look='polar'][data-theme='light'] #splash { --sp-bg: #f2f3fa; --sp-ink: #12152e; --sp-acc: #6236d6; }
[data-look='polar'] #splash .sp-a-aare { display: none; }
[data-look='polar'] #splash .sp-a-glut { display: none; }
[data-look='polar'] #splash .sp-a-schleifchen { display: none; }
[data-look='polar'] #splash .sp-line .sp-l-aare { display: none; }
[data-look='polar'] #splash .sp-line .sp-l-glut { display: none; }
[data-look='polar'] #splash .sp-line .sp-l-schleifchen { display: none; }
[data-look='polar'] #splash .sp-a-polar { display: block; }
[data-look='polar'] #splash .sp-line .sp-l-polar { display: inline; }
[data-look='schleifchen'][data-theme='dark'] #splash { --sp-bg: #1d0f18; --sp-ink: #fdeaf3; --sp-acc: #ff7ab8; }
[data-look='schleifchen'][data-theme='light'] #splash { --sp-bg: #fdf0f5; --sp-ink: #3b1830; --sp-acc: #d6337f; }
[data-look='schleifchen'] #splash .sp-a-aare { display: none; }
[data-look='schleifchen'] #splash .sp-a-glut { display: none; }
[data-look='schleifchen'] #splash .sp-a-polar { display: none; }
[data-look='schleifchen'] #splash .sp-line .sp-l-aare { display: none; }
[data-look='schleifchen'] #splash .sp-line .sp-l-glut { display: none; }
[data-look='schleifchen'] #splash .sp-line .sp-l-polar { display: none; }
[data-look='schleifchen'] #splash .sp-a-schleifchen { display: block; }
[data-look='schleifchen'] #splash .sp-line .sp-l-schleifchen { display: inline; }
#splash.fx-girly { background: radial-gradient(90% 60% at 50% 38%, color-mix(in srgb, var(--sp-acc) 30%, transparent) 0%, transparent 65%), radial-gradient(60% 40% at 15% 90%, color-mix(in srgb, #ffc2dc 45%, transparent), transparent 70%), radial-gradient(60% 40% at 90% 10%, color-mix(in srgb, #e6c2ff 45%, transparent), transparent 70%), var(--sp-bg); font-family: ui-rounded, 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', -apple-system, sans-serif; }
#splash.fx-girly .sp-fx i { width: 18px; height: 16px; border-radius: 0; background: linear-gradient(135deg, #ff9ac9, var(--sp-acc)); clip-path: path('M9 16 C3 11 0 8 0 4.6 C0 2 2 0 4.6 0 C6.5 0 8 1 9 2.6 C10 1 11.5 0 13.4 0 C16 0 18 2 18 4.6 C18 8 15 11 9 16 Z'); animation-name: sp-heart; animation-timing-function: ease-in-out; }
#splash.fx-girly .sp-fx i:nth-child(3n) { width: 12px; height: 12px; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); background: #fff6b8; animation-name: sp-twinkle; }
#splash.fx-girly .sp-art { animation: sp-pop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) both; filter: drop-shadow(0 6px 22px color-mix(in srgb, var(--sp-acc) 55%, transparent)); }
#splash.fx-girly .sp-name { font-weight: 800; background: linear-gradient(90deg, var(--sp-acc), #ff9ac9, #c58bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
#splash.fx-girly .sp-bar b { background: linear-gradient(90deg, #ff9ac9, var(--sp-acc), #c58bff); box-shadow: 0 0 14px #ff9ac9; }
#splash.fx-glut .sp-fx i { width: 5px; height: 5px; background: radial-gradient(circle, #fff3c4, var(--sp-acc) 45%, #ff5a3c); box-shadow: 0 0 10px #ff7a2e; animation-name: sp-ember; animation-timing-function: ease-out; }
#splash.fx-glut::after { content: ''; position: absolute; left: -20%; right: -20%; bottom: -30vh; height: 60vh; background: radial-gradient(50% 50% at 50% 100%, color-mix(in srgb, #ff5a3c 40%, transparent), transparent 70%); animation: sp-breathe 3s ease-in-out infinite; pointer-events: none; }
#splash.fx-polar::before { content: ''; position: absolute; left: -20%; right: -20%; top: -10vh; height: 70vh; background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, #5fe0c0 34%, transparent) 40%, color-mix(in srgb, var(--sp-acc) 30%, transparent) 65%, transparent 100%); filter: blur(30px); animation: sp-aurora 7s ease-in-out infinite; pointer-events: none; }
#splash.fx-wasser .sp-fx i { width: 9px; height: 9px; background: none; border: 1.5px solid var(--sp-acc); animation-name: sp-bubble; animation-timing-function: ease-out; }
#splash.fx-wasser::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: -6vh; height: 26vh; background: radial-gradient(60% 100% at 50% 100%, color-mix(in srgb, var(--sp-acc) 30%, transparent), transparent 70%); }
@media (prefers-reduced-motion: reduce) {
  #splash, #splash *, #splash::before, #splash::after { animation: none !important; transition: none !important; }
  #splash .sp-fx { display: none; }
  #splash .sp-beat, #splash .sp-enso { stroke-dashoffset: 0; }
}
[data-motion='reduce'] #splash, [data-motion='reduce'] #splash *, [data-motion='reduce'] #splash::before, [data-motion='reduce'] #splash::after { animation: none !important; transition: none !important; }
[data-motion='reduce'] #splash .sp-fx { display: none; }
[data-motion='reduce'] #splash .sp-beat, [data-motion='reduce'] #splash .sp-enso { stroke-dashoffset: 0; }
