/* Schutz der Ingest-Station (web/gate.js): ohne Anmeldung nur das mjOS-Zeichen und drei Punkte. Eigene Farben, damit die
   Sperre auf jeder Seite gleich aussieht (auch auf /edit ohne tokens.css). Hell auf den hellen Seiten (Handy, Desktop: dort
   gibt es --surface aus desk-tokens.css), sonst dunkel wie bisher (TV, klassische Oberfläche, /edit). */
html.locked, html.locked body { background: var(--surface, #070C16); overflow: hidden; }
html.locked body > :not(#gate):not(#toast) { display: none !important; }

#gate { display: none; }
html.locked #gate {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
  background: var(--surface, #070C16); color: var(--ink, #D5DEEA); font-family: system-ui, -apple-system, sans-serif;
  /* die Code-Kacheln aus login.css: hell in den Zustandsfarben, dunkel in den Farben des Zeichens */
  --mj-surface-2: var(--ground, #101A2A); --mj-surface-3: var(--line, #18263A); --mj-text: var(--ink, #D5DEEA);
  --mj-text-3: var(--ink-3, #7F8DA3); --mj-accent: var(--blue, #86DBFF);
}

.gate-mark { width: 112px; height: 112px; overflow: visible; }
.gate-more { width: 48px; height: 44px; border: none; border-radius: 22px; background: transparent; display: flex; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gate-more i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4, rgba(213, 222, 234, 0.32)); transition: background-color 160ms ease-out; }
.gate-more:hover i, .gate-more[aria-expanded="true"] i { background: var(--ink-2, rgba(213, 222, 234, 0.6)); }
.gate-more:focus-visible { outline: 2px solid var(--blue, #86DBFF); outline-offset: 2px; }
.gate-code { width: min(380px, 100%); min-height: 90px; }
.gate-code .codemsg { text-align: center; }

/* Beim Aufruf: das Feld erscheint, die rosa Scheibe wächst auf, dann der helle Punkt. */
.gate-mark .gate-tile, .gate-mark .gate-disc, .gate-mark .gate-hub { transform-box: fill-box; transform-origin: center; }
html.locked .gate-tile { animation: gate-tile 480ms cubic-bezier(.2, .8, .2, 1) both; }
html.locked .gate-disc { animation: gate-pop 520ms cubic-bezier(.2, .9, .3, 1.2) 160ms both; }
html.locked .gate-hub { animation: gate-pop 380ms cubic-bezier(.2, .9, .3, 1.3) 520ms both; }
html.locked .gate-more { animation: gate-fade 400ms ease-out 1200ms both; }
html.locked .gate-code:not([hidden]) { animation: gate-rise 240ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes gate-tile { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes gate-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gate-pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
@keyframes gate-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.locked .gate-tile, html.locked .gate-disc, html.locked .gate-hub { animation: none; }
  html.locked .gate-more, html.locked .gate-code:not([hidden]) { animation: gate-fade 200ms linear both; }
  .gate-more i { transition: none; }
}
