/* ÜbCon One · Beobachtungsmodul — Oberfläche im Stil von uebcon.org.
   Tokens, Schriften, Glas-Karten, Verlaufs-Buttons, Kicker-Pillen und die Timeline stammen
   aus uebcon-website/style.css. Hell, Dunkel oder Gerät folgen (Umschalter in der Seitenleiste).
   Dazu für den Einsatz: große Tippflächen, klare Farben für Bewertung und Status. */

@font-face { font-family: 'Cabinet Grotesk'; src: url('/UebConOne/WebApp/assets/fonts/cabinet-grotesk-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cabinet Grotesk'; src: url('/UebConOne/WebApp/assets/fonts/cabinet-grotesk-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('/UebConOne/WebApp/assets/fonts/satoshi-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('/UebConOne/WebApp/assets/fonts/satoshi-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('/UebConOne/WebApp/assets/fonts/satoshi-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root, [data-theme='light'] {
  color-scheme: light;
  --color-bg: #f6f6f9; --color-surface: #ffffff; --color-surface-2: #ffffff; --color-surface-offset: #edeef3;
  --color-divider: #e1e3ea; --color-border: rgba(15, 17, 26, 0.09);
  --color-text: #12141c; --color-text-muted: #585e6c; --color-text-faint: #6d707a;
  --color-primary: #3854d6; --color-primary-hover: #2a41b3; --color-primary-highlight: rgba(56, 84, 214, 0.09); --color-primary-rgb: 56, 84, 214;
  --color-accent-2: #7c3aed;
  --gradient-primary: linear-gradient(135deg, #3854d6 0%, #7c3aed 100%);
  --gradient-text: linear-gradient(135deg, #12141c 0%, #3854d6 65%, #7c3aed 100%);
  --glass-bg: rgba(255, 255, 255, 0.72); --glass-bg-hover: rgba(255, 255, 255, 0.92); --glass-border: rgba(15, 17, 26, 0.08); --glass-blur: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, 0.06), 0 4px 16px rgba(20, 24, 40, 0.04);
  --shadow-md: 0 2px 4px rgba(20, 24, 40, 0.08), 0 12px 32px rgba(20, 24, 40, 0.06);
  --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 12%, transparent), 0 16px 44px color-mix(in srgb, var(--color-primary) 14%, transparent);
  --glow-a: rgba(56, 84, 214, 0.10); --glow-b: rgba(124, 58, 237, 0.08);
  --good: #1a6d2d; --good-soft: rgba(30, 122, 52, 0.11); --warn: #b25e09; --warn-soft: rgba(178, 94, 9, 0.12); --bad: #b3261e; --bad-soft: rgba(179, 38, 30, 0.1);
  --on-primary: #ffffff;
  --input-border: #7d8290; /* Feldgrenzen mind. 3:1 (WCAG 1.4.11) */
  --warn-text: #8f4a04; /* Schrift auf --warn-soft mind. 4.5:1 */
}
[data-theme='dark'] {
  color-scheme: dark;
  --color-bg: #08090d; --color-surface: #0e1015; --color-surface-2: #13151b; --color-surface-offset: #191c24;
  --color-divider: #23262f; --color-border: rgba(255, 255, 255, 0.09);
  --color-text: #f2f3f6; --color-text-muted: #9ba0ad; --color-text-faint: #8a90a0;
  --color-primary: #7f9bff; --color-primary-hover: #9ab0ff; --color-primary-highlight: rgba(127, 155, 255, 0.14); --color-primary-rgb: 127, 155, 255;
  --color-accent-2: #a78bfa;
  --gradient-primary: linear-gradient(135deg, #7f9bff 0%, #a78bfa 100%);
  --gradient-text: linear-gradient(135deg, #ffffff 0%, #c3cdff 55%, #a78bfa 100%);
  --glass-bg: rgba(255, 255, 255, 0.045); --glass-bg-hover: rgba(255, 255, 255, 0.075); --glass-border: rgba(255, 255, 255, 0.1); --glass-blur: 20px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 18%, transparent), 0 0 48px color-mix(in srgb, var(--color-primary) 16%, transparent), 0 20px 48px rgba(0, 0, 0, 0.4);
  --glow-a: rgba(127, 155, 255, 0.16); --glow-b: rgba(167, 139, 250, 0.13);
  --good: #5fdc87; --good-soft: rgba(95, 220, 135, 0.14); --warn: #f2b05e; --warn-soft: rgba(242, 176, 94, 0.14); --bad: #ff7b70; --bad-soft: rgba(255, 123, 112, 0.14);
  --on-primary: #0b0d12;
  --input-border: #6b7282;
  --warn-text: #f2b05e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --color-bg: #08090d; --color-surface: #0e1015; --color-surface-2: #13151b; --color-surface-offset: #191c24;
    --color-divider: #23262f; --color-border: rgba(255, 255, 255, 0.09);
    --color-text: #f2f3f6; --color-text-muted: #9ba0ad; --color-text-faint: #8a90a0;
    --color-primary: #7f9bff; --color-primary-hover: #9ab0ff; --color-primary-highlight: rgba(127, 155, 255, 0.14); --color-primary-rgb: 127, 155, 255;
    --color-accent-2: #a78bfa;
    --gradient-primary: linear-gradient(135deg, #7f9bff 0%, #a78bfa 100%);
    --gradient-text: linear-gradient(135deg, #ffffff 0%, #c3cdff 55%, #a78bfa 100%);
    --glass-bg: rgba(255, 255, 255, 0.045); --glass-bg-hover: rgba(255, 255, 255, 0.075); --glass-border: rgba(255, 255, 255, 0.1); --glass-blur: 20px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 18%, transparent), 0 0 48px color-mix(in srgb, var(--color-primary) 16%, transparent), 0 20px 48px rgba(0, 0, 0, 0.4);
    --glow-a: rgba(127, 155, 255, 0.16); --glow-b: rgba(167, 139, 250, 0.13);
    --good: #5fdc87; --good-soft: rgba(95, 220, 135, 0.14); --warn: #f2b05e; --warn-soft: rgba(242, 176, 94, 0.14); --bad: #ff7b70; --bad-soft: rgba(255, 123, 112, 0.14);
    --on-primary: #0b0d12;
    --input-border: #6b7282;
    --warn-text: #f2b05e;
  }
}
:root {
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1.25rem; --radius-xl: 1.75rem; --radius-full: 9999px;
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', Arial, sans-serif;
  --sidebar-w: 268px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.55; color: var(--color-text); min-height: 100dvh;
  background: var(--color-bg); transition: background-color 0.35s ease, color 0.35s ease;
}
/* Ruhige Leuchtflächen wie auf der Startseite */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 520px at 85% -8%, var(--glow-a), transparent 65%), radial-gradient(760px 520px at -6% 108%, var(--glow-b), transparent 62%);
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 0.5rem; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem); letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: 1.25rem; } h3, h2.h3 { font-size: 1.05rem; } h4 { font-size: 0.92rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--color-primary); text-underline-offset: 2px; }
.muted { color: var(--color-text-muted); } .faint { color: var(--color-text-faint); } .small { font-size: 0.86rem; } .tiny { font-size: 0.76rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }
.grad { background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---- Symbole ---- */
.ico { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.22em; }

/* ---- Kicker (Pille mit leuchtendem Punkt) ---- */
.kicker {
  display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-text-muted); background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: var(--radius-full); padding: 0.35em 0.9em 0.35em 0.7em; margin-bottom: 0.7rem;
}
.kicker::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gradient-primary); box-shadow: 0 0 8px var(--color-primary); }

/* ---- Schaltflächen: Pillen wie auf der Startseite ---- */
button, .btn {
  font: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px; padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full); border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--color-text); font-weight: 700; text-decoration: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background var(--transition-interactive), border-color var(--transition-interactive), transform var(--transition-interactive), box-shadow var(--transition-interactive), filter var(--transition-interactive);
}
button:hover, .btn:hover { background: var(--glass-bg-hover); border-color: color-mix(in srgb, var(--color-primary) 35%, var(--glass-border)); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
button.primary, .btn.primary {
  font-family: var(--font-display); color: var(--on-primary); background: var(--gradient-primary); border-color: transparent; box-shadow: var(--shadow-glow); backdrop-filter: none;
}
button.primary:hover, .btn.primary:hover { filter: brightness(1.08); transform: translateY(-2px); border-color: transparent; background: var(--gradient-primary); }
button.primary:active { transform: translateY(0); }
button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: transparent; }
button.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
button.ghost, .btn.ghost { border-color: transparent; background: transparent; backdrop-filter: none; }
button.ghost:hover, .btn.ghost:hover { background: var(--color-primary-highlight); border-color: transparent; }
button.big { min-height: 56px; font-size: 1.08rem; padding: 0.8rem 1.4rem; width: 100%; }
button.small, .btn.small { min-height: 36px; padding: 0.25rem 0.85rem; font-size: 0.88rem; }
button.icon { min-width: 44px; padding: 0.5rem; }
button.small.icon { min-width: 36px; padding: 0.25rem; }
.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; }
.stack > * + * { margin-top: 0.9rem; } .stack-sm > * + * { margin-top: 0.5rem; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---- Formulare ---- */
.field { margin-bottom: 0.95rem; }
.field > label, .label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 0.3rem; }
.field .hint, .hint { color: var(--color-text-muted); font-size: 0.82rem; margin-top: 0.25rem; }
input, select, textarea {
  font: inherit; width: 100%; min-height: 44px; padding: 0.6rem 0.85rem; color: var(--color-text); background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--input-border); border-radius: var(--radius-md);
}
select option { color: #12141c; background: #fff; }
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; border-color: var(--color-primary); }
input[type='checkbox'], input[type='radio'] { width: 1.5rem; height: 1.5rem; min-height: 0; accent-color: var(--color-primary); flex: none; padding: 0; }
input[type='color'] { padding: 0.2rem; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.35rem 0; font-weight: 500; cursor: pointer; }
.check span { flex: 1; }
.grid2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; } .grid3 { display: grid; gap: 0 1rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; margin: 0 0 1.1rem; background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
legend { font-family: var(--font-display); font-weight: 700; padding: 0 0.5rem; }

/* ---- Karten (Glas), Hinweise, Badges ---- */
.card {
  --spot-x: 50%; --spot-y: 50%; position: relative; overflow: hidden;
  background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 1.15rem 1.3rem; box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive);
}
.card::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--transition-interactive); background: radial-gradient(260px circle at var(--spot-x) var(--spot-y), rgba(var(--color-primary-rgb), 0.14), transparent 60%); }
.card.fx:hover::before, .ex-card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card + .card { margin-top: 1rem; }
.ex-grid > .card, .stack > .card, .grid2 > .card, .dash-grid > .card { margin-top: 0; }
.card.flat { box-shadow: none; }
.banner { border-radius: var(--radius-md); padding: 0.75rem 1rem; margin-bottom: 1rem; background: var(--color-primary-highlight); border: 1px solid color-mix(in srgb, var(--color-primary) 18%, transparent); }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.banner.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.banner.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 28%, transparent); }
/* Hinweis zur Lizenz des lokalen PC-Servers (pcLizenzHinweis in app.js, nur lokaler Server) */
.banner.pc-lizenz { margin: 0.75rem 1rem 0; }
.banner.blocked { background: #c62820; color: #fff; border-color: transparent; font-weight: 700; display: flex; gap: 0.7rem; align-items: center; box-shadow: 0 8px 28px rgba(179, 38, 30, 0.35); }
.banner.blocked .ico { width: 1.5em; height: 1.5em; }
.badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; font-weight: 700; padding: 0.15rem 0.65rem; border-radius: var(--radius-full); background: var(--color-surface-offset); color: var(--color-text-muted); white-space: nowrap; }
.badge.primary { background: var(--color-primary-highlight); color: var(--color-primary); } .badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn-text); } .badge.bad { background: var(--bad-soft); color: var(--bad); }
.empty { text-align: center; color: var(--color-text-muted); padding: 2.2rem 1rem; }
.empty .ico { width: 2.4rem; height: 2.4rem; opacity: 0.55; margin-bottom: 0.4rem; }

/* ---- Anmeldeseiten ---- */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 1.2rem; padding: 1.2rem; }
.login-card { width: 100%; max-width: 28rem; padding: 1.6rem 1.6rem 1.4rem; box-shadow: var(--shadow-md); }
.login-card.wide { max-width: 42rem; }
/* Anmeldeseite (UI-Prüfung 12.11.2026, Nutzerwahl „eine Karte mit Umschalter“): Markenbereich und eine Karte; am PC nebeneinander, am Handy untereinander.
   Zugänge (Konto, Stab, Mime, Resilia) schaltet login-tabs.js über data-active am Rahmen um; die Karten behalten Kennungen und Logik. */
