/* VISINVISION Family – Eltern-Web. Mobil zuerst, Systemschrift, keine externen Quellen. */
:root {
  --bg: #f5f6f3;
  --card: #ffffff;
  --text: #252b29;
  --muted: #5f6863;
  --sep: rgba(60, 60, 67, 0.18);
  /* WCAG AA (axe color-contrast, Schritt 3): #007aff hatte mit Weiss nur 4.01:1 -> #0062cc (5.8:1 auf Weiss) */
  --accent: #215e4e; /* Marken-Gruen, 7.4:1 auf Weiss */
  --accent-bg: #215e4e;
  --accent-text: #ffffff;
  --danger: #c4001a; /* #ff3b30 hatte auf Weiss 3.54:1 (#logoutBtn) */
  --ok: #34c759;
  --ok-text: #156f2e; /* Text in Erfolgsfarbe: #34c759 als Text auf Weiss/--fill < 4.5:1 (axe color-contrast .pill.ok, Peer O3) -> 5.4:1 auf --fill */
  --warn: #ff9500;
  --indigo: #5856d6;
  /* Text in Indigo (Auszeit-Knopf, Auszeit/Schlafenszeit-Status, Schritt 4 Vollreview 01 R2): #5856d6 auf --fill ueber --card 4.9:1,
     dunkel #5e5ce6 nur 2.5:1 -> eigene Textfarbe: hell 6.6:1, dunkel 5.2:1 (tests/e2e/a11y-befunde.spec.cjs Kontrast Indigo) */
  --indigo-text: #4644b8;
  /* Konto-Chip (#who) auf --fill: Textfarben >= 4.5:1 (legacy #ff9500 hatte 1.72:1) */
  --who-muted: #545458;
  --who-super: #4644b8;
  --who-legacy: #9a4a00;
  --warn-text: #9a4a00; /* Text in Warnfarbe (#ff9500 als Text auf Weiss nur 2.2:1); Flaechen behalten --warn */
  --fill: rgba(118, 118, 128, 0.12);
  /* Paket 7 (D): Tableiste deckend statt 94 % + backdrop-filter - Hintergrund fuer axe berechenbar, Kontrast unabhaengig vom Inhalt
     darunter (tests/e2e/tableiste.spec.cjs: --who-muted 7.2:1, --accent 7.2:1) */
  --bar: #f9f9f9;
  --radius: 12px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --text: #ffffff;
    --muted: #98989f;
    --sep: rgba(84, 84, 88, 0.6);
    --accent: #6fcfac;
    --accent-bg: #2b7a64;
    --who-muted: #98989f;
    --who-super: #9d9bff;
    --who-legacy: #ff9f0a;
    --warn-text: #ff9f0a;
    --danger: #ff453a;
    --ok: #30d158;
    --ok-text: #30d158;
    --warn: #ff9f0a;
    --indigo: #5e5ce6;
    --indigo-text: #9d9bff;
    --fill: rgba(118, 118, 128, 0.24);
    --bar: #161617; /* deckend (Paket 7 D): --who-muted 6.3:1, aktiv #6fcfac 9.6:1 */
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; }
.noscript { padding: 24px; }

