/* Ü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: 248px;
}

* { 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); }
.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; }
.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;
}
.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: 68rem; margin: 0 auto; padding: 1.6rem 1.5rem 6rem; }
.page.narrow { max-width: 46rem; }
.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); }
.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); }
.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; } }
/* 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; gap: 0.3rem; }
.levels button { min-width: 44px; font-style: italic; font-weight: 800; padding-inline: 0.5rem; }
.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); }

/* ---- 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; }
.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; }
  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; }
.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; }
.plan-checks { list-style: none; padding: 0; margin: 0.6rem 0; display: grid; gap: 0.35rem; }
.plan-checks li { display: flex; align-items: center; gap: 0.6rem; }
.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; text-align: center; }
.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) { 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) { padding-bottom: 10rem; }
  html:has(.savebar) { 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; }
