/* mjOS · Bridge — Shell: Kopf, Verbindungs-Pille, Navigation (G-1 bis G-9). */
* { box-sizing: border-box; }
/* Was hidden trägt, ist weg – auch wenn eine Klasse display setzt (.finanzen, .import, #fd-cards, .ch-action standen sonst
   auf jeder Ansicht bzw. trotz hidden da). Wie .ka-sheet [hidden] und .pe-sheet [hidden], nur für die ganze Handy-App. */
[hidden] { display: none !important; }
html { color-scheme: light; }                        /* helle Scrollleisten und Formularelemente (der TV hat eigene, dunkle Tokens) */
html, body { margin: 0; background: var(--void); color: var(--text); }
body { font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* G-8 Fokus, G-9 Druck-Rückmeldung */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:where(summary, select, input, textarea, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }   /* auch ohne eigene Regel sichtbar */
/* Berührfläche 44 px für kleine Textlinks in Kopfzeilen (G-8), ohne die Zeile höher zu machen */
.he-list-head a, .sy-pe-head a, .pe-all { position: relative; }
.he-list-head a::after, .sy-pe-head a::after, .pe-all::after { content: ""; position: absolute; inset: -14px -8px; }
.press { transition: transform var(--dur-fast) var(--ease-out); }
.press:active { transform: scale(.96); }
/* Ansicht wechseln: die neue Ansicht blendet kurz ein (nur Deckkraft – ein transform würde die festen Leisten darin
   verschieben). Läuft nur, wenn eine andere Ansicht kommt; dieselbe Ansicht mit neuem Inhalt bleibt ruhig. */
main > section:not([hidden]) { animation: mj-view-in var(--dur) var(--ease-out); }
@keyframes mj-view-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .press { transition: none; } .press:active { transform: none; } main > section { animation: none; } }

/* G-1: mobil zuerst, ab 360 px ohne seitliches Scrollen, Safe-Area oben und unten */
.app { --head-h: 64px; min-height: 100dvh; max-width: 480px; margin: 0 auto; background: var(--hull); position: relative; }
.screen { padding: calc(var(--head-h) + 16px + env(safe-area-inset-top)) var(--gutter) calc(84px + env(safe-area-inset-bottom) + 44px);   /* + der Chat-Kreis über der Leiste */
  display: flex; flex-direction: column; gap: 16px; }
html { scroll-padding-top: calc(64px + env(safe-area-inset-top)); }     /* Fokus und Sprungziele nicht unter dem Kopf */

/* G-2 Kopf: auf jeder Ansicht oben fixiert, mjOS und die Verbindungs-Pille (Zuhause/Unterwegs); gesperrt verschwindet er
   mit der ganzen Seite (gate.css), es bleibt nur das Zeichen der Sperre. */
.head { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 20; width: 100%; max-width: 480px;
  height: calc(var(--head-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) var(--gutter) 0;
  display: flex; align-items: center; gap: 10px; background: var(--surface); border-bottom: 1px solid var(--line-1); }
.head .mark { flex: none; }
.wordmark { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.wordmark b { font-weight: inherit; color: var(--accent); }
.grow { flex: 1; }

/* G-3 Verbindungs-Pille */
.pill { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: var(--radius-pill);
  border: none; background: var(--ground); font-family: var(--font-sans); font-size: var(--text-small); font-weight: 500; color: var(--ink-2); }
.pill i { width: 7px; height: 7px; border-radius: 4px; background: var(--muted-2); flex: none; }
.pill[data-mode="home"] i { background: var(--voice-iris); }
.pill[data-mode="remote"] i { background: var(--accent); }
.pill[data-mode="vpn"] i { background: var(--voice-zora, var(--accent)); }
.pill[data-mode="search-only"] i { background: none; border: 1.5px solid var(--muted-2); }

/* G-7 Eyebrow, Titel */
.eyebrow { font-family: var(--font-sans); font-size: var(--text-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
h1 { margin: 0; font-family: var(--font-sans); font-weight: 600; font-size: var(--text-title); line-height: 1.15; letter-spacing: -.015em; color: var(--ink);
  overflow-wrap: break-word; hyphens: auto; }   /* lange deutsche Wörter (Personenregister) trennen statt überlaufen */
.note { margin: 0; font-size: 14px; color: var(--muted); }
.card { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); padding: 14px; box-shadow: var(--shadow-card); }

/* G-4 Leiste: fünf Plätze Heute · Feed · Chat · Kalender · Prüfen, 84 px inklusive Safe-Area. Chat ist ein 60-px-Kreis in der
   Mitte, der sich 30 px über die Leiste hebt (aktiv schwarz, sonst blau); Prüfen trägt die Zahl der offenen Fragen. */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 10; width: 100%; max-width: 480px;
  height: calc(84px + env(safe-area-inset-bottom)); padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: var(--nav); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nav[hidden] { display: none; }
.nav a { position: relative; min-height: var(--touch); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; color: var(--ink-3); font-size: var(--text-micro); font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav .nav-icon { position: relative; display: flex; }
.nav-badge { position: absolute; top: -9px; left: 15px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--amber-text); color: var(--surface); border: 2px solid var(--surface); box-sizing: content-box;
  font: 600 10px/18px var(--font-sans); text-align: center; }
.nav-badge[hidden] { display: none; }
.nav a.nav-chat { justify-content: flex-end; padding-bottom: 6px; color: var(--blue); }
.nav a.nav-chat[aria-current="page"] { color: var(--ink); }
.nav-ring { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); width: 60px; height: 60px; border-radius: 50%;
  background: var(--blue); color: var(--surface); display: flex; align-items: center; justify-content: center;
  border: 4px solid var(--surface); box-shadow: var(--shadow-pop); }
.nav a.nav-chat:hover .nav-ring { background: var(--blue-strong); }
.nav a.nav-chat[aria-current="page"] .nav-ring { background: var(--ink); }
.nav-ring svg { width: 24px; height: 24px; stroke-width: 2; }
.nav a:focus-visible { outline-offset: -2px; }

/* Neue Version (web/update.js, data-ui="bridge"): knapp oben, ein Tipp lädt neu. Gesperrt nie zu sehen (gate.css). */
#update-bar { position: fixed; left: 16px; right: 16px; top: calc(12px + env(safe-area-inset-top, 0px)); max-width: 448px; margin: 0 auto; z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border: 1px solid var(--line-hot); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text); font: 500 14px/1.3 var(--font-body); box-shadow: var(--shadow-pop); }
#update-bar .words { flex: 1; min-width: 0; }
#update-bar b { font-weight: 600; }
#update-bar .actions { display: flex; gap: 4px; }
#update-bar button { min-height: var(--touch); padding: 0 14px; border-radius: var(--r-pill); border: none; font: inherit; font-weight: 600; cursor: pointer; }
#update-bar .go { background: var(--accent); color: var(--on-accent); }
#update-bar .go:hover { background: var(--accent-hover); }
#update-bar .go:disabled { opacity: .45; cursor: default; }
#update-bar .later { background: transparent; color: var(--muted); }
