/* mjOS · Bridge — Bewegung (bewegung.js): Logo beim Start, Platzhalter-Schimmer, Memo fliegt ab, Zeittunnel des Black Archive.
   Alles liegt fest über der Seite und nimmt keine Klicks: nichts verschiebt das Layout. Farben aus den Tokens
   (desk-tokens.css); im offenen Black Archive werden sie dunkelrot. „Weniger Bewegung“ schaltet alles ab (unten). */

/* App-Start: das Logo, ≤ 600 ms, dann weg (bewegung.js entfernt den Knoten) */
.mj-boot { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; pointer-events: none;
           background: var(--ground); animation: mj-boot 560ms ease-out forwards; }
.mj-boot svg { width: 72px; height: 72px; animation: mj-boot-logo 560ms ease-out forwards; }
html[data-fenster="1"] .mj-boot { display: none; }                 /* als Fenster des Desktops: kein zweites Logo */
@keyframes mj-boot { 0%, 45% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes mj-boot-logo { 0% { opacity: 0; transform: scale(.86); } 40% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.04); } }

/* Platzhalter beim Laden (Feed, Board, Archiv) */
.sk { display: grid; gap: 14px; }
.sk-board { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sk-archiv { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding-top: 10px; }
.sk-block { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-card, 14px);
            border: 1px solid var(--line); background: var(--surface); min-height: 96px; }
.sk-board .sk-block { min-height: 320px; background: var(--line-soft); }
.sk-archiv .sk-block { min-height: 130px; }
.sk-line { display: block; height: 12px; width: 80%; border-radius: 6px;
           background: linear-gradient(90deg, var(--line-soft) 0%, var(--line) 50%, var(--line-soft) 100%);
           background-size: 200% 100%; animation: sk-shimmer 1.4s linear infinite; }
.sk-line.short { width: 45%; }
@keyframes sk-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (max-width: 900px) { .sk-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Memo & Senden: Abflug mit Welle, dann der Haken – über der Leiste, ohne Klicks */
.mj-send { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 1500; width: 44px; height: 44px;
           margin-left: -22px; pointer-events: none; }
.mj-send-wave { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue); opacity: 0; }
.mj-send-mark { position: absolute; inset: 8px; border-radius: 50%; background: var(--blue); }
.mj-send.is-flying .mj-send-mark { animation: mj-fly 900ms cubic-bezier(.3, .7, .4, 1) forwards; }
.mj-send.is-flying .mj-send-wave { animation: mj-wave 900ms ease-out forwards; }
.mj-send.is-arrived .mj-send-mark { background: var(--green); animation: mj-tick 900ms ease-out forwards; }
.mj-send.is-arrived .mj-send-mark::after { content: ""; position: absolute; left: 10px; top: 6px; width: 7px; height: 13px;
           border: solid var(--surface); border-width: 0 3px 3px 0; transform: rotate(45deg); }
@keyframes mj-fly { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-140px) scale(.4); opacity: 0; } }
@keyframes mj-wave { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes mj-tick { 0% { transform: scale(.5); opacity: 0; } 25% { transform: scale(1.1); opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { opacity: 0; } }

/* Black Archive: dunkelroter Zeittunnel beim Öffnen (~1 s), Ausblenden beim Schliessen */
.mj-vortex { position: fixed; inset: 0; z-index: 1900; display: grid; place-items: center; overflow: hidden; pointer-events: none;
             background: radial-gradient(circle at center, #000 0%, #2A0408 55%, #7A0E14 100%); animation: mj-vortex 1000ms ease-in forwards; }
.mj-ring { position: absolute; width: 40vmax; height: 40vmax; border-radius: 50%; border: 6px solid #B0222A;
           border-top-color: transparent; border-left-color: #F0565C; animation: mj-spin 1000ms ease-in forwards; }
.mj-ring.r1 { width: 28vmax; height: 28vmax; animation-delay: -120ms; border-color: #7A0E14 transparent #F0565C transparent; }
.mj-ring.r2 { width: 18vmax; height: 18vmax; animation-delay: -240ms; }
.mj-ring.r3 { width: 9vmax; height: 9vmax; animation-delay: -360ms; border-color: #F0565C transparent #B0222A transparent; }
@keyframes mj-vortex { 0% { opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mj-spin { 0% { transform: rotate(0) scale(1.6); } 100% { transform: rotate(540deg) scale(.05); } }
html.mj-fading body { transition: opacity 280ms ease-in; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .mj-boot, .mj-send, .mj-vortex { display: none; }
  .sk-line { animation: none; background: var(--line-soft); }
  html.mj-fading body { transition: none; opacity: 1; }
}

/* Das Tor (bewegung.js stargate): Daniel rechnet. Der Glyphenring dreht sich, die neun Chevrons rasten nacheinander ein
   (je 0,7 s, dann von vorn). Farben aus den Tokens. */
.mj-gate { display: block; color: var(--blue, #4a6cf7); flex: none; }
.mj-gate-outer { fill: none; stroke: currentColor; stroke-width: 5; opacity: .45; }
.mj-gate-inner { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: .5; }
.mj-gate-tick { stroke: currentColor; stroke-width: 1; opacity: .35; }
.mj-gate-glyph { stroke: currentColor; stroke-width: 2.2; opacity: .7; }
.mj-gate-horizon { fill: currentColor; opacity: .08; animation: mj-gate-horizon 2.4s ease-in-out infinite; }
.mj-gate-ring { transform-origin: 50px 50px; transform-box: view-box; animation: mj-gate-spin 9s linear infinite; }
.mj-gate-chevron path { fill: currentColor; opacity: .25; animation: mj-gate-lock 6.3s steps(1, end) infinite; }
.mj-gate-chevron.c1 path { animation-delay: .7s; } .mj-gate-chevron.c2 path { animation-delay: 1.4s; }
.mj-gate-chevron.c3 path { animation-delay: 2.1s; } .mj-gate-chevron.c4 path { animation-delay: 2.8s; }
.mj-gate-chevron.c5 path { animation-delay: 3.5s; } .mj-gate-chevron.c6 path { animation-delay: 4.2s; }
.mj-gate-chevron.c7 path { animation-delay: 4.9s; } .mj-gate-chevron.c8 path { animation-delay: 5.6s; }
@keyframes mj-gate-spin { to { transform: rotate(360deg); } }
@keyframes mj-gate-lock { 0% { opacity: 1; } 11% { opacity: .25; } 100% { opacity: .25; } }
@keyframes mj-gate-horizon { 0%, 100% { opacity: .06; } 50% { opacity: .22; } }
@media (prefers-reduced-motion: reduce) {
  .mj-gate-ring, .mj-gate-horizon, .mj-gate-chevron path { animation: none; }
  .mj-gate-chevron path { opacity: .8; }
}