.login-hero { width: 100%; max-width: 28rem; padding: 1.2rem 1.4rem; border-radius: var(--radius-lg, 1.2rem); color: var(--on-primary, #fff); background: var(--gradient-primary); box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.login-hero::after { content: ''; position: absolute; inset: auto -4rem -5rem auto; width: 15rem; height: 15rem; border-radius: 50%; background: rgba(255, 255, 255, 0.08); pointer-events: none; }
.login-hero .login-brand { margin-bottom: 0.4rem; position: relative; z-index: 1; }
.login-hero .login-brand h1, .login-hero .login-brand h1 small { color: inherit; }
.login-hero .login-brand h1 small { opacity: 0.9; }
.login-hero .login-sub { color: inherit; margin: 0.4rem 0 0; position: relative; z-index: 1; }
.login-logo-badge { display: grid; place-items: center; padding: 0.4rem 0.6rem; border-radius: 0.8rem; background: #fff; flex: none; }
.login-logo-badge .logo { display: block; }
.login-panel { width: 100%; max-width: 28rem; display: grid; gap: 0.9rem; }
.login-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.25rem; border: 1px solid var(--glass-border); border-radius: var(--radius-full); background: var(--glass-bg); }
.login-tabs button { flex: 1 1 auto; min-height: 44px; padding-inline: 0.6rem; border: 0; border-radius: var(--radius-full); background: transparent; font-weight: 600; font-size: 0.92rem; backdrop-filter: none; }
.login-tabs button.on { background: var(--gradient-primary); color: var(--on-primary); }
/* „Stab mit Code“ in zwei Zeilen: normale Nutzer melden sich über „Anmelden“ an, dieser Reiter ist der Eintritt mit Code ohne Konto */
.login-tabs button[data-panel='stab'] { flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.login-tabs button[data-panel='stab'] span { display: block; line-height: 1.15; font-size: 0.85rem; }
.login-panel > .login-card { display: none; max-width: none; }
.login-panel[data-active='konto'] > #card, .login-panel[data-active='stab'] > #stabsraum, .login-panel[data-active='mime'] > #mime-card, .login-panel[data-active='resilia'] > #resilia-card { display: block; }
/* Mehrschritt-Anmeldung (Code, Passkey, Modulwahl) und bestehende Sitzung: nur die Konto-Karte, keine Umschalter */
.login-panel:has(#card #login-form[hidden]) > .login-tabs { display: none; }
.login-panel:has(#card #login-form[hidden]) > .login-card { display: none; }
.login-panel:has(#card #login-form[hidden]) > #card { display: block; }
@media (min-width: 900px) {
  .login-wrap-entry { grid-template-columns: minmax(18rem, 26rem) minmax(0, 28rem); justify-content: center; align-items: start; align-content: center; gap: 2.4rem; }
  .login-hero { max-width: none; align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 2.4rem 2.2rem; min-height: 33rem; }
  .login-hero .login-brand h1 { font-size: 2rem; }
  .login-hero .login-sub { font-size: 1.1rem; margin-top: 1rem; }
  .login-hero::after { width: 22rem; height: 22rem; inset: auto -7rem -8rem auto; }
}
/* Modulkacheln im Markenbereich (nach dem ersten Instagram-Beitrag „Vier Module. Eine Übung.“, Nutzerwunsch 12.11.2026): nur am PC, am Handy bleibt der Markenbereich schlank.
   Plakettenfarben dunkel genug für weiße Schrift (Kontrast mindestens 4,5:1). */
.login-modules { display: none; list-style: none; margin: 0; padding: 0; }
@media (min-width: 900px) {
  .login-modules { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1.6rem; position: relative; z-index: 1; }
  .login-modules .mod { display: grid; gap: 0.25rem; align-content: start; padding: 0.8rem 0.9rem 0.85rem; border-radius: 0.9rem; background: #fff; color: #1c2447; box-shadow: 0 6px 18px rgba(20, 24, 70, 0.18); font-size: 0.82rem; line-height: 1.3; }
  .login-modules .mod .mod-title { font-size: 0.95rem; font-weight: 700; color: #14213d; }
  .login-modules .mod-badge { justify-self: start; padding: 0.15rem 0.65rem; border-radius: var(--radius-full); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 0.25rem; }
  .login-modules .mod-planung .mod-badge { background: #2563eb; }
  .login-modules .mod-beobachtung .mod-badge { background: #7c3aed; }
  .login-modules .mod-auswertung .mod-badge { background: #15803d; }
  .login-modules .mod-stab .mod-badge { background: #c2410c; }
}
/* Grafik im Markenbereich je Reiter (Nutzerwunsch 12.11.2026): Anmelden zeigt die Modulkacheln, Stab den Stabsraum, Mime das Handy der Mimen, Resilia die Figur Resi.
   Nur am PC; die Bilder liegen in display:none-Blöcken und werden mit loading="lazy" erst geladen, wenn der Reiter sichtbar wird. Die Screenshots zeigen fiktive Daten. */
.login-stage { display: none; }
@media (min-width: 900px) {
  .login-wrap-entry[data-active='stab'] .login-modules, .login-wrap-entry[data-active='mime'] .login-modules, .login-wrap-entry[data-active='resilia'] .login-modules { display: none; }
  .login-wrap-entry[data-active='stab'] .stage-stab { display: block; }
  .login-wrap-entry[data-active='mime'] .stage-mime, .login-wrap-entry[data-active='resilia'] .stage-resilia { display: grid; }
  /* Bestehende Sitzung oder Mehrschritt-Anmeldung zeigt nur die Konto-Karte, dann auch die Modulkacheln */
  .login-wrap-entry:has(#card #login-form[hidden]) .login-stage { display: none; }
  .login-wrap-entry:has(#card #login-form[hidden]) .login-modules { display: grid; }
  .login-stage { position: relative; z-index: 1; margin-top: 1.5rem; color: inherit; animation: stageIn 0.35s ease-out both; }
  .login-stage p { margin: 0; }
  .stage-title { font-size: 1.05rem; font-weight: 700; }
  .stage-text { margin-top: 0.25rem; opacity: 0.95; line-height: 1.35; }
  .stage-note { margin-top: 0.6rem; font-size: 0.75rem; opacity: 0.9; line-height: 1.3; }
  .stage-stab .stage-shot { margin: 0 0 0.9rem; padding: 0.35rem; border-radius: 0.9rem; background: #fff; box-shadow: 0 10px 26px rgba(20, 24, 70, 0.28); }
  .stage-stab .stage-shot img { display: block; width: 100%; height: auto; border-radius: 0.6rem; }
  .stage-mime, .stage-resilia { grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.2rem; align-items: center; }
  .stage-phone { padding: 0.3rem; border-radius: 1.4rem; background: #14213d; box-shadow: 0 10px 26px rgba(20, 24, 70, 0.32); }
  .stage-phone img { display: block; width: 100%; height: auto; border-radius: 1.1rem; }
  .stage-copy { display: grid; gap: 0.5rem; }
  .stage-resilia { align-items: end; }
  .stage-resi { position: relative; width: 100%; aspect-ratio: 2 / 3; }
  .stage-resi img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .stage-resi .sr-kopf { z-index: 1; }
  .stage-resi .sr-mund { z-index: 1; inset: auto; left: 42.97%; top: 17.45%; width: 10.74%; height: auto; }
  .stage-resi .sr-koerper { z-index: 2; filter: drop-shadow(0 0.6rem 0.8rem rgba(15, 17, 26, 0.22)); }
  .stage-bubble { position: relative; padding: 0.8rem 1rem; border-radius: 1rem; background: #fff; color: #14213d; box-shadow: 0 8px 22px rgba(20, 24, 70, 0.22); line-height: 1.4; }
  .stage-bubble::before { content: ''; position: absolute; left: -0.5rem; bottom: 1.4rem; border: 0.5rem solid transparent; border-left: 0; border-right-color: #fff; }
  .login-stage.is-missing .stage-shot, .login-stage.is-missing .stage-phone, .login-stage.is-missing .stage-resi, .stage-stab.is-missing .stage-note { display: none; }
  .stage-mime.is-missing, .stage-resilia.is-missing { grid-template-columns: minmax(0, 1fr); }
}
@keyframes stageIn { from { opacity: 0; transform: translateY(0.5rem); } }
@media (prefers-reduced-motion: reduce) { .login-stage { animation: none; } }
/* Datenschutzhinweis im Stab-Zugang: eingeklappt auf drei Zeilen, voller Wortlaut per Knopf (Wortlaut und Pflicht unverändert, UI-Prüfung 12.11.2026) */
.consent.is-clamped .consent-text { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.consent-toggle { margin: 0.2rem 0 0.7rem; }
.login-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.login-brand .logo { height: 34px; width: auto; }
.login-brand h1 { margin: 0; font-size: 1.4rem; }
.login-sub { color: var(--color-text-muted); margin: 0 0 1rem; }
.divider { display: flex; align-items: center; gap: 0.8rem; color: var(--color-text-faint); font-size: 0.85rem; margin: 1.1rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--color-divider); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { background: var(--color-surface-offset); border-radius: var(--radius-md); padding: 0.7rem 0.9rem; margin: 0.9rem 0; }
.consent .check { padding: 0.45rem 0; }
.auth-tools { position: fixed; top: 0.8rem; right: 0.8rem; display: flex; gap: 0.5rem; z-index: 20; }

/* ---- App-Rahmen: Seitenleiste links ---- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 1rem 0.75rem; overflow-y: auto;
  background: color-mix(in srgb, var(--color-bg) 72%, transparent); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
  border-right: 1px solid var(--glass-border);
}
.sidebar .brand { display: flex; align-items: center; gap: 0.6rem; padding: 0.2rem 0.5rem 1rem; text-decoration: none; color: var(--color-text); }
.sidebar .brand img { height: 28px; width: auto; }
.sidebar .brand b { font-family: var(--font-display); font-size: 1.02rem; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-faint); padding: 0.9rem 0.7rem 0.3rem; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 0.7rem; min-height: 44px; padding: 0.5rem 0.75rem; border-radius: var(--radius-md); color: var(--color-text-muted);
  text-decoration: none; font-weight: 700; border: 0; background: transparent; width: 100%; text-align: left; justify-content: flex-start; backdrop-filter: none;
  /* Lange Einzelwörter (z. B. „Gefährdungsbeurteilung“) brechen um statt über die Leiste hinauszuragen: erst Silbentrennung (lang="de"), notfalls am Zeilenende */
  hyphens: auto; overflow-wrap: anywhere;
}
.nav-item:hover { background: var(--color-primary-highlight); color: var(--color-text); border: 0; }
.nav-item.is-locked { opacity: 0.55; }
.card.is-locked { opacity: 0.8; border-style: dashed; }
.nav-item.active { background: var(--color-primary-highlight); color: var(--color-primary); }
.nav-item.active::before { content: ''; position: absolute; left: -0.75rem; top: 20%; bottom: 20%; width: 3px; border-radius: 0 3px 3px 0; background: var(--gradient-primary); box-shadow: 0 0 10px var(--color-primary); }
.nav-item .ico { width: 1.35rem; height: 1.35rem; }
.nav-item .lbl-s { display: none; }
.nav-item .nav-badge { margin-left: auto; background: var(--bad); color: #fff; font-size: 0.75rem; font-weight: 700; min-width: 1.35rem; height: 1.35rem; border-radius: 999px; display: grid; place-items: center; padding: 0 0.35rem; }
.sidebar .spacer { flex: 1; }
.sidebar .me { border-top: 1px solid var(--color-divider); padding: 0.7rem 0.5rem 0.2rem; margin-top: 0.6rem; font-size: 0.85rem; }
.sidebar .me b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .ex-head { padding: 0.2rem 0.5rem 0.7rem; }
.sidebar .ex-head .name { font-family: var(--font-display); font-weight: 700; line-height: 1.25; }
.main { min-width: 0; }
.page { max-width: none; margin: 0 auto; padding: 1.6rem 1.5rem 6rem; } /* volle Bildschirmbreite am PC (Nutzervorgabe 07.11.2026) */
.page.narrow { max-width: none; } /* auch Formularseiten: volle Breite (Nutzervorgabe 07.11.2026) */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.page-head h1 { margin: 0; }
.crumb { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.25rem; }

/* In der Anwendung steht „Support“ in der Seitenleiste bzw. oben; der schwebende Knopf bleibt Anmeldung und öffentlichen Seiten vorbehalten. */
body:has(.mobile-top) .fab { display: none; }
.nav-item.m-more, .nav-item.m-only { display: none; }
.more-list { display: grid; gap: 0.5rem; }
.more-link { justify-content: flex-start; gap: 0.7rem; min-height: 48px; width: 100%; }
.more-link .badge { margin-left: auto; }
/* Knopf „Modul wechseln“ (Planung, Beobachtung, Auswertung) in der Übung */
.module-switch { display: flex; align-items: center; gap: 0.6rem; width: 100%; min-height: 48px; padding: 0.45rem 0.75rem; margin: 0 0 0.7rem; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-primary-highlight); color: var(--color-text); text-align: left; justify-content: flex-start; }
.module-switch:hover { border-color: var(--color-primary); }
.module-switch .ico { width: 1.3rem; height: 1.3rem; flex: none; color: var(--color-primary); }
.module-switch .module-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.module-switch .module-name small, .module-link .module-name small { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-text-muted); }
.module-link { align-items: flex-start; height: auto; padding: 0.7rem 1rem; text-align: left; box-sizing: border-box; max-width: 100%; border-radius: 1.1rem; } /* mehrzeilig: kein Pillenrand, damit das Symbol nicht über die Rundung ragt */
.module-link > svg, .module-link > .icon { flex: none; }
.module-link .module-name { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.module-link .module-name small { text-transform: none; letter-spacing: 0; font-weight: 400; white-space: normal; }
.module-link.primary .module-name small { color: inherit; opacity: 0.85; }
@media (max-width: 899px) { .module-switch { display: none; } }

/* Schmale Bildschirme: Leiste unten, nur Symbole + kurze Beschriftung */
@media (max-width: 899px) {
  .desktop-only { display: none !important; }
  .nav-item.m-sec { display: none; }
  .nav-item.m-more, .nav-item.m-only { display: flex; }
  .mobile-top .badge { display: none; }
  .app { display: block; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 0.25rem 0.3rem calc(0.25rem + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--glass-border); z-index: 40; overflow-x: auto; overflow-y: hidden; background: color-mix(in srgb, var(--color-bg) 88%, transparent); }
  .sidebar .brand, .sidebar .nav-title, .sidebar .spacer, .sidebar .me, .sidebar .ex-head { display: none; }
  .nav { flex-direction: row; gap: 0; width: 100%; flex: 1; justify-content: space-around; }
  .nav-item { flex-direction: column; gap: 2px; flex: 1 1 0; min-width: 0; padding: 0.35rem 0.1rem; font-size: 0.75rem; text-align: center; justify-content: center; align-items: center; width: auto; overflow: hidden; }
  .nav-item.active::before { left: 25%; right: 25%; top: 0; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .nav-item .nav-badge { position: absolute; top: 2px; right: 10px; margin: 0; }
  .nav-item .lbl { display: none; } .nav-item .lbl-s { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
  /* zweite Navigation der Administration (Zum Modul, Rundgang, Abmelden): auf dem Handy unter „Mehr“, darf der unteren Leiste keinen Platz nehmen */
  .sidebar .nav.nav-secondary { display: none; }
  .clock { font-size: 1.7rem; }
  .main .mobile-top { display: flex; }
  .page { padding: 1rem 1rem 7rem; }
}
.mobile-top { display: none; align-items: center; gap: 0.6rem; padding: 0.6rem 1rem; background: color-mix(in srgb, var(--color-bg) 80%, transparent); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); border-bottom: 1px solid var(--glass-border); position: sticky; top: var(--ticker-h, 0px); z-index: 30; }
.mobile-top img { height: 24px; width: auto; }
.mobile-top button, .mobile-top .btn { min-height: 40px; min-width: 40px; padding: 0.35rem; }
.mobile-top .title { font-family: var(--font-display); font-weight: 700; flex: 1; min-width: 0; overflow: hidden; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mobile-top .btn.small { white-space: nowrap; padding-inline: 0.8rem; }
@media (max-width: 420px) { .mobile-top { gap: 0.45rem; } .mobile-top > img { display: none; } }
/* Sprache steht auf dem Handy im Konto-Dialog (Administration: „Mehr“), damit der Name der Übung Platz hat */
.mobile-top .lang-select { display: none; }
@media (min-width: 900px) and (max-width: 1100px) { :root { --sidebar-w: 212px; } .page { padding-inline: 1.1rem; } }

/* ---- Übungsübersicht und Dashboard ---- */
.ex-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.ex-card { display: flex; flex-direction: column; gap: 0.5rem; text-decoration: none; color: inherit; cursor: pointer; }
.ex-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--color-primary) 35%, var(--glass-border)); box-shadow: var(--shadow-glow); }
.ex-card h3, .ex-card h2.h3 { margin: 0; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; color: var(--color-text-muted); font-size: 0.86rem; }
.section-title { display: flex; align-items: center; gap: 0.6rem; margin: 1.8rem 0 0.8rem; }
.section-title h2 { margin: 0; }
.section-title .count { color: var(--color-text-faint); font-weight: 700; }
.foot-link { margin-top: 2rem; text-align: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.8rem; margin-bottom: 1.1rem; }
.stat { background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 0.9rem 1.05rem; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1.05; font-weight: 800; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--color-text-muted); font-size: 0.82rem; font-weight: 500; }
/* Die laufende Übungszeit (+hh:mm:ss) ist breiter als eine normale Kachel: zwei Spalten, einzeilig, bei Platzmangel verkleinert */
.clock-now span { color: var(--color-text); }
.clock-ex span, .stat-clock b { color: var(--bad); }
.stat-clock { grid-column: span 2; container-type: inline-size; }
.stat-clock b { font-size: min(1.9rem, 14cqw); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat.bad b { background: none; color: var(--bad); } .stat.good b { background: none; color: var(--good); } .stat.warn b { background: none; color: var(--warn); }
/* Kennzahl, die die Liste darunter filtert (Lessons Learned): sieht aus wie .stat, ist aber eine Schaltfläche */
button.stat { display: block; width: 100%; text-align: left; font-weight: 500; color: inherit; border-radius: var(--radius-lg); padding: 0.9rem 1.05rem; cursor: pointer; }
button.stat:hover, button.stat:focus-visible { border-color: color-mix(in srgb, var(--color-primary) 45%, var(--glass-border)); background: var(--glass-bg-hover); }
button.linklike { min-height: 0; padding: 0; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; color: var(--color-primary); font-weight: 600; text-align: left; display: inline; }
button.linklike:hover { background: none; text-decoration: underline; }
button.linklike:disabled { color: var(--color-text-muted); text-decoration: none; cursor: default; }
.steps { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.steps button { flex: 1 1 8rem; }
.steps button.current { background: var(--gradient-primary); border-color: transparent; color: var(--on-primary); box-shadow: var(--shadow-glow); }
.dash-grid { display: grid; gap: 1rem; grid-template-columns: repeat(12, 1fr); margin-bottom: 1rem; }
.dash-grid > .span-4 { grid-column: span 4; } .dash-grid > .span-5 { grid-column: span 5; } .dash-grid > .span-6 { grid-column: span 6; } .dash-grid > .span-7 { grid-column: span 7; } .dash-grid > .span-8 { grid-column: span 8; } .dash-grid > .span-12 { grid-column: span 12; }
@media (max-width: 1000px) { .dash-grid > .span-4, .dash-grid > .span-5, .dash-grid > .span-6, .dash-grid > .span-7, .dash-grid > .span-8 { grid-column: span 12; } }
.dash-hero { padding: 1.4rem 1.5rem; background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.12), rgba(124, 58, 237, 0.08)), var(--glass-bg); }
.dash-hero h1 { margin-bottom: 0.3rem; }
.clock { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.clock small { display: block; font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--color-text-muted); margin-bottom: 0.3rem; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); animation: livepulse 1.8s infinite; margin-right: 0.45rem; vertical-align: 1px; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 80, 0.55); } 100% { box-shadow: 0 0 0 10px rgba(255, 90, 80, 0); } }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font-body); font-size: 10px; fill: var(--color-text-muted); }
.chart .bar { fill: url(#grad-bar); } .chart .bar.zero { fill: var(--color-divider); }
.chart .axis { stroke: var(--color-divider); }
.donut-wrap { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.donut-wrap svg { width: 8.5rem; height: 8.5rem; flex: none; }
.legend { display: grid; gap: 0.35rem; font-size: 0.88rem; }
.legend i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.45rem; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr auto; gap: 0.6rem; align-items: center; font-size: 0.88rem; margin-bottom: 0.45rem; }
.hbar .track { height: 0.6rem; background: var(--color-surface-offset); border-radius: 999px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--gradient-primary); border-radius: 999px; }

/* ---- Beobachten (Schnellerfassung) ---- */
.capture { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
.capture textarea.note { min-height: 9rem; font-size: 1.1rem; }
.textwrap { position: relative; }
.mic { position: absolute; right: 0.5rem; bottom: 0.5rem; min-height: 48px; min-width: 48px; border-radius: 999px; padding: 0; }
.mic.on { background: var(--bad); border-color: var(--bad); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0.5); } 100% { box-shadow: 0 0 0 14px rgba(179, 38, 30, 0); } }
.timebox { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--glass-border); border-radius: var(--radius-full); overflow: hidden; background: var(--glass-bg); }
.seg button { border: 0; border-radius: 0; background: transparent; min-height: 44px; backdrop-filter: none; }
.seg button.on { background: var(--gradient-primary); color: var(--on-primary); }
/* Viele Ansichten (Schadensdarstellung): auf dem Handy umbrechen statt abschneiden */
@media (max-width: 640px) { .seg.seg-wrap { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: var(--radius-md, 0.8rem); width: 100%; } }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip { min-height: 42px; padding: 0.35rem 0.95rem; border-radius: 999px; font-weight: 700; }
.chip .topic-ico { width: 1.15em; height: 1.15em; margin-right: 0.45rem; vertical-align: -0.2em; flex: none; }
.chip-own { display: inline-flex; align-items: center; gap: 0.15rem; }
.chip-own .chip .ico { width: 1em; height: 1em; margin-right: 0.4rem; vertical-align: -0.15em; }
.chip-del { min-height: 34px; min-width: 34px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.chip-del .ico { width: 0.95em; height: 0.95em; }
.own-add { margin-top: 0.9rem; }
.chip.on { background: var(--color-primary-highlight); border-color: var(--color-primary); color: var(--color-text); box-shadow: 0 0 0 3px var(--color-primary-highlight); }
.rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.rate button { min-height: 54px; flex-direction: column; gap: 0; font-size: 0.92rem; line-height: 1.15; border-radius: var(--radius-lg); }
.rate button.pos.on { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.rate button.neu.on { background: var(--color-surface-offset); border-color: var(--color-text-muted); }
.rate button.neg.on { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.attach { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.5rem; }
.attach .thumb { position: relative; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--glass-border); background: var(--color-surface-offset); aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 0.78rem; text-align: center; padding: 0.3rem; }
.attach .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.attach .thumb button { position: absolute; top: 3px; right: 3px; min-height: 28px; min-width: 28px; padding: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; border: 0; }
.savebar { position: sticky; bottom: 0.7rem; z-index: 5; }
@media (max-width: 899px) { .savebar { bottom: 5rem; } }
/* Speicherleiste nur bei Änderungen über dem Inhalt (Nutzerentscheidung 07.11.2026): ohne Änderung steht der Knopf am Ende der Seite */
.savebar.savebar-auto:not(.is-dirty) { position: static; }
/* Zuordnung zu Szenario/Übung und Sammelverschieben im Protokoll */
.scope-pick { padding: 0.7rem 0.8rem; border: 1px solid var(--color-primary); border-radius: var(--radius-md, 0.75rem); background: var(--color-primary-highlight); }
.scope-pick .label { margin-bottom: 0.4rem; }
.scope-pick .hint { margin-top: 0.4rem; }
.movebar { position: sticky; bottom: 0.7rem; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; margin-bottom: 0.8rem; }
.movebar[hidden] { display: none; }
.movebar select { width: auto; min-width: 9rem; flex: 1 1 9rem; }
@media (max-width: 899px) { .movebar { bottom: 5rem; } }
.tl-entry.sel-mode { margin-left: 2.1rem; }
.tl-entry.selected .tl-body { outline: 2px solid var(--color-primary); outline-offset: 4px; border-radius: 6px; }
.tl-select { position: absolute; left: -2.2rem; top: 0.15rem; display: grid; place-items: center; width: 2rem; height: 2rem; z-index: 2; }
.tl-select input { width: 1.25rem; height: 1.25rem; }
.more { border: 1px dashed var(--color-divider); border-radius: var(--radius-md); padding: 0.6rem 0.8rem; }
.more summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; gap: 0.4rem; }
.offline-bar { position: sticky; top: 0; z-index: 35; margin: 0 0 1rem; padding: 0.6rem 1rem; background: var(--warn); color: #1a1205; font-weight: 700; text-align: center; font-size: 0.9rem; border-radius: var(--radius-md); }

/* ---- Protokoll als Timeline (wie auf der Startseite) ---- */
.timeline { position: relative; margin: 0; padding: 0; }
.tl-entry { display: grid; grid-template-columns: 5.4rem 1fr; gap: 1.6rem; position: relative; padding-bottom: 1.1rem; }
.tl-entry::before { content: ''; position: absolute; left: 6.25rem; top: 26px; bottom: -4px; width: 2px; background: var(--color-divider); }
.tl-entry:last-child::before { display: none; }
.tl-entry::after {
  content: ''; position: absolute; left: 5.6rem; top: 4px; width: 22px; height: 22px; border-radius: 50%; z-index: 1;
  background-color: var(--color-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"), var(--gradient-primary);
  background-repeat: no-repeat; background-position: center; background-size: 11px 11px, 22px 22px;
  box-shadow: 0 0 0 4px var(--color-bg), 0 0 12px rgba(var(--color-primary-rgb), 0.45);
}
.tl-entry.pos::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"), linear-gradient(135deg, #1e7a34, #3fb860); box-shadow: 0 0 0 4px var(--color-bg), 0 0 12px rgba(63, 184, 96, 0.5); }
.tl-entry.neg::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v7M12 18h.01'/%3E%3C/svg%3E"), linear-gradient(135deg, #b3261e, #e5584e); box-shadow: 0 0 0 4px var(--color-bg), 0 0 12px rgba(229, 88, 78, 0.5); }
.tl-entry.milestone::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E"), var(--gradient-primary); }
.tl-entry.latest::after { animation: tl-pulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes tl-pulse { 0%, 100% { box-shadow: 0 0 0 4px var(--color-bg), 0 0 0 0 rgba(var(--color-primary-rgb), 0.5); } 50% { box-shadow: 0 0 0 4px var(--color-bg), 0 0 0 9px rgba(var(--color-primary-rgb), 0); } }
.tl-meta { text-align: right; padding-top: 2px; }
.tl-date { display: block; font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.1; font-size: 1.05rem; }
.tl-meta small { display: block; color: var(--color-text-faint); font-size: 0.75rem; margin-top: 0.15rem; }
.tl-body {
  --spot-x: 50%; --spot-y: 50%; position: relative; overflow: hidden; padding: 0.9rem 1.1rem 0.9rem 1.3rem; border-radius: var(--radius-lg);
  background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); border: 1px solid var(--glass-border);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.tl-body::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--transition-interactive); background: radial-gradient(240px circle at var(--spot-x) var(--spot-y), rgba(var(--color-primary-rgb), 0.12), transparent 60%); }
.tl-body:hover { border-color: color-mix(in srgb, var(--color-primary) 35%, var(--glass-border)); box-shadow: var(--shadow-glow); }
.tl-body:hover::before { opacity: 1; }
.tl-entry .body { white-space: pre-wrap; word-break: break-word; position: relative; padding-right: 4.5rem; }
.tl-entry .tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; position: relative; }
.tl-entry .media { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.55rem; position: relative; }
.tl-entry .media img { height: 5.5rem; width: auto; border-radius: 10px; cursor: zoom-in; border: 1px solid var(--glass-border); }
.tl-entry .media video { max-width: 100%; height: 9rem; border-radius: 10px; background: #000; }
.tl-entry .acts { position: absolute; top: 0.35rem; right: 0.35rem; z-index: 2; display: flex; gap: 0.1rem; opacity: 0.55; transition: opacity var(--transition-interactive); }
.tl-body:hover .acts, .tl-body:focus-within .acts { opacity: 1; }
@media (max-width: 560px) {
  .tl-entry { grid-template-columns: 1fr; gap: 0.3rem; padding-left: 2.1rem; }
  .tl-entry::before { left: 0.67rem; top: 20px; }
  .tl-entry::after { left: 0; top: 0; width: 20px; height: 20px; }
  .tl-meta { text-align: left; display: flex; gap: 0.6rem; align-items: baseline; padding-top: 0; }
  .tl-meta small { margin: 0; }
  /* Aktionsknöpfe in eine eigene Zeile über dem Text statt über den Text (Audit 19.10.2026, B-03); große Ziele mit Abstand, damit Löschen nicht aus Versehen getroffen wird */
  .tl-entry .acts { opacity: 1; position: static; justify-content: flex-end; gap: 0.5rem; margin: 0 0 0.4rem; }
  .tl-entry .acts button { min-width: 44px; min-height: 44px; }
  .tl-entry .body { padding-right: 0; }
}
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters select { width: auto; min-width: 9rem; }
.filters input[type=search] { flex: 1; min-width: 10rem; width: auto; }
@media (max-width: 560px) { .filters select { flex: 1 1 45%; min-width: 0; } .filters input[type=search] { flex: 1 1 100%; } }

/* ---- Tabellen ---- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.tbl th { text-align: left; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); padding: 0.5rem 0.7rem; border-bottom: 2px solid var(--color-divider); white-space: nowrap; }
.tbl td { padding: 0.7rem 0.7rem; border-bottom: 1px solid var(--color-divider); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--color-primary-highlight); }

/* ---- Wiederholungszeilen (Glossar, Gliederung) ---- */
.rep { display: grid; grid-template-columns: 1fr 2fr auto; gap: 0.5rem; margin-bottom: 0.5rem; align-items: start; }
.rep.one { grid-template-columns: 1fr auto; }
.rep.two { grid-template-columns: 1fr 1fr auto; }
@media (max-width: 640px) { .rep, .rep.two { grid-template-columns: 1fr auto; } .rep:not(.one) > :nth-child(2) { grid-column: 1; } }

/* ---- Bericht ---- */
.tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; border-bottom: 1px solid var(--color-divider); margin-bottom: 1.1rem; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; min-height: 42px; color: var(--color-text-muted); backdrop-filter: none; }
.tabs button.on { border-image: var(--gradient-primary) 1; border-bottom: 3px solid; color: var(--color-primary); }
.report-frame { width: 100%; height: 75vh; border: 1px solid var(--glass-border); border-radius: var(--radius-md); background: #fff; }
.cap-row { display: grid; grid-template-columns: 1fr; gap: 0.5rem; padding: 0.8rem 0; border-bottom: 1px solid var(--color-divider); }
.levels { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.levels button { font-weight: 700; padding-inline: 0.7rem; font-size: 0.85rem; }
.levels button.on { background: var(--gradient-primary); color: var(--on-primary); border-color: transparent; }

/* ---- Karte ---- */
.map-box { height: 22rem; border-radius: var(--radius-md); border: 1px solid var(--glass-border); z-index: 0; }
.map-box.small { height: 14rem; }
.leaflet-container { font-family: var(--font-body); z-index: 0; isolation: isolate; } /* Kartenebenen (z-index 400–1000) bleiben im eigenen Stapel und überdecken nie die feste Leiste unten (Tablet/Handy) oder Kopfzeilen (Nutzerhinweis 07.11.2026, Lagezentrum) */

/* ---- Dialoge, Meldungen, Uploads ---- */
dialog { border: 1px solid var(--glass-border); border-radius: var(--radius-lg); padding: 0; width: min(46rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); background: var(--color-surface); color: var(--color-text); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4); }
dialog::backdrop { background: rgba(8, 10, 18, 0.55); backdrop-filter: blur(4px); }
dialog .dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--color-divider); position: sticky; top: 0; background: var(--color-surface); z-index: 1; }
dialog .dlg-head h2 { margin: 0; }
dialog .dlg-body { padding: 1.1rem 1.2rem; overflow-y: auto; max-height: calc(100dvh - 9rem); }
dialog .dlg-foot { display: flex; gap: 0.6rem; justify-content: flex-end; flex-wrap: wrap; padding: 0.8rem 1.2rem; border-top: 1px solid var(--color-divider); }
dialog.fullish { width: min(64rem, calc(100vw - 1rem)); }
@media (max-width: 560px) { dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin: auto 0 0; } dialog .dlg-body { max-height: calc(100dvh - 8.5rem); } }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 5.8rem; z-index: 100; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; pointer-events: none; width: min(34rem, calc(100vw - 1.5rem)); }
@media (min-width: 900px) { .toasts { bottom: 1.5rem; } }
.toast { pointer-events: auto; background: #1b1e29; color: #fff; padding: 0.7rem 1.2rem; border-radius: var(--radius-full); box-shadow: var(--shadow-md); font-weight: 700; max-width: 100%; }
.toast.bad { background: #c62820; position: relative; cursor: pointer; padding-right: 2.4rem; }
.toast.bad::after { content: '×'; position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; line-height: 1; } .toast.good { background: #1e7a34; }
/* Papierkorb: „Gelöscht – Rückgängig“ bleibt stehen, bis angetippt (×) oder rückgängig gemacht */
.toast.undo { display: flex; align-items: center; gap: 0.6rem; padding-right: 0.5rem; }
.toast.undo span { flex: 1; }
.toast .toast-btn { background: transparent; color: #ffd36b; border: 1px solid currentColor; border-radius: var(--radius-full); padding: 0.35rem 0.9rem; font-weight: 700; min-height: 0; }
.toast .toast-x { background: transparent; color: #fff; border: 0; font-size: 1.4rem; line-height: 1; padding: 0.2rem 0.6rem; min-height: 0; }
@media (pointer: coarse) { .toast .toast-btn, .toast .toast-x { min-height: 44px; min-width: 44px; } }
.bin-open { margin-left: 1rem; }
.bin-list { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.bin-item { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0; border-bottom: 1px solid var(--color-border); }
.uploads { position: fixed; right: 0.8rem; bottom: 8.6rem; z-index: 90; width: min(22rem, calc(100vw - 1.6rem)); display: flex; flex-direction: column; gap: 0.5rem; }
@media (min-width: 900px) { .uploads { bottom: 4.6rem; } }
.upload { background: var(--color-surface); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 0.6rem 0.8rem; box-shadow: var(--shadow-md); font-size: 0.86rem; }
.progress { height: 6px; background: var(--color-surface-offset); border-radius: 999px; overflow: hidden; margin-top: 0.4rem; }
.progress > i { display: block; height: 100%; background: var(--gradient-primary); width: 0; transition: width 0.2s; }
.spinner { width: 1.1rem; height: 1.1rem; border: 3px solid var(--color-divider); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.lightbox img { max-width: 100%; max-height: 80vh; display: block; margin: 0 auto; border-radius: 10px; }

/* ---- Support-Knopf auf jeder Seite ---- */
.fab { position: fixed; right: 0.9rem; bottom: 5.4rem; z-index: 60; min-height: 48px; padding: 0.55rem 1.1rem 0.55rem 0.9rem; box-shadow: var(--shadow-glow), var(--shadow-md); }
@media (min-width: 900px) { .fab { bottom: 1rem; right: 1.2rem; } }
.fab .ico { width: 1.3rem; height: 1.3rem; }
body[data-public-page] .fab { bottom: 1rem; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }

/* ---- Umschalter Hell/Dunkel ---- */
.lang-select { min-height: 40px; max-width: 8.5rem; padding: 0.3rem 0.5rem; border-radius: 999px; font-size: 0.85rem; background-color: var(--color-surface, transparent); color: inherit; border: 1px solid var(--input-border, rgba(127,127,127,0.6)); }
.theme-toggle { min-height: 40px; min-width: 40px; padding: 0.4rem; border-radius: 50%; }
.theme-toggle .ico { width: 1.2rem; height: 1.2rem; }

/* ---- Wetter / Warnungen ---- */
.wx { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.7rem; }
.warn-item { border-left: 4px solid var(--warn); padding: 0.55rem 0.9rem; background: var(--warn-soft); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin-bottom: 0.5rem; }
.warn-item.red { border-color: var(--bad); background: var(--bad-soft); }

@media print {
  .sidebar, .mobile-top, .top-stack, .toasts, .uploads, .fab, .auth-tools, .skip-link, .filters, .acts, .page-head .row, .page-head > button, .banner, #more-older, #update-banner, .tl-entry video, .m-more, .bottom-nav, dialog:not([open]) { display: none !important; }
  .app { display: block; } body::before { display: none; }
  .banner.dmg-keep { display: block !important; border: 1px solid #aaa !important; background: #fff !important; } /* Schadensdarstellung: Anweisung, Überschneidungen und Lücken gehören auf den Ausdruck */
  body { background: #fff !important; color: #000 !important; }
  .card, .tl-entry, .card-soft { box-shadow: none !important; background: #fff !important; border: 1px solid #aaa !important; backdrop-filter: none !important; }
  .tl-entry { break-inside: avoid; page-break-inside: avoid; }
  .tbl-wrap { overflow: visible !important; }
  .tbl tr { break-inside: avoid; page-break-inside: avoid; }
  .badge { border: 1px solid #666 !important; background: #fff !important; color: #000 !important; }
  a { color: inherit !important; text-decoration: none !important; }
  @page { size: A4; margin: 14mm; }
}

/* Tabellen mit Handlungsbezug (Lessons Learned) werden auf dem Handy zu Karten statt seitlich zu scrollen. */
@media (max-width: 760px) {
  .tbl-stack thead { display: none; }
  .tbl-stack, .tbl-stack tbody, .tbl-stack tr, .tbl-stack td { display: block; width: 100%; }
  .tbl-stack tr { padding: 0.85rem 0; border-bottom: 1px solid var(--color-divider); }
  .tbl-stack tr:last-child { border-bottom: 0; }
  .tbl-stack td { border: 0; padding: 0.2rem 0; }
  .tbl-stack tbody tr:hover td { background: none; }
  .tbl-stack td[data-l]::before { content: attr(data-l); display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); margin-top: 0.3rem; }
}

/* Marke: ÜbCon One als Dach, darunter der Modulname. */
.sidebar .brand .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar .brand small { font-size: 0.75rem; font-weight: 500; color: var(--color-text-muted); letter-spacing: 0.02em; margin-top: 0.1rem; }
.login-brand h1 { line-height: 1.05; }
.login-brand h1 small { display: block; margin-top: 0.2rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }

/* Ortsschlüssel-Suche (Postleitzahl -> AGS) */
.ags-finder { margin-top: 0.6rem; padding: 0.8rem; border: 1px dashed var(--color-border); border-radius: var(--radius-md, 0.75rem); background: var(--color-primary-highlight); }
.ags-list { display: grid; gap: 0.5rem; }
.ags-item { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.5rem 0.6rem; border-radius: 0.6rem; background: var(--color-surface); border: 1px solid var(--color-border); }
.ags-result.good { color: var(--color-success, #1e7a3c); }
.ags-result.bad { color: var(--color-error, #b3261e); }

/* ---- Modul Warnung ---- */
.top-stack { position: sticky; top: 0; z-index: 40; background: var(--color-bg); } /* deckend: Inhalte laufen beim Scrollen nicht mehr sichtbar hinter Tonleiste und Warnband durch (Nutzerhinweis 07.11.2026) */
/* Fokus nicht unter der mitlaufenden Kopfleiste (WCAG 2.4.11): Platz für Tonleiste und ein sichtbares Warnband, wie scroll-padding-bottom bei der Speicherleiste */
html:has(.top-stack) { scroll-padding-top: 6rem; }
.warn-ticker { background: #b3261e; color: #fff; border-bottom: 1px solid rgba(0, 0, 0, 0.25); }
.warn-ticker[hidden] { display: none; }
.warn-ticker.acked { background: color-mix(in srgb, var(--warn) 24%, var(--color-bg)); color: var(--color-text); border-bottom-color: var(--color-border); }
.warn-ticker .wt-link { display: flex; align-items: stretch; color: inherit; text-decoration: none; min-height: 2.4rem; }
.warn-ticker .wt-label { display: flex; align-items: center; gap: 0.4rem; flex: none; padding: 0.35rem 0.8rem; font-weight: 700; background: rgba(0, 0, 0, 0.22); position: relative; z-index: 1; }
.warn-ticker.acked .wt-label { background: color-mix(in srgb, var(--warn) 30%, transparent); }
.warn-ticker .wt-view { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.warn-ticker .wt-track { display: inline-block; white-space: nowrap; padding-left: 100%; animation: wt-scroll 40s linear infinite; }
.warn-ticker .wt-link:hover .wt-track, .warn-ticker .wt-link:focus-visible .wt-track { animation-play-state: paused; }
@keyframes wt-scroll { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .warn-ticker .wt-track { animation: none; padding: 0.4rem 0.8rem; white-space: normal; }
}
dialog.warn-alert { border: 2px solid var(--bad); box-shadow: 0 24px 90px rgba(179, 38, 30, 0.45); }
dialog.warn-alert::backdrop { background: rgba(60, 8, 8, 0.65); }
dialog.warn-alert .wa-head { background: var(--bad-soft); }
dialog.warn-alert .wa-head h2 { display: flex; align-items: center; gap: 0.5rem; color: var(--bad); }
dialog.warn-alert .warn-item .row.between { gap: 0.6rem; align-items: flex-start; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.8rem; margin: 0.8rem 0; }
.ws-grid fieldset { border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: 0.5rem 0.9rem 0.6rem; margin: 0; min-width: 0; }
.ws-grid fieldset:disabled { opacity: 0.5; }
.ws-grid legend { font-weight: 700; font-size: 0.85rem; padding: 0 0.4rem; }
@media (prefers-reduced-motion: no-preference) { dialog.warn-alert[open] { animation: wa-pulse 1.6s ease-in-out infinite; } }
@keyframes wa-pulse { 50% { box-shadow: 0 24px 90px rgba(179, 38, 30, 0.8); } }

/* Balkenlisten (Auswertung) */
.barlist { display: grid; gap: 0.45rem; margin-top: 0.6rem; }
.barrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; font-size: 0.92rem; }
.barrow .bar { display: block; height: 0.6rem; border-radius: 999px; background: var(--color-primary-highlight); overflow: hidden; }
.barrow .bar i { display: block; height: 100%; background: var(--color-primary); border-radius: 999px; }

/* Touch-Geräte: Tippflächen mindestens 44 × 44 px */
@media (pointer: coarse) {
  button, .btn, summary, select, .chip { min-height: 44px; }
  button.small, .btn.small, button.ghost.icon.small { min-height: 44px; }
  button.ghost.icon, button.ghost.icon.small { min-width: 44px; }
  summary { display: flex; align-items: center; }
  .leaflet-touch .leaflet-bar a { width: 40px !important; height: 40px !important; line-height: 40px !important; }
  #forgot-link, #not-customer-link, .crumb a { display: inline-block; padding: 0.7rem 0; }
}
.tiny { font-size: 0.8rem; }

@media (pointer: coarse) { .more summary { min-height: 44px; } }
/* Allein stehende Links (nicht im Fließtext): ausreichend hoch zum Tippen */
.tap { display: inline-block; padding: 0.55rem 0; }

.skip-link { position: fixed; left: 0.8rem; top: -4rem; z-index: 100; padding: 0.6rem 1rem; border-radius: var(--radius-md); background: var(--color-primary); color: var(--on-primary); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 0.8rem; }

/* ---- Rundgang (tour.js): Spotlight um ein Element + Erklärung ---------------------------------------------------------- */
.tour-shade { position: fixed; inset: 0; z-index: 9998; background: transparent; }
.tour-spot { position: fixed; z-index: 9999; border-radius: var(--radius-md); pointer-events: none;
  box-shadow: 0 0 0 3px var(--color-primary), 0 0 0 9999px rgba(8, 9, 13, 0.6); transition: top 220ms, left 220ms, width 220ms, height 220ms; }
.tour-spot.no-motion { transition: none; }
.tour-tip { position: fixed; z-index: 10000; width: min(24rem, calc(100vw - 1.5rem)); box-sizing: border-box; padding: 1.1rem 1.25rem; border-radius: var(--radius-lg);
  background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-md); border: 1px solid var(--color-border); }
.tour-tip h2 { margin: 0 0 0.4rem; font-family: var(--font-display); font-size: 1.1rem; }
.tour-tip p { margin: 0 0 0.9rem; color: var(--color-text-muted); font-size: 0.92rem; line-height: 1.5; }
.tour-controls { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.tour-progress { font-size: 0.8rem; color: var(--color-text-faint); }
.tour-buttons { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tour-buttons button { min-height: 2.5rem; }
.tour-buttons .tour-skip { background: none; border: none; color: var(--color-text-muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 0.4rem 0.6rem; }
.tour-buttons .tour-skip:hover { color: var(--color-primary); }
@media print { .tour-shade, .tour-spot, .tour-tip { display: none; } }

/* Hilfsklassen für ehemalige style-Attribute (die CSP erlaubt keine Inline-Stile). Sie stehen am
   Dateiende, damit sie bei gleicher Spezifität gewinnen; wo eine Komponentenregel mit höherer Spezifität sonst gewänne
   (früher setzte sich das Inline-Attribut durch), steht !important. Neue Stile gehören in eigene Klassen oberhalb. */
.u-3adb2a2b { padding: 0.45rem 0; border-bottom: 1px solid var(--color-divider); }
.u-94066652 { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.u-a40a4fdf { grid-template-columns: repeat(3,1fr); margin: 0.6rem 0 0.8rem; }
.u-align-items-flex-end_flex-wrap-wrap_gap-0p6rem { align-items: flex-end; flex-wrap: wrap; gap: 0.6rem; }
.u-align-items-flex-start_padding-0p3rem0 { align-items: flex-start; padding: 0.3rem 0; }
.u-color-var--primary_font-weight-700 { color: var(--primary); font-weight: 700; }
.u-cursor-default { cursor: default; }
.u-d3fddb56 { font-size: 1.5rem; letter-spacing: 0.4em; text-align: center; }
.u-d4d04cb3 { font-family: var(--font-display); font-weight: 800; font-size: 8px; fill: var(--color-text); }
.u-display-block_margin-top-0p5rem { display: block; margin-top: 0.5rem; }
.u-display-contents { display: contents; }
.u-display-grid_align-content-center_gap-0p8rem { display: grid; align-content: center; gap: 0.8rem; }
.u-e012cb12 { text-decoration: none; color: inherit; padding: 0.5rem 0; border-bottom: 1px solid var(--color-divider); }
.u-e6aa2a05 { grid-template-columns: repeat(4,1fr); margin: 0.6rem 0 0; }
.u-ed6f43d1 { padding: 0.35rem 0; border-bottom: 1px solid var(--color-divider); }
.u-f03cff4a { font-family: var(--font-display); letter-spacing: 0.04em; }
.u-f718a03b { max-width: 16rem; margin: 0.6rem auto; background: #fff; padding: 0.5rem; border-radius: 0.5rem; }
.u-flex-1 { flex: 1 !important; }
.u-flex-1_min-width-12rem { flex: 1; min-width: 12rem; }
.u-flex-1_min-width-14rem { flex: 1; min-width: 14rem; }
.u-flex-wrap-nowrap { flex-wrap: nowrap; }
.u-font-family-monospace_font-size-0p85rem { font-family: monospace; font-size: 0.85rem; }
.u-font-family-var--font-display { font-family: var(--font-display); }
.u-gap-0p35rem_flex-none { gap: 0.35rem; flex: none; }
.u-gap-0p4rem_flex-wrap-wrap { gap: 0.4rem; flex-wrap: wrap; }
.u-gap-0p5rem_flex-wrap-wrap { gap: 0.5rem; flex-wrap: wrap; }
.u-justify-content-center { justify-content: center; }
.u-margin--0p4rem00p9rem { margin: -0.4rem 0 0.9rem; }
.u-margin-0 { margin: 0; }
.u-margin-0_flex-2_min-width-12rem { margin: 0; flex: 2; min-width: 12rem; }
.u-margin-0_padding-left-1p1rem { margin: 0; padding-left: 1.1rem; }
.u-margin-0_width-8rem { margin: 0; width: 8rem; }
.u-margin-000p8rem_padding-0_list-style-none { margin: 0 0 0.8rem; padding: 0; list-style: none; }
.u-margin-0p5rem00 { margin: 0.5rem 0 0; }
.u-margin-0p6rem00 { margin: 0.6rem 0 0; }
.u-margin-0p6rem00_padding-left-1p1rem { margin: 0.6rem 0 0; padding-left: 1.1rem; }
.u-margin-1rem0 { margin: 1rem 0; }
.u-margin-bottom-0 { margin-bottom: 0; }
.u-margin-bottom-0p2rem { margin-bottom: 0.2rem; }
.u-margin-bottom-0p3rem { margin-bottom: 0.3rem; }
.u-margin-bottom-0p4rem { margin-bottom: 0.4rem; }
.u-margin-bottom-0p5rem { margin-bottom: 0.5rem; }
.u-margin-bottom-0p6rem { margin-bottom: 0.6rem; }
.u-margin-bottom-0p7rem { margin-bottom: 0.7rem; }
.u-margin-bottom-0p8rem { margin-bottom: 0.8rem; }
.u-margin-bottom-0p9rem { margin-bottom: 0.9rem; }
.u-margin-bottom-1rem { margin-bottom: 1rem; }
.u-margin-bottom-1rem_padding-0p8rem1p1rem { margin-bottom: 1rem; padding: 0.8rem 1.1rem; }
.u-margin-top-0 { margin-top: 0; }
.u-margin-top-0p2rem { margin-top: 0.2rem !important; }
.u-margin-top-0p3rem { margin-top: 0.3rem; }
/* ---- Drehbuch, Planung, Auswertung -------------------------------------------------------------------------------------- */
/* Sichtungsfarben nach BBK (SK I rot, II gelb, III grün, IV blau, Tote schwarz); Betroffene hellgrau (Gestaltungsentscheidung; deutlich unterscheidbar von Tote schwarz).
   Feste Farben, unabhängig vom Design; Kürzel und Zahl stehen immer dabei. */
.sk-row, .sk-legend { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.sk { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.6rem; border-radius: var(--radius-full); font-size: 0.8rem; border: 1px solid transparent; white-space: nowrap; }
.sk b { font-weight: 800; }
.sk-1 { background: #c62828; color: #fff; } .sk-2 { background: #f9c80e; color: #1a1a1a; } .sk-3 { background: #2e7d32; color: #fff; }
.sk-4 { background: #1565c0; color: #fff; } .sk-dead { background: #111; color: #fff; border-color: #888; } .sk-aff { background: #e5e7eb; color: #1f2937; border-color: #9ca3af; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.6rem; }
.sk-field { border-left: 6px solid transparent; padding-left: 0.5rem; }
.sk-field.sk-1 { border-left-color: #c62828; background: none; } .sk-field.sk-2 { border-left-color: #f9c80e; background: none; } .sk-field.sk-3 { border-left-color: #2e7d32; background: none; }
.sk-field.sk-4 { border-left-color: #1565c0; background: none; } .sk-field.sk-dead { border-left-color: #111; background: none; } .sk-field.sk-aff { border-left-color: #c4c8cf; background: none; }
.sk-field.sk-dead, .sk-field.sk-aff, .sk-field.sk-1, .sk-field.sk-2, .sk-field.sk-3, .sk-field.sk-4 { color: inherit; }
.msel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 0.8rem; }
.msel-list .card { margin: 0; }
.msel { display: flex; flex-direction: column; gap: 0.5rem; cursor: default; }
.msel-head { display: flex; align-items: baseline; gap: 0.5rem; }
.msel-head h3 { margin: 0; overflow-wrap: anywhere; }
.msel-no { font-weight: 800; color: var(--color-primary); min-width: 1.6rem; }
.msel-times { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; color: var(--color-text-muted); }
.msel-off { opacity: 0.6; }
.msel-regie { margin: 0; }
/* Drehbuch am Handy (Funktionstest 08.11.2026, F5): Karte zeigt Kopf, Sichtung und Zuordnung; Details auf Wunsch. Am PC bleibt alles offen. */
.msel-body { display: flex; flex-direction: column; gap: 0.5rem; }
.msel-more { display: none; align-self: flex-start; }
@media (max-width: 640px) {
  .msel:not(.is-open) .msel-body { display: none; }
  .msel-more { display: inline-flex; }
  .msel .msel-btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Schadensdarstellung (public/modul-schaden.js): Materialzeilen, Packliste mit Kästchen zum Abhaken auf Papier, Überschneidungen im Aufbauplan */
.dmg-mats, .dmg-sum { list-style: none; padding: 0; margin: 0.4rem 0; display: grid; gap: 0.35rem; }
.dmg-mat { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; justify-content: space-between; }
.dmg-mat-name { flex: 1 1 12rem; overflow-wrap: anywhere; }
.dmg-mat-st { width: auto; min-width: 9rem; }
.dmg-row { display: grid; grid-template-columns: minmax(8rem, 3fr) minmax(4rem, 1fr) minmax(4rem, 1fr) minmax(7rem, 1.4fr) minmax(8rem, 2fr) auto; gap: 0.4rem; margin-bottom: 0.4rem; align-items: center; }
@media (max-width: 760px) { .dmg-row { grid-template-columns: 1fr 1fr; } .dmg-row .dm-m-art, .dmg-row .dm-m-note { grid-column: 1 / -1; } }
.print-only { display: none; }
.dmg-pack { margin: 0; }
.dmg-order + .dmg-order { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--color-divider); }
.dmg-order-item { padding: 0.6rem 0; border-bottom: 1px dashed var(--color-divider); }
.dmg-order-item h4 { margin: 0 0 0.2rem; }
.dmg-print-note { font-weight: 700; border: 1px solid #000; padding: 0.3rem 0.5rem; }
@media print { .print-only { display: block !important; } span.print-only { display: inline-block !important; } .screen-only { display: none !important; } .dmg-order + .dmg-order { break-before: page; border-top: 0; } }
.dmg-box { display: inline-block; width: 1rem; height: 1rem; border: 2px solid var(--color-text); border-radius: 0.2rem; vertical-align: middle; }
.dmg-conflict td { background: var(--bad-soft); }
.plan-checks { list-style: none; padding: 0; margin: 0.6rem 0; display: grid; gap: 0.35rem; }
.plan-checks li { display: flex; align-items: flex-start; gap: 0.6rem; }
.plan-checks li.open a { color: inherit; text-decoration: underline; text-decoration-color: var(--warn); text-underline-offset: 0.2em; }
@media (pointer: coarse) { .plan-checks li.open a { display: inline-flex; align-items: center; min-height: 44px; } }
.plan-checks li.ok .plan-mark { color: var(--good); } .plan-checks li.open .plan-mark { color: var(--warn); }
.plan-mark { font-weight: 800; width: 1.3rem; flex: none; text-align: center; }
/* Neue Übung: selten sofort nötige Angaben eingeklappt (Gesamtaudit Planung 07.11.2026) */
.plan-done > summary { cursor: pointer; color: var(--muted); padding: 0.7rem 0; }
.more-fields { margin: 0.4rem 0 1rem; }
.more-fields > summary { cursor: pointer; font-weight: 700; padding: 0.7rem 0; min-height: 44px; }
.more-fields[open] > summary { margin-bottom: 0.4rem; }
.att-box .attach .thumb a { color: inherit; text-decoration: none; }
.att-box .att-file { display: grid; place-items: center; gap: 0.1rem; word-break: break-all; }
.att-box .att-file small { color: var(--color-text-muted); }
.hw-entry { padding: 0.6rem 0; border-bottom: 1px solid var(--color-divider); display: grid; gap: 0.4rem; }
.hw-entry:last-child { border-bottom: 0; }
.hw-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.as-item { padding: 0.7rem 0; border-bottom: 1px solid var(--color-divider); display: grid; gap: 0.45rem; }
.as-item:last-child { border-bottom: 0; }
.as-note { width: 100%; }
.chip.as-good.on { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.chip.as-warn.on { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.chip.as-bad.on { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.fb-q { border: 0; padding: 0; margin: 0 0 1rem; }
.fb-q legend { font-weight: 700; margin-bottom: 0.4rem; }
.fb-opt { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.fb-opt input { width: auto; min-height: 0; }
.fb-scale { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.2rem; }
.bezug .grid2 { gap: 0.5rem; }
.u-margin-0p5rem000_padding-left-1p2rem { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.u-margin-top-0p4rem { margin-top: 0.4rem; }
.u-margin-top-0p5rem { margin-top: 0.5rem; }
.u-margin-top-0p6rem { margin-top: 0.6rem; }
.u-margin-top-0p8rem { margin-top: 0.8rem; }
.u-margin-top-1p1rem { margin-top: 1.1rem; }
.u-margin-top-1p5rem { margin-top: 1.5rem; }
.u-margin-top-1rem { margin-top: 1rem; }
.u-margin-top-auto { margin-top: auto; }
.u-max-width-14rem { max-width: 14rem; }
.u-max-width-8rem_padding-0p2rem { max-width: 8rem; padding: 0.2rem; }
.u-min-height-4p5rem { min-height: 4.5rem; }
.u-min-height-4rem { min-height: 4rem; }
.u-min-height-5rem { min-height: 5rem; }
.u-min-height-6rem { min-height: 6rem; }
.u-min-height-9rem { min-height: 9rem; }
.u-min-width-0 { min-width: 0; }
.u-padding-0p5rem0 { padding: 0.5rem 0; }
.u-padding-0p5rem0p4rem { padding: 0.5rem 0.4rem; }
.u-padding-1rem { padding: 1rem; }
.u-text-align-center { text-align: center; }
.u-text-align-center_margin-0p8rem00 { text-align: center; margin: 0.8rem 0 0; }
.u-text-align-center_margin-0p9rem00 { text-align: center; margin: 0.9rem 0 0; }
.u-text-align-center_margin-top-0p8rem { text-align: center; margin-top: 0.8rem; }
.u-text-align-right { text-align: right; }
.u-white-space-nowrap { white-space: nowrap; }
.u-white-space-pre-wrap { white-space: pre-wrap; }
.u-white-space-pre-wrap_margin-0p6rem00 { white-space: pre-wrap; margin: 0.6rem 0 0; }
.u-width-auto { width: auto; }
.u-width-auto_flex-1_min-width-10rem { width: auto !important; flex: 1 !important; min-width: 10rem !important; }
.u-word-break-break-all_font-family-monospace { word-break: break-all; font-family: monospace; }
.u-max-height-14rem_overflow-y-auto { max-height: 14rem; overflow-y: auto; }
.hash { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; word-break: break-all; }
/* Drehbuch mehrtägiger Übungen: Überschrift je Übungstag über die ganze Breite */
.msel-day { grid-column: 1 / -1; margin: 0.6rem 0 0; font-size: 1.05rem; }
.msel-day:first-child { margin-top: 0; }
.u-nowrap { white-space: nowrap; }
/* Dashboard: Weitermachen, wo du warst */
.resume-card { display: flex; align-items: center; gap: 0.8rem; margin-top: 1rem; text-decoration: none; color: inherit; }
.resume-card > span { flex: 1; min-width: 0; }
.resume-card small { display: block; }
.resume-card:hover { border-color: var(--color-primary, currentColor); }
/* Drehbuch-Import aus Excel/CSV */
.imp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 0.4rem 0.8rem; }
.imp-grid .field { margin: 0; }
.tbl tr.imp-bad td { color: var(--color-danger, #b42318); }
/* Drehbuch als Zeitstrahl (Positionen setzt modul-plan.js über style.left/top/width) */
.msel-tl .tl-day { margin-top: 0.8rem; }
.tl-track { position: relative; min-height: 6rem; margin-top: 0.4rem; border: 1px solid var(--glass-border); border-radius: var(--radius-md, 12px); background: var(--glass-bg); overflow-x: auto; overflow-y: hidden; }
.tl-tick { position: absolute; top: 0; bottom: 0; padding: 0.2rem 0.3rem; border-left: 1px dashed var(--glass-border); font-size: 0.75rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.tl-item { position: absolute; height: 2.9rem; min-width: 8rem; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.8rem; line-height: 1.15; text-align: left; overflow: hidden; white-space: nowrap; cursor: pointer; z-index: 1; min-height: 0; }
.tl-item .tl-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tl-item small { color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.tl-item[data-drag] { cursor: grab; touch-action: none; }
.tl-item.is-dragging { cursor: grabbing; z-index: 3; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.tl-item.tl-eingespielt { opacity: 0.75; border-style: dashed; }
.tl-item.tl-entfallen { opacity: 0.45; text-decoration: line-through; }
.tl-item.is-overlap { outline: 2px solid var(--color-danger, #b42318); outline-offset: -2px; }
.tl-item:focus-visible { outline: 3px solid var(--color-primary, #3854d6); outline-offset: 2px; z-index: 2; }
.more-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--color-border); }

/* ---- Mehrsprachigkeit (public/i18n.js): Seite verbergen, bis das Wörterbuch geladen ist (höchstens 3 s) ---- */
html.i18n-pending body { visibility: hidden; }
html:has(.savebar:not(.savebar-auto)), html:has(.savebar-auto.is-dirty) { scroll-padding-bottom: 5.5rem; }
/* ---- Schmale Bildschirme und Touch: Tippflächen mind. 40 px, nichts verdeckt Eingaben ---- */
@media (max-width: 899px), (pointer: coarse) {
  button.small.icon, .btn.small.icon { min-width: 40px; min-height: 40px; }
  .chip-del { min-height: 40px; min-width: 40px; }
}
@media (max-width: 899px) {
  /* Sprache und Hell/Dunkel auf Anmeldeseiten im Fluss statt schwebend über den Feldern */
  .auth-tools { position: static; justify-content: flex-end; padding: 0.8rem 0.8rem 0; }
  .auth-tools + .login-wrap { min-height: calc(100dvh - 3.5rem); }
  /* Support-Knopf auf öffentlichen Seiten unten im Fluss – verdeckt keine Einwilligungstexte und Kacheln */
  body[data-public-page] .fab { position: static; display: flex; width: fit-content; margin: 0.4rem auto 1.6rem; box-shadow: var(--shadow-sm); }
  /* feste Speicherleiste: Platz am Ende, Fokus nicht unter der Leiste */
  .page:has(.savebar:not(.savebar-auto)), .page:has(.savebar-auto.is-dirty) { padding-bottom: 10rem; }
  html:has(.savebar:not(.savebar-auto)), html:has(.savebar-auto.is-dirty) { scroll-padding-bottom: 10rem; }
}
.join-message:empty { display: none; }
.join-message .banner { margin: 0.6rem 0; }
#stabsraum [aria-invalid='true'] { border-color: var(--bad); }
.u-list-plain { list-style: none; padding: 0; margin: 0; }
.lesson-file { display: inline-flex; align-items: center; gap: 0.45rem; word-break: break-all; }
.lesson-file small { color: var(--color-text-muted); }

/* Wechsel hell/dunkel: kreisförmige Enthüllung von der Klickstelle aus (wie uebcon.org; Steuerung in theme.js) */
html.is-theme-transition::view-transition-old(root),
html.is-theme-transition::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.is-theme-transition::view-transition-new(root) { animation: theme-reveal 0.6s ease; clip-path: circle(0px at var(--theme-x, 50%) var(--theme-y, 50%)); }
@keyframes theme-reveal { to { clip-path: circle(var(--theme-radius, 150%) at var(--theme-x, 50%) var(--theme-y, 50%)); } }
@media (prefers-reduced-motion: reduce) { html.is-theme-transition::view-transition-new(root) { animation: none; clip-path: none; } }

/* Handy: volle Bildschirmbreite – schmale Seitenränder, Karten mit weniger Innenabstand (Nutzervorgabe 18.10.2026) */
@media (max-width: 640px) {
  .page { padding: 1rem 0.5rem 6rem; }
  .card { padding: 0.9rem 0.75rem; border-radius: var(--radius); }
}

/* Touch-Geräte (Audit 19.10.2026, B-05): Kontrollkästchen und Beschriftungen als große Tippfläche; allein stehende Links ausreichend hoch */
@media (pointer: coarse) {
  input[type='checkbox'], input[type='radio'] { width: 1.5rem; height: 1.5rem; }
  label.check { min-height: 44px; align-items: center; }
  .mobile-top button, .mobile-top .btn, .mobile-top a, a.ghost, button.ghost, a.tap { min-height: 44px; min-width: 44px; }
  a.tap { padding: 0.8rem 0.2rem; }
  .login-foot a, .legal a, footer a { display: inline-block; padding: 0.7rem 0.2rem; }
}

/* Vorwarnung vor dem Ende der Anmeldung (sitzung.js) */
.ubo-sitzung-hint { position: fixed; top: 0.6rem; left: 50%; transform: translateX(-50%); z-index: 3100; width: min(40rem, calc(100vw - 1.2rem)); display: flex; gap: 0.7rem; align-items: center; justify-content: space-between; padding: 0.6rem 0.9rem; border-radius: 0.9rem; background: #7a4b00; color: #fff; font-weight: 600; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); }
.ubo-sitzung-hint[hidden] { display: none; }
.ubo-sitzung-hint button { flex: none; }

/* Sendestatus-Leiste (sendestatus.js) */
.ubo-send-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 3050; display: flex; gap: 0.7rem; align-items: center; justify-content: center; padding: 0.35rem 0.8rem; background: #7a4b00; color: #fff; font-weight: 600; font-size: 0.85rem; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.ubo-send-bar[hidden] { display: none; }
.ubo-send-bar.is-bad { background: #b3261e; }
.ubo-send-bar.is-ok { background: #1e7a34; }
.ubo-send-bar button { flex: none; }
body:has(.ubo-send-bar:not([hidden])) .ubo-sitzung-hint { top: 3rem; }

/* Liniendiagramme (Lessons Learned, Vergleich): Farben über Klassen, zusätzlich unterschiedliche Strichart für Farbfehlsichtigkeit */
.linechart { width: 100%; height: auto; display: block; }
.linechart .lc-grid { stroke: var(--color-divider); stroke-width: 1; }
.linechart .lc-tick { fill: var(--color-text-muted); font-size: 11px; }
.lc-s0 { --lc: #3854d6; } .lc-s1 { --lc: #d9453b; } .lc-s2 { --lc: #2e9f55; } .lc-s3 { --lc: #b7791f; } .lc-s4 { --lc: #7c3aed; } .lc-s5 { --lc: #0e8aa3; }
.lc-line { fill: none; stroke: var(--lc); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.lc-line.lc-s1 { stroke-dasharray: 7 4; } .lc-line.lc-s2 { stroke-dasharray: 2 4; } .lc-line.lc-s3 { stroke-dasharray: 10 3 2 3; } .lc-line.lc-s4 { stroke-dasharray: 5 2; } .lc-line.lc-s5 { stroke-dasharray: 1 3; }
.lc-dot { fill: var(--lc); stroke: var(--color-surface, #fff); stroke-width: 1.5; }
.lc-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.4rem; font-size: 0.85rem; }
.lc-key { display: inline-flex; align-items: center; gap: 0.35rem; }
.lc-sw { display: inline-block; width: 0.9rem; height: 0.35rem; border-radius: 999px; background: var(--lc); }
.linechart { max-width: 70rem; }
.tbl-cmp th { white-space: normal; vertical-align: bottom; hyphens: auto; overflow-wrap: break-word; font-size: 0.7rem; }
.tbl-cmp th, .tbl-cmp td { padding-inline: 0.4rem; }
.tbl-cmp td:first-child { min-width: 9rem; }
/* Vergleich: Kurzfassung oben, Abschnitte darunter einklappbar (Nutzerauftrag 07.11.2026, Vorschlag 6) */
.cmp-short-list { margin: 0.4rem 0 0.8rem; padding-left: 1.1rem; display: grid; gap: 0.35rem; }
.cmp-det > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.cmp-det > summary::-webkit-details-marker { display: none; }
.cmp-det > summary::after { content: '+'; margin-inline-start: auto; font-weight: 700; font-size: 1.2rem; color: var(--muted); }
.cmp-det[open] > summary::after { content: '–'; }
.cmp-det > summary h2 { margin: 0; }
.cmp-det[open] > summary { margin-bottom: 0.6rem; }
.tbl-plan th, .tbl-plan td { vertical-align: top; }

/* Gefährdungsbeurteilung (public/modul-gbu.js): Matrix mit Ampelfarben (Farbe nie allein – Punktwert und Wort stehen dabei) */
.gbu-scope { min-width: 14rem; margin: 0; }
.gbu-matrix th, .gbu-matrix td { text-align: center; font-size: 0.8rem; }
.gbu-cell { white-space: nowrap; }
.gbu-cell.gbu-gering { background: var(--good-soft); }
.gbu-cell.gbu-mittel { background: var(--warn-soft); }
.gbu-cell.gbu-hoch { background: var(--bad-soft); }
.gbu-score { font-weight: 700; }
.gbu-count { display: inline-block; min-width: 1.4rem; padding: 0 0.3rem; border-radius: var(--radius-full); background: var(--color-text); color: var(--color-bg); }
.gbu-factor { display: grid; gap: 0.3rem; padding: 0.6rem 0; border-bottom: 1px solid var(--glass-border); }
.gbu-factor:last-child { border-bottom: 0; }
.gbu-measure { border-left: 3px solid var(--glass-border); padding-left: 0.8rem; margin: 0.5rem 0; }
.gbu-inherited, .gbu-versions { list-style: none; padding: 0; margin: 0.4rem 0; display: grid; gap: 0.4rem; }
.gbu-inherited li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.gbu-pick { display: grid; gap: 0.1rem; max-height: 14rem; overflow: auto; }
.gbu-risk fieldset { margin-bottom: 0.6rem; }
.gbu-risk fieldset select { margin-bottom: 0.3rem; }
.gbu-level-l { display: block; font-size: 0.85rem; font-weight: 600; margin: 0.2rem 0 0.15rem; }

/* Fähigkeiten im Verlauf: Farbtabelle in Klartext (Farbe nie allein, immer mit Text) */
.tbl-heat th, .tbl-heat td { text-align: center; }
.tbl-heat th:first-child, .tbl-heat td:first-child { text-align: left; }
.tbl-heat .heat { font-size: 0.8rem; font-weight: 600; line-height: 1.25; min-width: 6.5rem; }
.tbl-heat .lv-P { background: var(--good-soft); }
.tbl-heat .lv-S { background: var(--warn-soft); }
.tbl-heat .lv-M { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.tbl-heat .lv-U { background: color-mix(in srgb, var(--bad) 34%, transparent); }
.tbl-heat .lv-none { color: var(--color-text-muted); }

/* Maßnahmen-Dashboard (public/modul-massnahmen.js): Eisenhower-Matrix, Fristen, Fortschritt */
.mx-grid { display: grid; gap: 0.8rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .mx-grid { grid-template-columns: 1fr; } }
/* Interaktive Eisenhower-Matrix: Achsen, Ziehen und Ablegen, Auswahl zum Verschieben */
.mx-eis { display: grid; grid-template-columns: 1.6rem 1fr; grid-template-areas: ". top" "side grid" ". hint"; gap: 0.3rem 0.4rem; }
.mx-eis > .mx-grid { grid-area: grid; }
.mx-ax-top { grid-area: top; display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; text-align: center; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.mx-ax-side { grid-area: side; display: grid; grid-template-rows: 1fr 1fr; gap: 0.8rem; }
.mx-ax-side span { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.mx-pick-hint { grid-area: hint; }
@media (max-width: 700px) { .mx-eis { grid-template-columns: 1fr; grid-template-areas: "grid" "hint"; } .mx-ax-top, .mx-ax-side { display: none; } }
.mx-q { transition: box-shadow 0.15s ease, transform 0.15s ease; }
.mx-q.is-over { box-shadow: 0 0 0 3px var(--color-primary); transform: scale(1.01); }
.mx-eis.is-picking .mx-q { outline: 2px dashed color-mix(in srgb, var(--color-primary) 45%, transparent); outline-offset: -4px; }
.mx-row { display: flex; align-items: stretch; gap: 0.3rem; border-radius: var(--radius-md, 0.6rem); }
.mx-row[draggable="true"] { cursor: grab; }
.mx-row.is-dragging { opacity: 0.45; }
.mx-row.is-picked { box-shadow: 0 0 0 2px var(--color-primary); }
.mx-row .mx-item { flex: 1 1 auto; }
.mx-move { flex: none; min-width: 44px; }
.mx-drop-here { width: 100%; margin: 0.5rem 0 0.2rem; min-height: 44px; border-style: dashed; }
@media (prefers-reduced-motion: reduce) { .mx-q { transition: none; } .mx-q.is-over { transform: none; } }
.mx-q { margin: 0; border-top: 4px solid var(--glass-border); }
.mx-q.mx-sofort { border-top-color: var(--bad); }
.mx-q.mx-planen { border-top-color: var(--warn); }
.mx-q.mx-delegieren { border-top-color: var(--color-primary); }
.mx-q.mx-spaeter { border-top-color: var(--good); }
.mx-list { display: grid; gap: 0.35rem; margin-top: 0.5rem; }
.mx-item { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; text-align: left; width: 100%; min-height: 44px; padding: 0.4rem 0.6rem; }
.mx-title { flex: 1 1 12rem; font-weight: 600; }
.mx-tl { margin-bottom: 0.6rem; display: grid; gap: 0.3rem; }
.mx-bar { height: 0.6rem; border-radius: var(--radius-full); background: var(--color-surface-offset); overflow: hidden; margin: 0.4rem 0 0.2rem; }
.mx-bar span { display: block; height: 100%; background: var(--good); }
/* GBU: Sicherheitsangaben aus dem Mimenmanagement */
.gbu-mimen ul { list-style: none; padding: 0; margin: 0.3rem 0; display: grid; gap: 0.2rem; }
.gbu-mimen li { display: flex; align-items: center; gap: 0.35rem; }
.gbu-mimen .gbu-mimen-gap { color: var(--warn-text, #8a5a00); }

/* Maßnahmen-Dashboard: Tabelle „Verantwortliche“ – Kopfzeilen dürfen umbrechen (Befund A9, sonst abgeschnitten) */
.mx-people th { white-space: normal; }
/* Prüfliste „Wirksamkeit prüfen“ im Lessons-Learned-Reiter der Übung */
.vlist { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.vlist > li { padding: 0.6rem 0; border-bottom: 1px solid var(--color-divider); align-items: flex-start; gap: 0.8rem; }

/* Mimen-Besetzung: Menschen-Symbol unten rechts an Einspielungen und Szenarien (grün = alle da/eingeteilt, rot = weniger als geplant) */
.has-staff { position: relative; }
.mimen-staff { position: absolute; right: 0.55rem; bottom: 0.5rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: help; border: 0; padding: 0; }
.mimen-staff-mark { position: absolute; top: -0.2rem; right: -0.2rem; min-width: 0.95rem; height: 0.95rem; border-radius: 50%; background: var(--bad, #b42318); color: #fff; font-size: 0.7rem; line-height: 0.95rem; text-align: center; font-weight: 800; }
.mimen-staff .ico { width: 1.15rem; height: 1.15rem; }
.mimen-staff.ok { background: var(--good-soft, #e3f4e8); color: var(--good, #1f7a3a); }
.mimen-staff.short { background: var(--bad-soft, #fbe4e4); color: var(--bad, #b42318); }
.mimen-staff:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
/* Symbol über der Knopfzeile der Karte halten und Platz dafür lassen (vorher verdeckte die Zeile das Symbol – nicht antippbar) */
.mimen-staff { z-index: 2; cursor: pointer; }
.has-staff > .row:last-child { padding-right: 2.6rem; }
@media (pointer: coarse) { .mimen-staff { width: 2.75rem; height: 2.75rem; } .has-staff > .row:last-child { padding-right: 3.2rem; } }

/* GBU-Reiter (Überarbeitung 07.11.2026): Schritte, Seitenspalte, aufklappbare Gefährdungen, filterbare Matrix */
.u-rotate-180 { transform: rotate(180deg); }
.gbu-layout { display: grid; gap: 1rem; }
@media (min-width: 1100px) {
  .gbu-layout { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; }
  .gbu-aside { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
}
.gbu-main { min-width: 0; }
.gbu-steps { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; }
.gbu-step { display: inline-flex; align-items: center; gap: 0.35rem; }
.gbu-step.is-active { border-color: var(--color-primary); color: var(--color-primary); box-shadow: inset 0 -3px 0 var(--color-primary); }
.gbu-risk > summary.gbu-risk-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem; cursor: pointer; list-style: none; min-height: 44px; align-items: center; }
.gbu-risk > summary.gbu-risk-sum::-webkit-details-marker { display: none; }
.gbu-risk[open] > summary.gbu-risk-sum { margin-bottom: 0.6rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 0.5rem; }
.gbu-risk-meta { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.gbu-cellbtn { min-height: 0; padding: 0.15rem 0.35rem; border: 1px solid transparent; background: none; font: inherit; cursor: pointer; }
.gbu-cellbtn.is-active { border-color: var(--color-text); }
.gbu-savebar { display: flex; justify-content: flex-end; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.gbu-diff { margin: 0.4rem 0; padding-left: 1rem; display: grid; gap: 0.3rem; }
@media (pointer: coarse) { .gbu-cellbtn { min-height: 44px; min-width: 44px; } .gbu-factor .check, .gbu-risk .check { min-height: 44px; } }

.gbu-issues .gbu-issue { font-weight: 500; font-size: 0.92rem; }
ul.gbu-levels { margin: 0.2rem 0 0.4rem; padding-left: 1rem; }
.gbu-issue-group > summary { cursor: pointer; display: flex; align-items: flex-start; gap: 0.4rem; flex-wrap: nowrap; min-height: 2rem; }
.gbu-issue-group > summary .badge { flex: none; }
.gbu-issue-list { margin: 0.3rem 0 0.4rem 0; padding-left: 1.2rem; display: grid; gap: 0.25rem; }
@media (pointer: coarse) { .gbu-issue-group > summary { min-height: 44px; } }

/* Sicherheit am Übungstag (GBU Etappe 3) */
ul.gbu-safety-list { list-style: none; margin: 0.4rem 0; padding: 0; display: grid; gap: 0.5rem; }
ul.gbu-safety-list > li { border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 0.5rem 0.6rem; display: grid; gap: 0.3rem; }
ul.gbu-safety-list > li.is-done { opacity: 0.7; }
.gbu-dc-row { display: grid; gap: 0.35rem; padding: 0.6rem 0; border-bottom: 1px solid var(--glass-border); }
.gbu-dc-row:last-of-type { border-bottom: 0; }
.gbu-safety { margin-top: 0.8rem; }

/* Checklisten „Vorbereitung der Mimen“ und „Vorbereitung der Schadensdarstellung“: offen schwarz, erledigt grün */
.mm-prep { margin-bottom: 1rem; }
.mm-prep > summary { cursor: pointer; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; min-height: 44px; font-weight: 700; }
.mm-prep-list { list-style: none; padding: 0; margin: 0.4rem 0; display: grid; gap: 0.15rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.mm-prep-list li { display: flex; align-items: center; gap: 0.5rem; min-height: 40px; }
.mm-prep-mark { font-weight: 800; width: 1.3rem; text-align: center; }
.mm-prep-link { background: none; border: 0; padding: 0.2rem 0; font: inherit; text-align: left; cursor: pointer; color: var(--color-text); text-decoration: underline; text-decoration-color: var(--color-divider); text-underline-offset: 3px; min-height: 32px; }
.mm-prep-manual { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.mm-prep-manual { min-height: 40px; }
@media (pointer: coarse) { .mm-prep-link, .mm-prep-manual { min-height: 44px; } .mm-prep-manual input { width: 1.5rem; height: 1.5rem; } }
.mm-prep-list li.open .mm-prep-link, .mm-prep-list li.open .mm-prep-text, .mm-prep-list li.open .mm-prep-mark { color: var(--color-text); }
.mm-prep-list li.ok .mm-prep-link, .mm-prep-list li.ok .mm-prep-text, .mm-prep-list li.ok .mm-prep-mark { color: var(--good); }

/* Einrichtungshilfe Bondrucker */
.mm-print-guide h3 { font-size: 1rem; margin: 0.8rem 0 0.3rem; }
.mm-print-guide ul { margin: 0 0 0.4rem; padding-left: 1.2rem; display: grid; gap: 0.25rem; }
.dmg-prep-form { margin-top: 0.6rem; border-top: 1px solid var(--color-divider); padding-top: 0.6rem; }

/* GBU (Gesamtaudit Planung 07.11.2026): Vollständigkeitsprüfung unter 1100 px oben im Formular, Achsen der Risikomatrix sichtbar */
.gbu-issues-top > summary { cursor: pointer; min-height: 44px; display: list-item; padding: 0.2rem 0; }
@media (min-width: 1100px) { .gbu-issues-top { display: none; } }
@media (max-width: 1099px) { .gbu-issues-side { display: none; } }
.gbu-axis-x { text-align: right; color: var(--color-text-muted); margin-top: 0.4rem; }
.gbu-axis-y { caption-side: top; text-align: left; color: var(--color-text-muted); padding-bottom: 0.2rem; }

/* Maßnahmen-Übersicht im Stil des Nutzervorbilds (07.11.2026): nächste Schritte, Fortschrittskreis, Gesamtrisiko, Matrix mit Punkten */
.mx-steps-card { padding-bottom: 0.8rem; }
.mx-steps-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; margin-bottom: 0.6rem; }
.mx-steps-title { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; }
.mx-steps { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.mx-step { display: flex; align-items: center; gap: 0.6rem; text-align: left; min-height: 56px; padding: 0.55rem 0.7rem; border: 1px solid var(--color-divider); border-radius: var(--radius-md, 0.7rem); background: var(--color-surface); color: inherit; text-decoration: none; }
.mx-step:hover { border-color: var(--color-primary); }
.mx-step.is-late { border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.mx-step-body { display: grid; flex: 1 1 auto; min-width: 0; }
.mx-step-body strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mx-step-body small { color: var(--color-text-muted); }
.mx-step-no { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 1.8rem; height: 1.8rem; padding: 0 0.3rem; border-radius: 999px; font-weight: 700; font-size: 0.8rem; background: var(--color-primary-highlight); color: var(--color-primary); }
.mx-item .mx-step-no { min-width: 1.6rem; height: 1.6rem; }
.mx-k-gbu { background: var(--warn-soft); color: var(--warn-text); }
.mx-k-ll { background: var(--color-primary-highlight); color: var(--color-primary); }
.mx-state-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; }
.mx-ring { width: 4.2rem; height: 4.2rem; flex: none; }
.mx-ring-bg { fill: none; stroke: var(--color-divider); stroke-width: 6; }
.mx-ring-fg { fill: none; stroke: var(--good); stroke-width: 6; stroke-linecap: round; }
.mx-ring-t { font-size: 14px; font-weight: 700; fill: var(--color-text); }
.mx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); gap: 0.5rem; margin-top: 0.6rem; }
.mx-kpi { display: grid; text-align: center; padding: 0.45rem 0.3rem; border-radius: var(--radius-md, 0.7rem); background: var(--color-surface-2, transparent); border: 1px solid var(--color-divider); }
.mx-kpi b { font-size: 1.4rem; line-height: 1.2; }
.mx-kpi b.is-bad { color: var(--bad); } .mx-kpi b.is-good { color: var(--good); }
.mx-kpi span { font-size: 0.78rem; color: var(--color-text-muted); }
.mx-risk { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.5rem; margin: 0.4rem 0; }
.mx-risk-box { display: grid; text-align: center; padding: 0.6rem; border-radius: var(--radius-md, 0.7rem); }
.mx-risk-box b { font-size: 1.6rem; line-height: 1.15; }
.mx-risk-box span { font-size: 0.78rem; color: var(--color-text-muted); }
.mx-risk-box.is-before { background: var(--warn-soft); } .mx-risk-box.is-before b { color: var(--warn-text); }
.mx-risk-box.is-after { background: var(--good-soft); } .mx-risk-box.is-after b { color: var(--good); }
.mx-risk-arrow { display: grid; justify-items: center; gap: 0.2rem; color: var(--color-text-muted); }
.mx-dots { gap: 0; border: 1px solid var(--color-divider); border-radius: var(--radius-md, 0.7rem); overflow: hidden; }
.mx-cell { padding: 0.7rem; min-height: 8.5rem; border: 1px solid color-mix(in srgb, var(--color-divider) 70%, transparent); transition: box-shadow 0.15s ease; }
.mx-cell.is-over { box-shadow: inset 0 0 0 3px var(--color-primary); }
.mx-c-sofort { background: var(--bad-soft); } .mx-c-planen { background: var(--warn-soft); }
.mx-c-delegieren { background: var(--color-primary-highlight); } .mx-c-spaeter { background: var(--good-soft); }
.mx-cell-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.4rem; }
.mx-dotlist { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.mx-dot { width: 2.1rem; height: 2.1rem; min-height: 0; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; border: 2px solid var(--color-surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); cursor: pointer; }
.mx-dot.mx-k-gbu { background: var(--warn); color: var(--on-primary); }
.mx-dot.mx-k-ll { background: var(--color-primary); color: var(--on-primary); }
.mx-dot.is-late { box-shadow: 0 0 0 3px var(--bad); }
.mx-dot:focus-visible { outline: 3px solid var(--color-text); outline-offset: 2px; }
@media (pointer: coarse) { .mx-dot { width: 2.75rem; height: 2.75rem; } }
.mx-legend { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.5rem; color: var(--color-text-muted); grid-area: hint; }
.mx-dot-key { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: middle; }
.mx-dot-key.mx-k-gbu { background: var(--warn); } .mx-dot-key.mx-k-ll { background: var(--color-primary); } .mx-dot-key.is-late { background: transparent; box-shadow: inset 0 0 0 3px var(--bad); }
@media (max-width: 700px) { .mx-dots { border: 0; gap: 0.5rem; } .mx-cell { border-radius: var(--radius-md, 0.7rem); min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .mx-cell { transition: none; } }

/* Punkte der Maßnahmen-Matrix ziehen (Finger, Stift, Maus) und Sprungziel in der Gefährdungsbeurteilung */
.mx-dot.can-move { touch-action: none; cursor: grab; }
.mx-dot.is-dragging { opacity: 0.35; }
.mx-ghost { position: fixed; z-index: 1000; pointer-events: none; transform: translate(-50%, -50%) scale(1.15); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.gbu-risk.is-jump { box-shadow: 0 0 0 3px var(--color-primary); }

/* 5×5-Risikomatrix im Überblick (Nutzerwunsch 07.11.2026): Restrisiko je Gefährdung als Punkt, Stufe je Feld aus der GBU-Matrix */
.rm-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.9rem; color: var(--color-text-muted); margin-bottom: 0.4rem; }
.rm-key { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: middle; }
.rm-key.rm-gering, .rm-dot.rm-gering { background: var(--good); }
.rm-key.rm-mittel, .rm-dot.rm-mittel { background: var(--warn); }
.rm-key.rm-hoch, .rm-dot.rm-hoch { background: var(--bad); }
.rm-dot.rm-offen { background: var(--color-text-muted); }
.rm-dot { color: var(--on-primary); }
.rm-wrap { display: grid; grid-template-columns: 1.4rem 1fr; align-items: stretch; }
.rm-ylab { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.rm-xlab { text-align: center; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-top: 0.2rem; }
.rm-grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.rm-rowh { hyphens: auto; overflow-wrap: anywhere; width: 6.2rem; font-size: 0.72rem; font-weight: 600; text-align: right; padding-right: 0.4rem; color: var(--color-text-muted); }
.rm-colh { font-size: 0.72rem; font-weight: 600; text-align: center; color: var(--color-text-muted); padding-top: 0.3rem; vertical-align: top; hyphens: auto; overflow-wrap: anywhere; }
.rm-cell { position: relative; height: 4.6rem; vertical-align: top; border-radius: 6px; padding: 0.25rem; transition: box-shadow 0.15s ease; }
.rm-cell.rm-gering { background: var(--good-soft); } .rm-cell.rm-mittel { background: var(--warn-soft); } .rm-cell.rm-hoch { background: var(--bad-soft); }
.rm-cell.is-over { box-shadow: inset 0 0 0 3px var(--color-primary); }
.rm-score { position: absolute; top: 0.2rem; left: 0.35rem; font-size: 0.72rem; color: var(--color-text-muted); }
.rm-dots { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 0.25rem; min-height: 100%; padding-top: 1rem; }
.rm-dot { width: 1.9rem; height: 1.9rem; font-size: 0.75rem; }
.rm-unrated { margin-top: 0.8rem; padding: 0.6rem; border: 1px dashed var(--color-divider); border-radius: var(--radius-md, 0.7rem); }
.rm-unrated .rm-dots { justify-content: flex-start; padding-top: 0.3rem; min-height: 0; }
@media (max-width: 700px) { .rm-rowh { width: 3.6rem; font-size: 0.66rem; } .rm-colh { font-size: 0.62rem; } .rm-cell { height: 3.6rem; padding: 0.15rem; } .rm-dot { width: 1.6rem; height: 1.6rem; } .rm-grid { border-spacing: 2px; } }
@media (pointer: coarse) { .rm-dot { width: 2.75rem; height: 2.75rem; } .rm-cell { height: auto; min-height: 3.6rem; } } /* Tippflächen mind. 44 px */

/* Startseite im Modul Planung: anstehende Übungen mit Vorbereitungsstand (Runde 4) */
.up-card { display: grid; gap: 0.35rem; color: inherit; text-decoration: none; }
.up-card:hover { border-color: var(--color-primary); }
.up-ready .mx-bar { margin: 0.2rem 0; }
.section-title .btn.small { margin-left: auto; }

/* Drehbuch drucken (Regiebuch / Ablauf für Einspieler): nur der Druckabschnitt erscheint auf dem Papier */
.db-print { display: none; }
@media print {
  html.print-db #view .page > :not(.db-print), html.print-db .chat-fab, html.print-db .savebar { display: none !important; }
  html.print-db .db-print { display: block !important; }
  .db-print h1 { font-size: 16pt; margin: 0 0 4pt; }
  .db-print-note { font-weight: 700; border: 1px solid #000; padding: 4pt 6pt; }
  .db-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  .db-table th, .db-table td { border: 1px solid #555; padding: 3pt 4pt; vertical-align: top; text-align: left; }
  .db-table thead { display: table-header-group; }
  .db-table tr { break-inside: avoid; }
  .db-ist { min-width: 14mm; }
  .db-desc { white-space: pre-wrap; margin-top: 2pt; }
}
/* Hintergrundlast (Stab-Leitung, public/stab/leitung.js): Auswahl als Reihe, Tippflächen ≥ 44 px */
.bg-source, .bg-desks { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
#bg-form fieldset { border: 0; padding: 0; margin: 0 0 0.8rem; }
#bg-form legend { font-weight: 700; padding: 0; margin-bottom: 0.3rem; }
@media (pointer: coarse) { .bg-source .check, .bg-desks .check, #bg-form > .check { min-height: 44px; align-items: center; } }
/* Drehbuch am Handy (UI-Prüfung 12.11.2026): die vier Knöpfe standen untereinander und schoben die erste Einspielung unter den Bildschirmrand;
   jetzt bei 390 px zwei je Zeile (Tippfläche bleibt ≥ 44 px, siehe pointer: coarse); lange Beschriftungen dürfen umbrechen (320 px, 200 % Zoom, längere Übersetzungen) */
@media (max-width: 899px) {
  .row-compact { gap: 0.3rem; width: 100%; }
  .row-compact > button { flex: 1 1 auto; padding-inline: 0.5rem; gap: 0.3rem; font-size: 0.82rem; justify-content: center; }
}
