/* Begehbares Universum (website/quelle/universum/universum.js). Der Himmel ist immer Nacht: Werte der Dunkel-Palette
   aus app/src/theme/tokens.ts, in Hell- und Dunkelmodus gleich. Entwurfswerte ohne Token wie in der App markiert. */
.universum {
  --u-text: #F2EAE4; --u-muted: #A89A90; --u-line: #382E28; --u-brand: #F0885F; --u-outline: #7E6E60;
  --u-ja: #F0885F; --u-nein: #9DB8D0; /* Antwortfarben dunkel (Entscheidung 5.57: Ergebnisbalken in Antwortfarben) */
  --u-leer: rgba(229, 223, 214, .28); /* randLeer #E5DFD6 mit Deckkraft 0,28 */
  --u-wahl: #F0885F1F; --u-kontur: #F0885F66; /* Entwurf: --brand mit 0x1F bzw. 0x66 (yo-zeit-und-sternen 1a) */
  --u-grund: #0C0908; /* Entwurf: Rand des Himmels (yo-universum.html) */
  position: relative; background: var(--u-grund); color: var(--u-text); overflow: hidden;
  height: min(82svh, 720px); min-height: 520px;
}
@supports not (height: 1svh) { .universum { height: min(82vh, 720px); } }
.u-buehne { position: absolute; inset: 0; outline: none; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.u-im-universum .u-buehne { touch-action: none; }
.u-buehne:focus-visible { box-shadow: inset 0 0 0 2px var(--u-brand); }
.u-buehne canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.u-buehne.u-zeiger canvas { cursor: pointer; }
.u-buehne canvas:active { cursor: grabbing; }
.universum noscript svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.u-ziele { position: absolute; inset: 0; pointer-events: none; }
.u-ziel { position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent;
          pointer-events: none; color: transparent; padding: 0; }
.u-ziel:focus-visible { outline: 2px solid var(--u-brand); outline-offset: 0; }
.u-vorschau { position: absolute; left: 0; top: 0; max-width: 260px; margin: 0; text-align: center; overflow-wrap: break-word; hyphens: manual;
              padding: 6px 10px; border-radius: 12px; background: rgba(16, 13, 11, .72); /* ENTWURFSWERT OHNE TOKEN: Grund #100D0B (bgDeep) zu 72 %, damit Sterne den Text nicht stören */ font-size: 14px; font-weight: 600; line-height: 1.3;
              color: var(--u-text); pointer-events: none; text-shadow: 0 0 6px #100D0B, 0 0 2px #100D0B; }

.u-leiste { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 12px 16px;
            pointer-events: none; }
.u-leiste > * { pointer-events: auto; }
.u-zurueck { min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--u-outline); background: rgba(16, 13, 11, .55);
             color: var(--u-text); font: 600 14px/1.3 Inter, -apple-system, 'Segoe UI', sans-serif; cursor: pointer; }
.u-zurueck::before { content: '‹'; margin-right: 6px; font-size: 18px; line-height: 1; }
[dir="rtl"] .u-zurueck::before { content: '›'; }
.u-zurueck:hover { border-color: var(--u-text); }
.u-titel { flex: 1; text-align: center; font-size: 14px; font-weight: 600; color: var(--u-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
           pointer-events: none; padding-right: 44px; }
.u-umgebung { position: absolute; top: 12px; right: 16px; pointer-events: none; font-size: 11px; color: var(--u-muted); border: 1px solid var(--u-line); border-radius: 999px; padding: 2px 8px; }
.u-umgebung.u-test { color: var(--u-text); border-color: var(--u-brand); max-width: calc(100% - 32px); } /* Testvorschau deutlich gekennzeichnet */
.u-im-universum .u-umgebung.u-test { top: 68px; bottom: auto; }
.u-ergebnis-offen .u-umgebung.u-test { top: 12px; }
.u-im-universum .u-umgebung { top: auto; bottom: 64px; }

.u-fuss { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px;
          pointer-events: none; }
.u-im-universum .u-fuss { right: 120px; align-items: flex-start; }
.u-hinweis { text-align: center; color: var(--u-muted); font-size: 13px; line-height: 1.4; margin: 0; max-width: 36em; }
.u-hinweis[hidden] { display: none; }
.u-im-universum .u-hinweis { text-align: left; }
/* Legende der Antwortzahlen im Fragenhimmel: dieselbe Markierung wie am Stern (heller Kern, feiner Ring) */
.u-legende { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; max-width: 36em; }
.u-legende[hidden] { display: none; }
.u-legende-text { margin: 0; font-size: 13px; line-height: 1.4; color: var(--u-text); }
.u-legende:not(.u-fehler) .u-legende-text::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 9px 1px 3px; border-radius: 50%;
  background: #FFF4E8; box-shadow: 0 0 0 2.5px var(--u-grund), 0 0 0 3.5px rgba(255, 244, 232, .6); vertical-align: middle; } /* D.star wie im Himmel */
.u-legende-knopf { pointer-events: auto; }
.u-legende-knopf[hidden] { display: none; }
.u-vorschau-text { display: block; }
.u-vorschau-zahl { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--u-text); opacity: .85; }
.u-zooms { position: absolute; right: 16px; bottom: 12px; display: none; gap: 8px; }
.u-im-universum .u-zooms { display: flex; }
.u-ergebnis-offen .u-zooms, .u-ergebnis-offen .u-fuss { display: none; }
.u-zoom { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--u-outline); background: rgba(16, 13, 11, .55); color: var(--u-text);
          font: 400 22px/1 Inter, -apple-system, sans-serif; cursor: pointer; }