/* ---------- Anmeldung ---------- */
.login { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: max(48px, env(safe-area-inset-top)) 16px 32px; position: relative; }
.login-card { width: 100%; max-width: 420px; text-align: center; }
/* Sprachumschalter auf der Login-Seite: rechts oben, nicht fliessend */
.login-lang { position: absolute; top: 12px; right: 16px; }
@supports not (position: absolute) { .login-lang { justify-content: flex-end; } }
.login-logo { display: block; margin: 8px auto 16px; border-radius: 16px; }
.login h1 { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.login .group { margin-top: 28px; text-align: left; }
.login .btn { margin-top: 16px; }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 20px 8px;
  background: var(--bg);
}
.topbar h1 { font-size: 34px; font-weight: 700; letter-spacing: 0.01em; }
.topbar .title-icon { flex: none; width: 30px; height: 30px; margin: 0 10px 7px 0; fill: var(--accent, currentColor); }
.topbar .title-icon + h1 { margin-right: auto; }
.conn { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.conn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.conn.live .conn-dot { background: var(--ok); }
.conn.down .conn-dot { background: var(--warn); }
.conn-text { font-size: 13px; font-weight: 600; color: var(--warn-text); white-space: nowrap; }

main { padding: 0 16px max(calc(96px + env(safe-area-inset-bottom)), calc(var(--tabbar-h, 0px) + 24px)); max-width: 720px; margin: 0 auto; } /* 2-zeilige Tableiste (109 px) verdeckte sonst das Seitenende */

/* ---------- Gruppen / Listen (iOS-Stil) ---------- */
.section { font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); margin: 26px 16px 7px; }
.group { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.pad { padding: 0; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 11px 16px; position: relative;
  width: 100%; background: none; border: 0; text-align: left;
}
.row + .row::before, .list > * + *::before {
  content: ""; position: absolute; left: 16px; right: 0; top: 0; border-top: 0.5px solid var(--sep);
}
.list > * { position: relative; }
.row .value { color: var(--muted); text-align: right; min-width: 0; overflow-wrap: break-word; }
.row.field span:first-child { flex: 0 0 auto; min-width: 96px; }
.row.field input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent; text-align: right;
  padding: 6px 4px; font-size: 17px; border-radius: 6px;
}
/* Fokus sichtbar auch bei leerem Feld (Peer R1, WCAG 2.4.7) */
.row.field input:focus { color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
/* Fehler am Feld (Peer R3): Markierung zusaetzlich zur verknuepften Meldung (aria-describedby) */
.row.field input[aria-invalid="true"] { box-shadow: inset 0 -2px 0 var(--danger); }
.row.field.stack { flex-direction: column; align-items: stretch; gap: 2px; }
.row.field.stack span:first-child { font-size: 13px; color: var(--muted); }
.row.field.stack input { text-align: left; }
.row.field.stack input.mono { font-size: 16px; }
.row.action { justify-content: center; color: var(--accent); cursor: pointer; font-size: 17px; }
.row.action.danger { color: var(--bad); }
.empty { padding: 16px; color: var(--muted); text-align: center; }
.footnote, .hint { font-size: 13px; color: var(--muted); margin: 8px 16px 0; }

/* Geräteeinträge */
.device { display: flex; gap: 12px; align-items: center; padding: 12px 16px; min-height: 60px; }
.device-main { flex: 1 1 auto; min-width: 0; }
.device-name { font-weight: 600; overflow-wrap: anywhere; }
.device-sub { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--ok); }
.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--fill); color: var(--muted-on-fill); white-space: nowrap; }
.pill.ok { color: var(--ok-text); }
.pill.bad { color: var(--bad); }
.pill.wait { color: var(--warn-text); }
/* Paket 9 Teil 1: „teilweise übernommen“ - Warnfarbe mit Text und Symbol, nie die grüne Klasse */
.pill.warn { color: var(--warn-text); }
.pill .pill-sym { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; fill: currentColor; }
.ack .ack-mehr { margin-top: 6px; }
.ack .ack-mehr summary { cursor: pointer; min-height: 24px; }
.ack .ack-rest { margin: 6px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
/* Pille auf der getönten Zustandszeile (.today-state hat selbst --fill als Grund): ohne eigenen deckenden Grund lägen zwei --fill-Töne
   übereinander: die neutrale Pille (--muted-on-fill) käme hell nur auf 4.37:1, die rote (--bad) dunkel nur auf 4.37:1. Mit --card als
   Grund: neutral hell 5.76:1, dunkel 7.69:1; rot hell 7.11:1, dunkel 7.45:1 (alle fünf Meldungen >= 5.7:1).
   Einzige Stelle, an der eine Pille auf getöntem Grund steht (tests/e2e/p9t1-nacharbeit.spec.cjs, P9T1-N1). */
.today-state .pill { background: var(--card); }
.today-state .state-note { flex-basis: 100%; font-size: 13px; overflow-wrap: anywhere; }
.zp-wirkt-nicht { flex: 0 0 auto; margin-left: 6px; white-space: normal; }
/* Ausnahme-Zeile mit Pille: bei 320 px bliebe dem Text daneben sonst nur ein Wort je Zeile - die Pille rutscht dann in die nächste Zeile */
.zp-zeile[data-zp-ausnahme] { flex-wrap: wrap; }
.zp-zeile[data-zp-ausnahme] .zp-label.grow { flex: 1 1 8em; }
.zp-ferien-box .zp-hilfe { margin: 6px 0 0; }
/* Hinweis statt Knopf („Kann dieser PC noch nicht“) */
.kid-note { margin: 8px 0 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; overflow-wrap: anywhere; }
.kid-note > span { flex: 1 1 200px; min-width: 0; }
.kid-note .btn { min-height: 32px; }
.qreq .qreq-hint { flex-basis: 100%; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.device .btn.small-btn { flex: 0 0 auto; }

/* Übersicht */
.summary { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; margin-top: 8px; border: 0; cursor: pointer; text-align: left; }
.summary-num { flex: 0 0 auto; min-width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; background: var(--fill); color: var(--muted); }
.summary-num.has { background: var(--danger-solid); color: #fff; }
.summary-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.chev { color: var(--muted); font-size: 24px; }

/* Anfragen */
.cards { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card-title { font-weight: 600; overflow-wrap: anywhere; }
.card-time { font-size: 14px; color: var(--muted); white-space: nowrap; }
.card-line { font-size: 15px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.card-note { margin-top: 8px; padding: 8px 12px; background: var(--fill); border-radius: 10px; font-size: 15px; overflow-wrap: anywhere; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.choices .deny { grid-column: 1 / -1; }
.hist { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; min-height: 48px; align-items: center; }
.hist-main { min-width: 0; }
.hist-title { overflow-wrap: anywhere; }
.hist-sub { font-size: 14px; color: var(--muted); }
.hist[data-type="website"] { flex-wrap: wrap; row-gap: 4px; }
.hist[data-type="website"] .hist-main { flex: 1 1 0; }
.hist-detail { flex: 1 1 100%; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.hist[data-type="website"] [data-web-resperren] { flex: 0 0 auto; }
/* Website-Anfragen */
.card-domain { margin-top: 8px; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.card-hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
.card[data-type="website"] .choices { grid-template-columns: repeat(2, 1fr); }
/* Bitte des Kindes: +15 Min. | +1 Std. nebeneinander, „Rest des Tages“ und „Ablehnen“ je in voller Breite - bei 360 px brach der Text sonst im Knopf um */
.card[data-type="kinderansicht"] .choices { grid-template-columns: repeat(2, 1fr); }
.card[data-type="kinderansicht"] .choices [data-decide="tag"] { grid-column: 1 / -1; }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--fill); color: var(--accent); font-size: 17px; font-weight: 600;
}
.btn.primary { background: var(--accent-bg); color: var(--accent-text); }
.btn.danger { color: var(--bad); }
.btn.block { display: flex; width: 100%; margin-top: 12px; }
/* Paket 8 W2 (Review Olivia-PC): min-height steht nur noch in der 44px-Regel weiter unten (1.1 Zielgroesse); die fruehere
   36px-Angabe war tot (gleiche Spezifitaet, spaetere Regel gewinnt) */
.btn.small-btn { padding: 6px 12px; font-size: 15px; }
.btn:disabled { opacity: 0.45; cursor: default; }
/* Druckzustand ohne Farbverlust: opacity 0.6 senkte Text auf 2.7-3.5:1 (Review Olivia-PC). Knoepfe: leicht kleiner; Zeilen: deckende Hinterlegung */
.btn:active:not(:disabled), .qbtn:active:not(:disabled), .del:active { transform: scale(0.97); }
.row.action:active, .row.add:active:not(:disabled), .summary:active, .svc-open:active { background-color: var(--fill-solid); }
.msg { margin: 12px 16px 0; font-size: 15px; color: var(--danger); text-align: left; }
.msg.ok { color: var(--ok-text); }

/* Segmentierte Auswahl */
.segmented { display: flex; gap: 2px; padding: 2px; margin-top: 8px; background: var(--fill); border-radius: 9px; overflow-x: auto; scrollbar-width: none; }
.segmented button { flex: 1 0 auto; padding: 6px 12px; border: 0; border-radius: 7px; background: transparent; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.segmented button[aria-selected="true"], .segmented button[aria-checked="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); font-weight: 600; }

/* Bildschirmzeit */
.notice { margin-top: 16px; padding: 16px; background: var(--card); border-radius: var(--radius); }
.notice strong { display: block; margin-bottom: 4px; }
.ack { margin-top: 12px; padding: 12px 16px; border-radius: var(--radius); background: var(--card); display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.ack .ack-text { min-width: 0; overflow-wrap: anywhere; }
.num-input { width: 76px; text-align: right; border: 0; border-radius: 8px; background: var(--fill); padding: 8px 10px; font-size: 17px; }
.time-input { border: 0; border-radius: 8px; background: var(--fill); padding: 6px 8px; font-size: 17px; min-width: 0; }
.inline { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.toggle input { width: 22px; height: 22px; accent-color: var(--ok); }
.row .label { flex: 0 1 auto; max-width: 55%; overflow-wrap: break-word; }
.row .label small { display: block; color: var(--muted); font-size: 13px; }
.dt { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: 0 1 auto; min-width: 0; }

/* Bearbeiten: Entfernen (rotes Minus), Hinzufügen (grünes Plus), Eingabebereiche */
.row.edit { justify-content: flex-start; }
.row .label.grow { flex: 1 1 auto; max-width: none; min-width: 0; }
.row .label small.warn { color: var(--danger); }
.app-name { overflow-wrap: anywhere; }
.dt-col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.dt-col .dt { flex-wrap: nowrap; justify-content: flex-start; }
.del {
  flex: 0 0 auto; position: relative; width: 26px; height: 26px; margin: -6px 0; padding: 0; border: 0; border-radius: 50%;
  background: var(--danger-solid); cursor: pointer;
}
.del::after { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 2px; border-radius: 1px; background: #fff; }
.del::before { content: ""; position: absolute; inset: -9px; }
.row.add { justify-content: flex-start; color: var(--accent); cursor: pointer; font-size: 17px; }
.row.add:disabled { color: var(--muted); cursor: default; }
.row.add:disabled .plus { background: var(--muted); }
.plus { flex: 0 0 auto; position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); }
.plus::before, .plus::after { content: ""; position: absolute; background: #fff; border-radius: 1px; }
.plus::before { left: 7px; right: 7px; top: 12px; height: 2px; }
.plus::after { top: 7px; bottom: 7px; left: 12px; width: 2px; }
.add-panel { position: relative; background: var(--fill); }
.add-panel .row { min-height: 52px; }
.add-panel .num-input, .add-panel .time-input, .add-panel .sel { background: var(--card); }
.row.actions { justify-content: flex-end; gap: 8px; }
.add-msg { margin: 0; padding: 0 16px 4px; }
.sel {
  flex: 0 1 auto; min-width: 0; max-width: 62%; border: 0; border-radius: 8px; background: var(--fill);
  padding: 8px 10px; font-size: 17px;
}
.add-always { gap: 8px; }
.text-input {
  flex: 1 1 auto; min-width: 0; width: 100%; border: 0; border-radius: 8px; background: var(--fill);
  padding: 9px 10px; font-size: 16px; outline-color: var(--accent);
}
.pending { margin: 12px 16px 0; font-size: 15px; color: var(--warn-text); }

/* Kopplung */
.pair { padding: 16px; text-align: center; border-top: 0.5px solid var(--sep); }
.code { font: 700 40px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.06em; margin: 12px 0 6px; overflow-wrap: anywhere; }
.countdown { font-size: 15px; color: var(--muted); }
.countdown.expired { color: var(--danger); }
.revoked { margin-top: 12px; }
.revoked summary { cursor: pointer; color: var(--muted); font-size: 15px; padding: 8px 16px; min-height: 44px; display: flex; align-items: center; }

/* Tab-Bar: Handy = eine Zeile mit 4 Bereichen + "Mehr" (Paket 7 B, Entscheid Bernd 11.11.2026); die uebrigen Bereiche
   (data-mobil="mehr") stehen erst in der Seitenleiste ab 900 px und auf dem Handy als Zeilen unter "Mehr" */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 4px 2px env(safe-area-inset-bottom);
  background: var(--bar);
  border-top: 0.5px solid var(--sep);
}
.tabbar [data-mobil="mehr"] { display: none; }
.tabbar button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 4px 0; border: 0; background: none; cursor: pointer; color: var(--who-muted); min-width: 0;
}
/* Inaktive Tabs --who-muted statt --muted: hinter der 94-%-Leiste mit dunklem Inhalt nur 4.30:1 -> 6.3:1 (axe incomplete, logs/97);
   seit Paket 7 gegen die deckende --bar nachgemessen: hell 7.2:1, dunkel 6.3:1 */
.tabbar svg { width: 26px; height: 26px; fill: currentColor; }
.tabbar span { font-size: 10px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar button[aria-current="page"] { color: var(--accent); }
/* Dunkel: #0a84ff auf der Leiste nur 4.25:1 (logs/97) -> #409cff 5.5:1 */
@media (prefers-color-scheme: dark) { .tabbar button[aria-current="page"] { color: #6fcfac; } }
.badge {
  position: absolute; top: 2px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger-solid); color: #fff; font-size: 12px; font-style: normal; font-weight: 600; line-height: 18px; text-align: center;
}
/* „99+“ (Paket 8, P8-17 f): breiter als der Platz rechts neben dem Symbol (360 px: 30 px) -> am rechten Knopfrand ausrichten */
.badge.viel { left: auto; right: 2px; }

/* Dialog als Aktionsblatt */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 480px;
  background: transparent; color: var(--text);
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.4); }
.sheet form { margin: 8px; padding: 20px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-radius: 14px; text-align: center; }
.sheet .sheet-karte { margin: 8px; padding: 20px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-radius: 14px; text-align: center; }
.sheet .sheet-karte form { margin: 12px 0 0; padding: 0; background: none; border-radius: 0; }
.sheet h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; overflow-wrap: anywhere; }
.sheet p { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }

/* Hinweis unten */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: max(calc(76px + env(safe-area-inset-bottom)), calc(var(--tabbar-h, 0px) + 12px)); z-index: 20;
  max-width: 480px; margin: 0 auto; padding: 12px 16px; border-radius: 12px;
  background: rgba(40, 40, 42, 0.95); color: #fff; font-size: 15px; text-align: center;
}

@media (min-width: 600px) {
  .tabbar span { font-size: 11px; }
}

/* Tippflaeche >= 44 x 44 px (Peer R4) bei unveraendertem Textbild */
.btn-link { background: none; border: 0; padding: 0 8px; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--accent, #0062cc); font: inherit; cursor: pointer; }

/* Übersicht: Heute-Karte je Gerät, Auszeit */
.card.today { display: flex; flex-direction: column; gap: 8px; }
/* Schmale Fenster (320 px, Zoom 400 %): die Pille bricht unter den Gerätenamen um, statt ihn auf Buchstabenbreite zu drücken */
.today-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.today-head .device-main { flex: 1 1 7em; }
.today-head .pill { flex: 0 0 auto; }
.usage { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.usage-label { flex: 0 0 100%; font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); }
.usage-num { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.usage-of { font-size: 15px; color: var(--muted); }
.bar { height: 10px; border-radius: 5px; background: var(--fill); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 5px; background: var(--accent); min-width: 0; max-width: 100%; }
.bar-fill.near { background: var(--warn); }
.bar-fill.full { background: var(--danger); }
.today-rest { font-size: 15px; color: var(--muted); }
.today-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-radius: 10px; background: var(--fill); font-size: 15px; font-weight: 600; }
.today-state.auszeit .state-text, .today-state.sleep .state-text { color: var(--indigo-text); }
.today-foot { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.today-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.today-actions .btn { flex: 1 1 auto; }
.az-btn { color: var(--indigo-text); }
.az-options { display: flex; flex-direction: column; margin-top: 8px; }
.az-opt { flex-direction: column; gap: 0; }
.az-opt small { font-size: 13px; font-weight: 400; color: var(--muted); }
.sheet .msg { margin: 10px 0 0; text-align: center; }
#ovCleanup { margin-top: 12px; }
.notice.cleanup { margin-top: 0; display: flex; flex-direction: column; gap: 8px; }
.notice.cleanup strong { margin-bottom: 0; }
.cleanup-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cleanup-row .grow { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }

/* ---------- W2-R: Personenkonten, Rollen, Superadmin-Bereiche ---------- */
.login-links { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 16px; }
.login-links .btn-link { padding: 4px 8px; min-height: 44px; }
.login .notice { text-align: left; font-size: 15px; }
.warn-note { border-left: 4px solid var(--warn); }
.warn-note strong { color: var(--text); }
.banner { margin-top: 8px; margin-bottom: 4px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.banner .btn { align-self: flex-start; margin-top: 6px; }
.topbar { flex-wrap: wrap; }
.topbar h1 { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .conn { flex: 0 0 auto; }
.who-row { flex: 0 0 100%; display: flex; min-width: 0; margin-top: 2px; }
.who-row:empty { display: none; }
.who {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 0; border-radius: 999px; padding: 4px 10px; min-height: 28px; cursor: pointer;
  background: var(--fill); color: var(--who-muted); font-size: 13px; font-weight: 600;
}
.who.super { color: var(--who-super); }
.who.legacy { color: var(--who-legacy); }
.form-gap { margin-top: 12px; }
.code-box { margin-top: 12px; padding: 16px; text-align: center; }
.code-box .group { text-align: left; }
.code-setup { font-size: 30px; }
.token { margin: 10px 0; padding: 10px; border-radius: 8px; background: var(--fill); overflow-wrap: anywhere; user-select: all; text-align: left; }
.member, .svc, .audit { display: flex; gap: 10px; align-items: center; padding: 12px 16px; min-height: 56px; flex-wrap: wrap; }
.member-main, .svc-main, .audit-main { flex: 1 1 180px; min-width: 0; }
.member-name, .svc-name { font-weight: 600; overflow-wrap: anywhere; }
.member-sub, .svc-sub, .audit-sub { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.member-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.audit { min-height: 48px; padding: 10px 16px; }
.audit-title { font-size: 15px; overflow-wrap: anywhere; }
.audit .pill { flex: 0 0 auto; }
.switch { flex: 0 0 auto; width: 24px; height: 24px; accent-color: var(--ok); }
@media (min-width: 900px) {
  .login { align-items: center; }
}
/* Offline-Seite (offline.html): Link im Knopf-Stil */
a.btn { text-decoration: none; }

/* =====================================================================================================
   1.1 Teil A: Kinder-Karten, Ampel, Schnellaktionen, Dienste-Liste, Hilfe, Tour, Seitenleiste ab 900 px
   ===================================================================================================== */
:root { --line: var(--sep); --ok-bg: #e5f2ea; --warn-bg: #fbefdc; --bad-bg: #f9e3e3; --grau-bg: #eceeea; --bad: #9b3535;
  --kind-1: #215e4e; --kind-2: #4644b8; --kind-3: #8a4a12; --kind-4: #8e3535; --kind-5: #1f5f8b; --kind-6: #6b4c9a; }
@media (prefers-color-scheme: dark) { :root { --ok-bg: #173126; --warn-bg: #3a2a12; --bad-bg: #3a1a1a; --grau-bg: #2a2a2c; --bad: #ff8a80; } }
/* Kontrast-Tokens (Review Olivia-PC 11.11.2026, ELTERN-KONTRAST-VOLL.md; Gate-Scanner 976c734):
   --danger-solid  = Rot als Flaeche unter weissem Text (dunkel #ff453a mit Weiss nur 3.41:1 -> #d9342a 4.7:1)
   --muted-on-fill = gedaempfter Text auf --fill (dunkel #98989f auf --fill ~4:1 -> #aeaeb2 >= 5:1)
   --fill-solid    = --fill deckend ueber --card (halbtransparentes --fill ueber dem --sep-Raster der Vergleichstabelle ergab 3.73:1) */
:root { --danger-solid: #c4001a; --muted-on-fill: #5f6863; --fill-solid: #efeff0; }
@media (prefers-color-scheme: dark) { :root { --danger-solid: #d9342a; --muted-on-fill: #aeaeb2; --fill-solid: #323236; } }
/* WCAG 2.4.11: per Tastatur fokussierte Felder nicht unter fester Tableiste/Kopfzeile verstecken (Test 'Fokus nicht verdeckt') */
/* --tabbar-h/--topbar-h misst app.js (leistenMessen); Rueckfall ohne JS: bisherige Werte */
html { scroll-padding-top: calc(var(--topbar-h, 64px) + 8px); scroll-padding-bottom: calc(var(--tabbar-h, 84px) + 8px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible, #title:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Kopfzeile: Hilfe-Knopf */
.help-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--accent); cursor: pointer; padding: 0; }
.help-btn svg { width: 26px; height: 26px; fill: currentColor; }
.help-btn.top { margin: 0 0 4px 6px; }
.conn { margin-left: 8px; }

/* Ampel: immer Symbol + Text */
.ampel { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 999px; font-size: 13px; font-weight: 650; white-space: nowrap; flex: 0 0 auto; }
.ampel svg { width: 16px; height: 16px; fill: currentColor; }
.ampel.gruen { background: var(--ok-bg); color: var(--ok-text); }
.ampel.gelb { background: var(--warn-bg); color: var(--warn-text); }
.ampel.rot { background: var(--bad-bg); color: var(--bad); }
.ampel.grau { background: var(--grau-bg); color: var(--who-muted); }

/* Kinder-Karten */
.kids { display: grid; gap: 14px; }
.kid-card { background: var(--card); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); }
.kid-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.avatar.k1 { background: var(--kind-1); } .avatar.k2 { background: var(--kind-2); } .avatar.k3 { background: var(--kind-3); }
.avatar.k4 { background: var(--kind-4); } .avatar.k5 { background: var(--kind-5); } .avatar.k6 { background: var(--kind-6); }
.kid-name-box { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.kid-name-box .ampel { margin-top: 4px; }
.kid-name { font-size: 19px; font-weight: 700; letter-spacing: -.015em; overflow-wrap: anywhere; }
.kid-sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.kid-usage { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kid-stat { display: flex; flex-direction: column; }
.kid-num { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kid-num.bad { color: var(--bad); }
.kid-lab { font-size: 13px; color: var(--muted); }
.kid-est { grid-column: 1 / -1; overflow-wrap: anywhere; }
.ring { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.ring-fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.ring-fill.near { background: var(--warn); } .ring-fill.full { background: var(--danger); }
.kid-state { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: 10px; background: var(--fill); }
.kid-state svg { width: 18px; height: 18px; fill: currentColor; flex: 0 0 auto; }
.kid-state.auszeit { color: var(--indigo-text); }
.kid-state.wait { color: var(--warn-text); }
.kid-state.abgelaufen { color: var(--muted); }
.kid-why summary { min-height: 44px; display: flex; align-items: center; color: var(--accent); font-size: 15px; font-weight: 600; cursor: pointer; }
.kid-why ul { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted); display: grid; gap: 4px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; padding: 6px 4px; border: 0; border-radius: 12px; background: var(--fill); color: var(--accent); font-size: 13px; font-weight: 650; cursor: pointer; text-align: center; }
.qbtn svg { width: 22px; height: 22px; fill: currentColor; }
.qbtn.az { color: var(--indigo-text); }
.qbtn:disabled { opacity: .45; cursor: default; }
.kid-req { display: grid; gap: 8px; }
.qreq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); }
.qreq-icon { width: 20px; height: 20px; fill: var(--warn-text); flex: 0 0 auto; }
.qreq-text { flex: 1 1 160px; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.qreq-text em { color: var(--muted); font-style: normal; }
.qreq-btns { display: flex; gap: 8px; flex: 1 1 100%; }
.qreq-btns .btn { flex: 1 1 0; min-height: 44px; background: var(--card); }
.ok-btn { color: var(--ok-text); }
.btn.small-btn { min-height: 44px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 16px; }
.empty-state svg { width: 40px; height: 40px; fill: var(--muted); }
.dev-details { margin-top: 18px; }
.dev-details > summary { min-height: 44px; display: flex; align-items: center; padding: 0 16px; color: var(--accent); font-weight: 600; cursor: pointer; }
.dev-details .cards { margin-top: 8px; }

/* Mehr */
.action-row { cursor: pointer; justify-content: flex-start; color: var(--text); font-size: 17px; min-height: 52px; }
.action-row .grow { flex: 1 1 auto; }
.row-ico { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-bg); }
.row-ico svg { width: 18px; height: 18px; fill: #fff; }
.row-ico.i-set { background: #5f6863; } .row-ico.i-help { background: var(--kind-5); } .row-ico.i-tour { background: var(--kind-3); }
.more-list { margin-top: 8px; }

/* Inhalte & Apps: Dienste */
.search { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 12px; min-height: 44px; border-radius: 10px; background: var(--fill); }
.search svg { width: 20px; height: 20px; fill: var(--muted); flex: 0 0 auto; }
.search-input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font-size: 17px; padding: 10px 0; }
.search-input:focus { outline: none; }
.search:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; }
.chip { flex: 0 0 auto; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; }
.segmented button[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); font-weight: 600; }
.segmented button { min-height: 44px; color: var(--text); }
.svc-row { display: flex; align-items: center; min-height: 60px; }
.svc-open { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 4px 8px 16px; min-height: 60px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--text); }
.svc-tile { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #22282a; color: #fff; }
/* 1.1 iOS-Kachel: Markenfarbe als Hintergrund, Hersteller-Symbol kontrastiert (wie Apple-App-Icons) */
.svc-tile.marken { background: var(--marken); }
.svc-tile.marken .svc-icon, .svc-tile.marken .svc-icon use, .svc-tile.marken .svc-icon path { fill: var(--marken-fg, #fff); }
.svc-tile.g-social_network { background: #3b4bb5; } .svc-tile.g-messenger { background: #1f7a55; } .svc-tile.g-streaming { background: #a8322d; }
.svc-tile.g-gaming { background: #5b3f9e; } .svc-tile.g-ai { background: #2f5f7a; } .svc-tile.g-shopping { background: #8a4a12; }
.svc-icon { width: 24px; height: 24px; fill: currentColor; }
.svc-ph { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--fill); font-weight: 700; color: var(--muted); }
.svc-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.svc-name { font-weight: 600; overflow-wrap: anywhere; }
.svc-state { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.svc-state svg { width: 14px; height: 14px; fill: currentColor; flex: 0 0 auto; }
.svc-state.bad { color: var(--bad); } .svc-state.ok { color: var(--ok-text); } .svc-state.wait { color: var(--warn-text); }
.fav-btn { flex: 0 0 auto; width: 48px; height: 48px; margin-right: 6px; border: 0; border-radius: 50%; background: none; color: var(--who-muted); cursor: pointer; display: grid; place-items: center; }
.fav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.fav-btn.on { color: #a86a00; }
.fav-btn.on svg { fill: currentColor; }
@media (prefers-color-scheme: dark) { .fav-btn.on { color: #ffc24a; } }
.svc-list .svc-row + .svc-row::before { left: 68px; }

/* Hilfe & Tour */
.help-sheet form, .tour-card { text-align: left; }
.help-body { display: grid; gap: 10px; margin-top: 4px; }
.help-body p { color: var(--text); font-size: 16px; line-height: 1.45; }
.sheet .az-options .btn + .btn { margin-top: 8px; }
.tour { margin: auto; max-width: 440px; }
.tour-card { margin: 12px; padding: 22px 20px 12px; background: var(--card); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.tour-step { font-size: 13px; font-weight: 650; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.tour-card h3 { font-size: 21px; font-weight: 700; letter-spacing: -.015em; }
.tour-card p#tourText { font-size: 16px; color: var(--text); line-height: 1.45; }
.tour-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.tour-card .btn-link { align-self: center; color: var(--muted); }
.tabbar button.tour-mark { color: var(--accent); }
.tabbar button.tour-mark::after { content: ""; position: absolute; inset: 2px 6px; border: 2px solid var(--accent); border-radius: 12px; }
.side-brand { display: none; }

/* Seitenleiste ab 900 px (Familienübersicht als Vorbild) */
@media (min-width: 900px) {
  #app { padding-left: 248px; }
  .tabbar { top: 0; right: auto; width: 248px; display: flex; flex-direction: column; gap: 4px; padding: 28px 14px; border-top: 0; border-right: 1px solid var(--line); background: #ecefe9; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 28px; font-weight: 700; color: var(--accent); }
  .side-brand small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
  .side-brand img { border-radius: 8px; }
  .tabbar button { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 8px; color: var(--text); }
  .tabbar span { font-size: 15px; font-weight: 600; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar button[aria-current="page"] { background: var(--card); box-shadow: 0 1px 3px #1c30200d; }
  .tabbar button[data-mobil="mehr"] { display: flex; } /* Seitenleiste: alle Bereiche (Paket 7) */
  #moreList [data-mobil="mehr"] { display: none; } /* ... und keine Doppelzeilen unter "Mehr" */
  #moreList [data-mobil="mehr"] + [data-goto="geraete"]::before { content: none; } /* erste sichtbare Zeile ohne Trennlinie */
  .badge { position: static; margin-left: auto; }
  main { max-width: 980px; padding-bottom: 40px; }
  .topbar { max-width: 980px; margin: 0 auto; padding-top: 32px; }
  .kids { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
  .toast { bottom: 24px; }
}
@media (min-width: 900px) and (prefers-color-scheme: dark) { .tabbar { background: #111312; } }

.who { min-height: 44px; }
.kid-head { align-items: flex-start; }
.kid-num { font-size: 22px; white-space: nowrap; }
@media (min-width: 420px) { .kid-num { font-size: 26px; } }

/* 1.1 Anmeldeart immer sichtbar: Familienpasswort (Uebergang) | Benutzername */
.login-art { margin: 16px 0 12px; }
.login-art button { flex: 1 1 0; }
.more-list a.row { color: inherit; text-decoration: none; }

/* 1.1 Passwort vergessen: nummerierte Schritte */
.forgot-steps { margin: 12px 0 14px 1.2em; padding: 0; line-height: 1.9; }
.forgot-steps li { padding-left: 4px; }

/* 1.1 Footer mit Version, Impressum, Slogan. Rand mit --line wie .rechtsseite .card/.kid-card (Paket 8 W1: --c-line gibt es nur in
   .fgc-apps/.fgc-panel; hier war die ganze border-top-Angabe ungueltig: berechnet kein Rand, Farbe currentColor = --muted) */
/* Solange weder Anmeldung noch App eingeblendet sind (bis app.js die Sitzung geprueft hat), bleibt die Fusszeile aus:
   sonst erschien sie allein und der ganze Seitenkoerper sprang beim Einblenden (Lighthouse CLS 1,0; Grenze 0,1). */
body:has(> #login[hidden]):has(> #app[hidden]) > .app-footer { display: none; }
/* Die App fuellt mindestens den Bildschirm: die Fusszeile beginnt darunter und springt nicht sichtbar, wenn die Karten
   nach dem Abruf erscheinen (Lighthouse CLS angemeldet 0,07-0,22 nur durch die Fusszeile). */
#app:not([hidden]) { min-height: 100vh; min-height: 100dvh; }
.app-footer { margin-top: 48px; padding: 24px 16px 16px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; color: var(--muted); }
/* Paket 7: die Fusszeile ist das Seitenende - ohne Platz fuer die feste Tableiste lagen Impressum/Datenschutz/AGB am Ende
   unter der Leiste (tests/e2e/tableiste.spec.cjs Ueberdeckung). --tabbar-h ist 0 auf der Anmeldeseite und ab 900 px. */
.app-footer { padding-bottom: calc(16px + var(--tabbar-h, 0px)); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 8px; }
.footer-link { color: var(--muted); text-decoration: none; white-space: nowrap; }
.footer-link:hover { text-decoration: underline; }
.version { font-family: monospace; } /* keine opacity: Kontrast >= 4.5:1 (axe color-contrast) */
.slogan { margin: 0; font-size: 12px; color: var(--accent); font-weight: 500; letter-spacing: 0.3px; }

/* ---------- Language Switcher (Flags top right) ---------- */
.lang-switcher { display: flex; gap: 4px; margin-right: 8px; }
.lang-btn { width: 44px; height: 44px; /* Zielgroesse 44 px (Peer Olivia-PC, a11y-befunde) */ border-radius: 50%; border: 2px solid transparent; background: var(--fill); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.lang-btn:hover { background: var(--accent-bg); border-color: var(--accent-bg); }
.lang-btn.active { background: var(--accent-bg); border-color: var(--accent-bg); box-shadow: 0 0 0 2px var(--accent-bg); outline: 2px solid var(--accent-bg); outline-offset: 2px; }
.lang-flag { width: 28px; height: 21px; display: block; border-radius: 2px; }

/* ---------- Elternkontrollen & App-Kontrollen Cards ---------- */
.card.elternkontrolle, .card.app-kontrolle { display: flex; gap: 12px; padding: 16px; align-items: flex-start; }
.ek-icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; background: var(--fill); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.ek-content { flex: 1 1 auto; min-width: 0; }
.ek-content h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.ek-content p.muted { font-size: 14px; margin-bottom: 8px; }
.ak-icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; background: var(--fill); display: flex; align-items: center; justify-content: center; }
.ak-icon .svc-tile { width: 40px; height: 40px; }
.ak-body { flex: 1 1 auto; min-width: 0; }
.ak-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ak-category { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--fill); padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.ak-desc { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.ak-controls { list-style: none; padding: 0; margin: 8px 0 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.ak-controls li { font-size: 13px; color: var(--text); padding: 4px 8px; background: var(--fill); border-radius: 6px; }
.ak-link { margin-top: 10px; }

/* Desktop sidebar adjustments for new tabs */
@media (min-width: 900px) {
  .tabbar { padding-top: 20px; }
  .tabbar button { min-height: 44px; }
}

/* ---------- Digitale Sicherheit Cards (SVG Icons) ---------- */
.card.digitale-sicherheit { display: flex; gap: 12px; padding: 16px; align-items: flex-start; }
.ds-icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; background: var(--fill); display: flex; align-items: center; justify-content: center; }
.ds-icon .svc-tile { width: 40px; height: 40px; }
.ds-content { flex: 1 1 auto; min-width: 0; }
.ds-content h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.ds-content p.muted { font-size: 14px; margin-bottom: 8px; }

/* ---------- Remote Action Cards ---------- */
.card.remote-action { padding: 16px; }
.remote-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.remote-name { font-weight: 600; font-size: 16px; }
.remote-status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.remote-status.online { background: var(--ok-bg); color: var(--ok-text); } /* wie .ampel.gruen: >= 4.5:1 hell+dunkel (weiss auf --ok war 2.2:1) */
.remote-status:not(.online) { background: var(--grau-bg); color: var(--who-muted); } /* wie .ampel.grau */
.remote-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Vergleich Table (Statistiken) ---------- */
.vergleich-table { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 1px; background: var(--sep); border-radius: 8px; overflow: hidden; }
.vergleich-header { display: contents; }
.vergleich-row { display: contents; }
.vergleich-cell { padding: 12px 10px; background: var(--card); font-size: 14px; display: flex; align-items: center; justify-content: center; text-align: center; }
.vergleich-cell.feature { justify-content: flex-start; font-weight: 500; text-align: left; }
.vergleich-cell.head { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-on-fill); background: var(--fill-solid); }
.vergleich-cell.yes { color: var(--ok-text); }
.vergleich-cell.no { color: var(--danger); }
.vergleich-cell.partial { color: var(--warn-text); }
.vergleich-cell.unknown { color: var(--muted); }

/* Mobile: horizontal scroll for comparison table */
@media (max-width: 700px) {
  .vergleich-table { display: block; overflow-x: auto; white-space: nowrap; }
  .vergleich-header, .vergleich-row { display: flex; min-width: max-content; }
  .vergleich-cell { flex: 0 0 auto; white-space: normal; min-width: 80px; }
  .vergleich-cell.feature { min-width: 180px; }
}

/* Rechtsseiten (Impressum, Datenschutz, AGB; <body class="rechtsseite">): frueher je ein Inline-<style>, den die CSP
   style-src 'self' blockierte. Jeder Selektor beginnt mit .rechtsseite, damit nichts in die Eltern-App (eigene main/h1/.card)
   durchschlaegt. Kartenrand mit --line (--c-line gibt es nur in apps.css). Version ohne opacity in --muted (>= 4.5:1 hell/dunkel). */
.rechtsseite main { max-width: 720px; margin: 48px auto; padding: 0 20px; }
.rechtsseite h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.rechtsseite .muted { color: var(--muted); font-size: 0.95rem; }
.rechtsseite .card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin: 16px 0; }
.rechtsseite .card h2 { font-size: 1.2rem; margin-bottom: 12px; color: var(--accent); }
.rechtsseite .card p { margin: 8px 0; line-height: 1.6; }
.rechtsseite .card ul { margin: 8px 0 8px 20px; line-height: 1.6; }
/* Schmale Handys (360-390 px): beide Spalten duerfen schrumpfen, lange Werte (E-Mail-Adresse) brechen im Wert um; vorher
   scrollte /impressum horizontal (Befund MacBook Pre-Mortem, scrollWidth 395 bei 360 px). */
.rechtsseite dl { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr); gap: 4px 16px; margin: 0; font-size: 0.95rem; }
.rechtsseite dt { color: var(--muted); font-weight: 500; }
.rechtsseite dd { margin: 0; overflow-wrap: anywhere; }
.rechtsseite a { color: var(--accent); }
.rechtsseite li a[href^="mailto:"] { overflow-wrap: anywhere; }
.rechtsseite .slogan { text-align: center; color: var(--accent); font-weight: 500; margin-top: 24px; font-size: 0.95rem; }
.rechtsseite .version { font-family: monospace; color: var(--muted); font-size: 0.85rem; }

/* Schmale Handys (Koordinator 12.11.2026): Begriff und Wert untereinander, damit normale Woerter nicht mitten im Wort umbrechen
   (das Raster 140px + 1fr liess dem Wert bei 360 px nur etwa 114 px). Die Ueberschrift skaliert erst unter 370 px mit, Raender und
   Innenabstaende werden erst unter 340 px kleiner - so bleibt das gepruefte Layout bei 390 px (48px/20px/24px, h1 1.8rem) unveraendert.
   Jeder Selektor bleibt .rechtsseite-gescoped. */
@media (max-width: 480px) {
  .rechtsseite dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rechtsseite dd + dt { margin-top: 10px; }
}
@media (max-width: 370px) {
  .rechtsseite h1 { font-size: clamp(1.3rem, 6.5vw, 1.8rem); overflow-wrap: break-word; }
}
@media (max-width: 340px) {
  .rechtsseite main { margin: 24px auto; padding: 0 12px; }
  .rechtsseite .card { padding: 16px; }
}

/* Sprachumschalter DE/EN/ES (Website, Rechtsseiten) – 44 px Zielgroesse, aktuelle Sprache fett */
.sprachwahl { display: flex; justify-content: flex-end; gap: 0.25rem; padding: 0.25rem 1rem; font-size: 0.95rem; }
.sprachwahl a { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; min-width: 44px; min-height: 44px; text-decoration: underline; text-underline-offset: 2px; color: inherit; }
.sprachwahl a[aria-current="page"] { font-weight: 700; text-decoration: none; }
.sprachwahl a:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.sprachwahl a[href*="/de/"]::before { content: "🇩🇪"; font-size: 1.1em; }
.sprachwahl a[href*="/en/"]::before { content: "🇬🇧"; font-size: 1.1em; }
.sprachwahl a[href*="/es/"]::before { content: "🇪🇸"; font-size: 1.1em; }
.sprachwahl a[href="/"]::before { content: "🇩🇪"; font-size: 1.1em; }
.sprachwahl a[href="/en/"]::before { content: "🇬🇧"; font-size: 1.1em; }
.sprachwahl a[href="/es/"]::before { content: "🇪🇸"; font-size: 1.1em; }
.sprachwahl a[href="/handy"]::before { content: "🇩🇪"; font-size: 1.1em; }
.sprachwahl a[href="/en/handy"]::before { content: "🇬🇧"; font-size: 1.1em; }
.sprachwahl a[href="/es/handy"]::before { content: "🇪🇸"; font-size: 1.1em; }
.sprachwahl a[href="/anleitung"]::before { content: "🇩🇪"; font-size: 1.1em; }
.sprachwahl a[href="/en/anleitung"]::before { content: "🇬🇧"; font-size: 1.1em; }
.sprachwahl a[href="/es/anleitung"]::before { content: "🇪🇸"; font-size: 1.1em; }

/* Einrichtungsassistent (Handy) */
.setup-steps { margin: 4px 0 6px; padding-left: 1.2em; list-style: none; }
.setup-steps li { margin: 2px 0; }
.setup-steps li.ok { color: var(--ok, #1c9b5a); }
#handyCard .btn { align-self: flex-start; }