.u-zoom:hover { border-color: var(--u-text); }
.u-meldung { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); text-align: center; color: var(--u-text); font-size: 15px; }
.u-meldung p { margin: 0 auto 12px; max-width: 28em; }
.u-knopf { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--u-outline); background: transparent; color: var(--u-text);
           font: 600 14px/1.3 Inter, -apple-system, sans-serif; cursor: pointer; }
.u-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ergebnis: über dem leeren Himmel, wie die Frage-Stufe der App */
.u-ergebnis { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; opacity: 0; transition: opacity 360ms cubic-bezier(.22, .9, .28, 1); }
.u-ergebnis.u-da { opacity: 1; }
.u-ergebnis[hidden] { display: none; }
.u-panel { max-width: 560px; margin: 0 auto; padding: 72px 16px 32px; display: flex; flex-direction: column; gap: 16px; }
.u-panel-zurueck { align-self: flex-start; }
.u-kategorie { font-size: 13px; color: var(--u-muted); }
.u-frage { font-size: 22px; font-weight: 500; line-height: 1.35; outline: none; }
.u-frage:focus-visible { box-shadow: 0 0 0 2px var(--u-brand); border-radius: 4px; }
.u-datum { font-size: 13px; color: var(--u-muted); }
.u-haupt { display: flex; flex-direction: column; gap: 8px; }
.u-gross { display: flex; gap: 24px; }
.u-gross-zahl { flex: 1; display: flex; flex-direction: column; }
.u-display { font-size: 34px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.u-leise { font-size: 13px; color: var(--u-muted); line-height: 1.4; }
.u-leer { font-size: 16px; color: var(--u-text); }
.u-anteile { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-variant-numeric: tabular-nums; font-size: 14px; }
.u-anzahl { font-variant-numeric: tabular-nums; }
.u-balken { position: relative; height: 12px; border-radius: 8px; overflow: hidden; background: var(--u-leer); }
.u-teil { position: absolute; top: 0; bottom: 0; width: 0; transition: width 220ms cubic-bezier(.22, .9, .28, 1); }
.u-teil.u-ja { left: 0; background: var(--u-ja); }
.u-teil.u-nein { right: 0; background: var(--u-nein); }
.u-trenn { height: 1px; background: var(--u-line); border: 0; }
.u-abschnitt { display: flex; flex-direction: column; gap: 8px; }
.u-abschnitt h3 { font-size: 13px; font-weight: 400; color: var(--u-muted); }
.u-zeiten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.u-wort { min-height: 44px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--u-muted);
          font: 400 14px/1.3 Inter, -apple-system, sans-serif; cursor: pointer; padding: 0 4px; }
.u-wort[aria-checked="true"] { background: var(--u-wahl); border-color: var(--u-kontur); color: var(--u-text); font-weight: 600; }
.u-laender { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.u-laender[hidden] { display: none; }
.u-spalte { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.u-spalte label { font-size: 13px; color: var(--u-muted); }
.u-spalte select { width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--u-outline); background: #100D0B; color: var(--u-text);
                   font: 400 15px/1.3 Inter, -apple-system, sans-serif; padding: 0 10px; }
.u-block { display: flex; flex-direction: column; gap: 8px; }
.u-bereich { font-size: 13px; color: var(--u-muted); }
.u-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.u-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--u-outline); background: transparent; color: var(--u-text);
          font: 400 14px/1.3 Inter, -apple-system, sans-serif; cursor: pointer; }
.u-chip[aria-checked="true"] { background: var(--u-wahl); border: 2px solid var(--u-brand); font-weight: 600; }
.u-wort:focus-visible, .u-chip:focus-visible, .u-zoom:focus-visible, .u-zurueck:focus-visible, .u-knopf:focus-visible, .u-spalte select:focus-visible {
  outline: 2px solid var(--u-brand); outline-offset: 2px; }
.u-nur-ansehen { font-size: 13px; color: var(--u-muted); }
.universum .note { position: static; padding: 0; }
@media (prefers-reduced-motion: reduce) { .u-ergebnis, .u-teil { transition: none; } }
@media (min-width: 720px) { .universum { height: 680px; } .u-panel { padding-top: 80px; } }
.universum-note { text-align: center; color: var(--text-muted); font-size: 13px; padding: 12px 16px 0; }
.u-ergebnis-offen .u-leiste { display: none; }
.u-ergebnis-offen .u-umgebung { top: 12px; bottom: auto; }
/* Erst nach der Ankunft bedienbar: sonst trifft der Klick des Fingertipps auf den Stern ein Feld des Ergebnisses */
.u-ergebnis { pointer-events: none; }
.u-ergebnis.u-bedienbar { pointer-events: auto; }
