/* ==========================================================================
   Sanitär GBS – Unterrichtsplattform · Designtokens
   Edel & ruhig · Anthrazit + GBS-Lime · Off-White · Inter
   ========================================================================== */
:root {
  /* Off-White / neutrale Basis (Apple/Arc-Linie) */
  --bg-warm: #FAFAFA;     /* Seitengrund */
  --bg-soft: #F4F4F5;     /* leichte Sektionen */
  --paper: #FFFFFF;       /* Karten */
  --sand: #EFF0F1;        /* sehr dezente Fläche */
  --sand-strong: #D4D6D8; /* Hover-Rand */

  /* Anthrazit-Text */
  --ink: #0A1419;         /* near-black */
  --ink-soft: #3A4A50;
  --ink-quiet: #7A878C;

  /* Markenfarbe GBS St. Gallen – Lime-Grün (Akzent/Highlight) */
  --brand: #C7D300;        /* GBS-Lime */
  --brand-dark: #97A000;   /* abgedunkelt – für Text/Hover auf Hell */
  --brand-darker: #6E7400; /* Text auf Lime-Flächen, hoher Kontrast */
  --brand-light: #EFF3B8;  /* heller Tint – Flächen/Badges */
  --brand-soft: #F7F9E4;   /* sehr heller Tint */

  /* Sekundäraktion: früher Petrol, jetzt Anthrazit – ein durchgehendes Akzentsystem.
     Variablennamen bleiben (water*) erhalten, damit alle Verwendungen mitziehen. */
  --water: #243036;       /* Anthrazit aufgehellt – Hover auf dunklen Flächen */
  --water-deep: #0A1419;  /* = ink – Primäraktion (schwarze Buttons) */
  --water-soft: #F2F4D9;  /* heller Lime-Tint – Info-/Akzentflächen */

  /* Klare 1px-Linien statt Schatten */
  --border: #E5E7E9;
  --border-soft: #EEF0F1;
  --line: rgba(10, 20, 25, 0.08);

  --accent: #B57A4E;
  --danger: #B0524F;
  --ok: #3F7A6A;

  /* Schatten extrem reduziert – fast nur Linien */
  --shadow-1: 0 0 0 1px var(--line);
  --shadow-2: 0 1px 3px rgba(10, 20, 25, 0.06), 0 0 0 1px var(--line);
  --shadow-3: 0 24px 60px rgba(10, 20, 25, 0.15);

  /* Kantig (gbssg.ch-Look: überwiegend gerade Ecken, nur minimal gerundet) */
  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 6px;
  --radius-xl: 10px;

  /* Großzügige Spacing-Skala */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 36px;
  --space-7: 56px;
  --space-8: 88px;
  --space-9: 128px;

  /* Inter (Designvorbild gbssg.ch: Neue Helvetica – Inter als freier Ersatz) */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Typo-Skala – EIN System statt ~50 Einzelwerten. Schritt ~1.16 (Major-Second-nah).
     Verwendung: 2xs Mikro-Labels · xs Meta/Chips/Zeiten · sm Sekundärtext/Hints
     · md Fliesstext in Karten · base Standard · lg Subtitel · xl/2xl Abschnitts­titel. */
  --fs-2xs: 0.72rem;
  --fs-xs:  0.8rem;
  --fs-sm:  0.85rem;
  --fs-md:  0.92rem;
  --fs-base: 1rem;
  --fs-lg:  1.15rem;
  --fs-xl:  1.4rem;
  --fs-2xl: 1.75rem;

  --sidebar-w: 256px;
  --container: min(1180px, 100% - 48px);
  --container-narrow: min(880px, 100% - 48px);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}
html, body { margin: 0; padding: 0; }

/* Native View Transitions API (Chrome/Edge) für sanfte Seitenwechsel */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 240ms;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-warm);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-3);
  color: var(--ink);
  font-feature-settings: "ss01", "ss02", "cv01";
}
h1 {
  font-size: clamp(2.4rem, 4vw + 0.5rem, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
}
h2 { font-size: clamp(1.5rem, 1.4vw + 1rem, 2.1rem); line-height: 1.12; }
h3 { font-size: 1.05rem; line-height: 1.3; font-weight: 500; letter-spacing: -0.02em; }
p { margin: 0 0 var(--space-4); color: var(--ink-soft); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--water-deep); color: #fff;
  padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ==========================================================================
   Layout: linke Sidebar + Inhaltsspalte
   ========================================================================== */
.layout {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}
.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.brand {
  display: inline-flex; align-items: center; gap: var(--space-3);
  color: var(--ink); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: var(--brand); /* GBS-Lime */
  display: grid; place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.brand-logo img { width: 34px; height: 34px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
/* Zwei Zeilen „Spengler" / „Sanitär". Aktive Fachrichtung fett & gross, die andere dünn & klein.
   Standard = Sanitär-Klassen (Sanitär betont); body.is-spengler dreht es um. */
.brand-line { font-family: var(--font-display); letter-spacing: -0.02em; }
.brand-spengler { font-size: var(--fs-2xs); font-weight: 400; opacity: 0.6; }
.brand-sanitaer { font-size: var(--fs-base); font-weight: 800; opacity: 1; }
body.is-spengler .brand-spengler { font-size: var(--fs-base); font-weight: 800; opacity: 1; }
body.is-spengler .brand-sanitaer { font-size: var(--fs-2xs); font-weight: 400; opacity: 0.6; }

/* ---- Sidebar (Desktop/Tablet) ---- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  background: var(--paper);
  border-right: 1px solid var(--border);
  transition: width .18s ease, padding .18s ease;
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 0 var(--space-2) var(--space-2); }
.sidebar .brand { padding: 0; min-width: 0; }
.sidebar-toggle {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--ink-soft);
  display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .18s;
}
.sidebar-toggle:hover { background: var(--sand); color: var(--ink); }

/* Eingeklappt: schmale Icon-Leiste (mehr Platz fürs Tagesprogramm, ideal für Teams) */
body.sidebar-collapsed .sidebar { width: 60px; padding-left: 8px; padding-right: 8px; }
body.sidebar-collapsed .sidebar-top { flex-direction: column; gap: var(--space-3); padding: 0 0 var(--space-2); }
body.sidebar-collapsed .brand-text { display: none; }
body.sidebar-collapsed .sidebar-klasse { display: none; }
body.sidebar-collapsed .sidenav a { justify-content: center; padding: 11px 0; }
body.sidebar-collapsed .sidenav a span { display: none; }
body.sidebar-collapsed .sidebar-foot { display: none; }
body.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }

.sidebar-klasse { display: flex; flex-direction: column; gap: 6px; }
.sidebar-label {
  font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-quiet); padding-left: var(--space-2);
}
.select-wrap { position: relative; }
.select-wrap select {
  width: 100%; height: 40px;
  padding: 0 34px 0 var(--space-3);
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--ink);
  font: inherit; font-weight: 600; font-size: var(--fs-md);
  appearance: none; -webkit-appearance: none; outline: none;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.select-wrap select:focus { border-color: var(--brand-dark); box-shadow: 0 0 0 3px var(--brand-light); }
.select-chev { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-quiet); pointer-events: none; }

.sidenav { display: flex; flex-direction: column; gap: 4px; margin-top: var(--space-3); }
.sidenav a {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 12px var(--space-3);
  border-radius: var(--radius);
  color: var(--ink-soft); font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.01em;
  transition: color .15s, background .15s;
}
.sidenav a svg { color: var(--ink-quiet); transition: color .15s; flex-shrink: 0; }
.sidenav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.sidenav a:hover svg { color: var(--ink-soft); }
.sidenav a.is-active {
  background: var(--brand-soft); color: var(--ink); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand);
}
.sidenav a.is-active svg { color: var(--brand-dark); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: var(--space-3); border-top: 1px solid var(--border-soft); }
.sidebar-sublink {
  display: flex; align-items: center; gap: 8px;
  padding: 8px var(--space-3); border-radius: var(--radius);
  color: var(--ink-quiet); font-size: var(--fs-sm); font-weight: 500;
  transition: color .15s, background .15s;
}
.sidebar-sublink:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.sidebar-sublink svg { color: var(--ink-quiet); }
.sidebar-lehrer.is-active, .sidebar-sublink.is-active { color: var(--ink); background: var(--bg-soft); }

/* ---- Sidebar im gbssg.ch-Stil: schwarz, weisse Schrift, Lime-Akzent ---- */
.sidebar { background: var(--ink); border-right-color: rgba(255, 255, 255, 0.1); }
.sidebar .brand-text .brand-line { color: #fff; }   /* Opacity dimmt die inaktive Zeile */
.sidebar-toggle { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.85); }
.sidebar-toggle:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.sidebar-label { color: rgba(255, 255, 255, 0.55); }
.sidebar .select-wrap select { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.sidebar .select-wrap select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(199, 211, 0, 0.28); }
/* Aufgeklappte Optionsliste: eigener heller Hintergrund + dunkle Schrift (sonst weiss auf weiss) */
.sidebar .select-wrap select option { background: #fff; color: var(--ink); }
.sidebar .select-wrap select optgroup { background: #fff; color: var(--ink); }
.sidebar .select-chev { color: rgba(255, 255, 255, 0.6); }
.sidenav a { color: #fff; }
.sidenav a svg { color: rgba(255, 255, 255, 0.6); }
.sidenav a:hover { background: transparent; color: var(--brand); }
.sidenav a:hover svg { color: var(--brand); }
.sidenav a.is-active { background: transparent; color: var(--brand); box-shadow: none; }
.sidenav a.is-active svg { color: var(--brand); }
.sidebar-foot { border-top-color: rgba(255, 255, 255, 0.12); }
.sidebar-sublink { color: rgba(255, 255, 255, 0.6); }
.sidebar-sublink:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-sublink svg { color: rgba(255, 255, 255, 0.5); }
.sidebar-lehrer.is-active, .sidebar-sublink.is-active { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* «Lehrer-Bereich» ist der Haupteinstieg der Website (der Direktaufruf ist ja
   ohnehin schon passwortgeschützt, siehe renderSiteGate) – darum bewusst gross,
   fett und als eigener Lime-Button abgesetzt statt als schlichter Sublink wie
   «Info» darüber. */
.sidebar-lehrer {
  margin-top: 6px;
  padding: 11px var(--space-3);
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--ink) !important;
  font-weight: 700; font-size: var(--fs-md);
}
.sidebar-lehrer svg { color: var(--ink) !important; }
.sidebar-lehrer:hover { background: #fff; color: var(--ink) !important; }
.sidebar-lehrer.is-active { background: #fff; color: var(--ink) !important; }

/* ---- Mobile-Topbar (nur schmal) ---- */
.mobile-topbar {
  display: none;
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding: var(--space-3) var(--space-4);
}
.brand-mobile .brand-text .brand-line { color: var(--ink); }
/* Klassenauswahl im mobilen Kopf (aus Lernenden-Sicht) */
.mobile-klasse { flex: 0 1 auto; min-width: 0; }
.mobile-klasse .select-wrap { position: relative; }
.mobile-klasse select {
  appearance: none; -webkit-appearance: none;
  max-width: 46vw; padding: 8px 32px 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font: inherit; font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer;
}
.mobile-klasse .select-chev { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--ink-quiet); }
body.is-embed .mobile-klasse { display: none; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .mobile-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 42px; padding: 0 var(--space-5);
  border-radius: var(--radius); border: 1px solid var(--border);
  font: inherit; font-weight: 500;
  background: var(--paper); color: var(--ink);
  transition: transform .05s, background .15s, border-color .15s;
}
.btn:hover { background: var(--bg-soft); border-color: var(--sand-strong); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--water-deep); color: #fff; border-color: var(--water-deep); }
.btn-primary:hover { background: var(--water); border-color: var(--water); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn .btn-label { display: inline; }
@media (max-width: 640px) {
  .btn .btn-label { display: none; }
  .btn { padding: 0 var(--space-3); }
}

.iconbtn {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--border); border-radius: 10px;
  transition: background .15s;
  font-size: 1.05rem;
}
.iconbtn:hover { background: var(--sand); }
.iconbtn-close { background: var(--ink); color: #fff; border-color: var(--ink); }
.iconbtn-close:hover { background: #000; }
.iconbtn-text { text-decoration: none; }
.iconbtn-text:hover { text-decoration: none; }

/* ==========================================================================
   Layout
   ========================================================================== */
.main { flex: 1; }
.view { width: var(--container); margin: var(--space-5) auto var(--space-7); }
body.is-embed.page-tagesprogramm .view { margin-top: 0 !important; }

/* ---- Desktop (mit Sidebar): Kopfleisten oben+links bündig an die Sidebar ---- */
@media (min-width: 861px) {
  /* Inhaltsspalte randlos; Body bekommt seitliche/untere Polsterung, oben bündig.
     Gilt für normale Seite UND Teams/Embed (gleicher Look). */
  body .view {
    width: auto; max-width: none;
    margin: 0; padding: 0 var(--space-6) var(--space-7);
  }
  /* Schwarze Kopfleiste der Unterseiten – voll an Sidebar/oben angeschlossen, eckig.
     Per left/width (nicht margin) → greift zuverlässig (margin wird sonst überschrieben). */
  body .home-hero, body .la-head, body .section-head {
    position: relative; overflow: hidden;
    background: var(--ink); color: #fff;
    margin: 0 0 var(--space-5);
    left: calc(-1 * var(--space-6)); width: calc(100% + 2 * var(--space-6));
    padding: var(--space-5) var(--space-6);
    border-radius: 0; max-width: none;
  }
  /* Grünes Quadrat: linke Hälfte vor dem Titel, rechte Hälfte läuft in die ersten Buchstaben */
  body .home-hero::before, body .la-head::before, body .section-head::before {
    content: ""; position: absolute; z-index: 0;
    left: calc(var(--space-6) - 28px); top: calc(var(--space-5) - 10px);
    width: 56px; height: 56px; background: var(--brand);
  }
  .home-hero > *, .la-head > *, .section-head > * { position: relative; z-index: 1; }
  body .home-hero h1, body .la-head h1, body .section-head h1 {
    color: #fff; font-weight: 800; letter-spacing: -0.035em; margin: 0;
    font-size: clamp(2.1rem, 2.2vw + 1.1rem, 3rem);
  }
  .section-head p { color: rgba(255, 255, 255, 0.72); }   /* nur noch Semester-Detailseite */
  /* Tagesprogramm: Kachel voll an Sidebar/oben angeschlossen (per left/width) */
  body.page-tagesprogramm .tp-daycard {
    position: relative;
    left: calc(-1 * var(--space-6)); width: calc(100% + 2 * var(--space-6));
    margin: 0 0 var(--space-5);
    background: var(--brand);   /* hellgrüner Rahmen rundherum */
    border: none; border-radius: 0; box-shadow: none;
  }
}
/* Lime-Rahmen um den Schultag: Kopf oben, schmal links/rechts, Bar unten; Inhalt weiss eingerückt */
body.page-tagesprogramm .tp-dc-body {
  background: var(--paper);
  margin: 0 8px var(--space-4);
}

@media (max-width: 860px) {
  .view { margin: var(--space-3) auto calc(72px + var(--space-6)); }
}

/* ==========================================================================
   Bottom-Nav (mobile)
   ========================================================================== */
.bottomnav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 25;
  background: rgba(250, 250, 250, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px; color: var(--ink-quiet);
  font-size: var(--fs-2xs); font-weight: 500; gap: 4px;
  border-radius: 8px;
  letter-spacing: -0.01em;
  transition: color .12s;
}
.bottomnav a:hover { color: var(--ink); text-decoration: none; }
.bottomnav a.is-active { color: var(--ink); }
.bottomnav a.is-active svg { color: var(--brand-dark); }
@media (max-width: 860px) {
  .bottomnav { display: flex; }
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-warm);
  padding: var(--space-6) var(--space-5);
  margin-top: var(--space-8);
}
.footer-inner {
  width: var(--container);
  margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-4); flex-wrap: wrap;
  color: var(--ink-quiet); font-size: var(--fs-sm);
}
.footer-more { display: flex; gap: var(--space-4); }
.footer-more a { color: var(--ink-quiet); font-size: var(--fs-sm); }
.footer-more a:hover { color: var(--ink); }

/* ==========================================================================
   Startseite – Lernweg (Hero · Suche · ausklappbare Semester)
   ========================================================================== */
.home-hero {
  padding: var(--space-7) 0 var(--space-5);
  max-width: 760px;
}
.home-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.01em;
  color: var(--ink-quiet);
  margin-bottom: var(--space-4);
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.home-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--water-deep);
  box-shadow: 0 0 0 3px rgba(13, 73, 85, 0.12);
}
.home-hero h1 {
  margin: 0 0 var(--space-3);
  font-size: clamp(2.1rem, 3.4vw + 0.5rem, 3.6rem);
  letter-spacing: -0.04em;
  font-weight: 600;
}
.home-sub {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0;
}

/* Suche – prominent */
.home-search {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 8px 0 18px;
  height: 60px;
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-2);
  transition: border-color .15s, box-shadow .15s;
}
.home-search:focus-within {
  border-color: var(--water-deep);
  box-shadow: 0 0 0 4px var(--water-soft);
}
.home-search > svg { color: var(--ink-quiet); flex-shrink: 0; }
.home-search input {
  flex: 1; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 1.05rem; color: var(--ink);
}
.home-search input::placeholder { color: var(--ink-quiet); }
.home-search-btn {
  height: 44px; padding: 0 22px;
  border: 0; border-radius: 10px;
  background: var(--water-deep); color: #fff;
  font: inherit; font-weight: 500; font-size: var(--fs-md);
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.home-search-btn:hover { background: var(--water); }

/* Lernweg-Kopf */
.home-pathhead {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: var(--space-5);
}
.home-pathhead h2 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}
.ghostlink {
  background: transparent; border: 0;
  color: var(--ink-quiet); font: inherit; font-size: var(--fs-md);
  cursor: pointer; padding: 4px 6px;
}
.ghostlink:hover { color: var(--ink); text-decoration: underline; }

/* Stationen */
.lernweg { position: relative; }
.weg-station {
  position: relative;
  padding-left: 0;
}
/* Verbindungslinie zwischen den Knoten */
.weg-line {
  position: absolute;
  left: 27px; top: 56px; bottom: -2px;
  width: 2px;
  background: linear-gradient(var(--st-color), color-mix(in srgb, var(--st-color) 40%, transparent));
  z-index: 0;
}
.weg-line.is-last { display: none; }

.weg-head {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  background: transparent;
  border: 0;
  padding: 10px 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.weg-node {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper);
  border: 2px solid var(--st-color);
  transition: background .15s, transform .15s, border-color .15s;
}
.weg-station.is-open .weg-node,
.weg-head:hover .weg-node {
  background: var(--st-color);
  transform: scale(1.04);
}
.weg-node-num {
  font-family: var(--font-mono);
  font-size: 1.4rem; font-weight: 500;
  color: var(--st-deep);
  letter-spacing: -0.04em;
  transition: color .15s;
}
.weg-station.is-open .weg-node-num,
.weg-head:hover .weg-node-num { color: #fff; }

.weg-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.weg-lj {
  font-size: var(--fs-2xs); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-quiet);
}
.weg-title {
  font-size: 1.05rem; font-weight: 500;
  letter-spacing: -0.02em; color: var(--ink);
  line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis;
}
.weg-meta { display: flex; align-items: center; gap: var(--space-3); }
.weg-count {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--ink-quiet);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  min-width: 30px; text-align: center;
}
.weg-chev {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--ink-quiet);
  transition: transform .28s cubic-bezier(.4,0,.2,1), color .15s;
}
.weg-station.is-open .weg-chev { transform: rotate(180deg); color: var(--st-deep); }

/* Body mit Aufträgen */
.weg-body {
  position: relative; z-index: 1;
  padding: var(--space-3) 0 var(--space-6) 72px;
}
.weg-body[hidden] { display: none; }
@keyframes tile-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ausgeklappt: Lernpfad (verbundene Kreise) links + Prüfungen/ÜK rechts */
.weg-expand {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--space-5); align-items: start;
}
.weg-path { position: relative; display: flex; flex-direction: column; }
.weg-path::before {
  content: ""; position: absolute; left: 21px; top: 26px; bottom: 26px;
  border-left: 2px dashed var(--st-deep, var(--sand-strong)); opacity: .45;
}
.pfadnode {
  display: flex; align-items: center; gap: var(--space-3);
  position: relative; z-index: 1; padding: 6px 0;
  color: var(--ink); text-decoration: none;
  opacity: 0; animation: tile-in .35s ease-out forwards; animation-delay: var(--node-delay, 0ms);
}
.pfadnode-circle {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--st-deep, var(--water-deep));
  color: var(--st-deep, var(--water-deep));
  font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-sm); letter-spacing: -0.02em;
  box-shadow: 0 0 0 4px var(--bg-warm);
  transition: background .15s, transform .1s;
}
.pfadnode:hover { text-decoration: none; }
.pfadnode:hover .pfadnode-circle { background: var(--st-color, var(--water-soft)); transform: scale(1.06); }
.pfadnode-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pfadnode-title { font-size: var(--fs-md); font-weight: 600; color: var(--ink); letter-spacing: -0.01em; line-height: 1.25; }
.pfadnode-thema { font-size: var(--fs-xs); color: var(--ink-quiet); }

/* Rechte Spalte: Prüfungen + ÜK */
.weg-side { display: flex; flex-direction: column; gap: var(--space-3); position: sticky; top: var(--space-4); }
.weg-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); }
.weg-card-pruef { border-top: 3px solid var(--brand); }
.weg-card-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-md); color: var(--ink); margin-bottom: var(--space-3); }
.weg-card-head svg { color: var(--brand-dark); flex-shrink: 0; }
.weg-card-count { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-quiet); background: var(--bg-soft); padding: 1px 8px; border-radius: 999px; }
.weg-card-empty { margin: 0; color: var(--ink-quiet); font-size: var(--fs-sm); font-style: italic; }
.pruef-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pruef-item { font-size: var(--fs-md); color: var(--ink-soft); line-height: 1.35; }
.pruef-item:not(:has(.pruef-link)) { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.pruef-item + .pruef-item { border-top: 1px solid var(--border-soft); }
.pruef-link { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--ink-soft); text-decoration: none; }
.pruef-link:hover { text-decoration: none; }
.pruef-link > span:nth-child(2) { flex: 1; min-width: 0; }
.pruef-link:hover > span:nth-child(2) { color: var(--ink); }
.pruef-lz { flex-shrink: 0; font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-quiet); white-space: nowrap; }
.pruef-link:hover .pruef-lz { color: var(--brand-dark); }
.pruef-bezug { flex-shrink: 0; font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; color: var(--brand-darker); background: var(--brand-light); border-radius: 5px; padding: 1px 6px; }
.pruef-bullet { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 6px; }
.uek-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.uek-item { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--fs-md); color: var(--ink-soft); }
.uek-zeit { flex-shrink: 0; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-quiet); }

/* Mobile-Anpassungen für Startseite/Lernweg */
@media (max-width: 760px) {
  .home-hero { padding: var(--space-5) 0 var(--space-4); }
  .home-hero h1 { letter-spacing: -0.035em; }
  .home-sub { font-size: var(--fs-md); }
  .home-search { height: 52px; padding-left: 14px; margin-bottom: var(--space-6); }
  .home-search input { font-size: var(--fs-md); }
  .home-search-btn { padding: 0 16px; }

  .weg-head { grid-template-columns: 44px 1fr auto; gap: var(--space-2); }
  .weg-node { width: 44px; height: 44px; }
  .weg-node-num { font-size: var(--fs-lg); }
  .weg-line { left: 21px; top: 48px; }
  .weg-title { font-size: var(--fs-md); }
  .weg-body { padding-left: 0; }

  .weg-expand { grid-template-columns: 1fr; gap: var(--space-4); }
  .weg-side { position: static; }
}

/* Tablet */
@media (min-width: 761px) and (max-width: 1100px) {
  .weg-expand { gap: var(--space-4); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pfadnode { animation: none; opacity: 1; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Hero / Start (alt – wird nicht mehr verwendet, aber für Kompatibilität)
   ========================================================================== */

/* ==========================================================================
   Hero / Start (alt – wird nicht mehr verwendet, aber für Kompatibilität)
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
  gap: 0;
  background: var(--water-deep);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
}
.hero-content {
  padding: clamp(32px, 4vw, 64px);
  display: flex; flex-direction: column; justify-content: center;
}
.hero-eyebrow {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-3);
}
.hero h1 { margin-bottom: var(--space-4); max-width: 620px; color: #fff; }
.hero p { font-size: 1.05rem; max-width: 560px; color: rgba(255,255,255,0.85); line-height: 1.55; }
.hero-actions {
  display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-5);
}
.hero-media {
  position: relative;
  background: var(--water);
  min-height: 320px;
}
.hero-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
}
.hero-media .hero-media-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.5);
  background:
    linear-gradient(135deg, var(--water) 0%, var(--water-deep) 100%);
  text-align: center; padding: var(--space-5);
  font-size: var(--fs-sm);
}
.hero .btn-primary { background: #fff; color: var(--water-deep); }
.hero .btn-primary:hover { background: var(--water-soft); }
.hero .btn-ghost { border-color: rgba(255,255,255,0.35); color: #fff; background: transparent; }
.hero .btn-ghost:hover { background: rgba(255,255,255,0.12); }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { min-height: 200px; order: -1; }
}

.lead-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4); margin-top: var(--space-6);
}
.lead-card {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--sand-strong);
  text-decoration: none;
}
.lead-card .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--water-soft); color: var(--water-deep);
  display: grid; place-items: center; margin-bottom: var(--space-3);
}
.lead-card h3 { margin-bottom: var(--space-2); color: var(--ink); }
.lead-card p { margin: 0; font-size: var(--fs-md); }

/* ==========================================================================
   Section headers
   ========================================================================== */
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: var(--space-4); margin: var(--space-6) 0 var(--space-4);
}
.section-head h2 { margin: 0; }
.section-head .meta { color: var(--ink-quiet); font-size: var(--fs-md); }

/* Unter-Überschrift im Seiteninhalt (z. B. „Die 7 Handlungsfelder").
   Bewusst KEIN .section-head, damit nicht der schwarze Kopfbalken greift
   (dort wird nur h1 weiss gefärbt → h2 wäre auf Schwarz unlesbar). */
.hf-section-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-3); flex-wrap: wrap;
  margin: var(--space-7) 0 var(--space-4);
}
.hf-section-head h2 {
  margin: 0; color: var(--ink); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.4rem, 1.2vw + 0.9rem, 1.9rem);
}
/* Zurück-Button (z. B. Auftrags-Detail → Lernaufträge) */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-md); font-weight: 600; color: var(--ink);
  text-decoration: none; margin-bottom: var(--space-2);
  padding: 6px 12px 6px 8px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.back-link:hover { background: var(--bg-soft); border-color: var(--ink-quiet); }
.back-link svg { flex: none; }

.breadcrumb {
  color: var(--ink-quiet); font-size: var(--fs-sm); margin-bottom: var(--space-2);
}
.breadcrumb a { color: var(--ink-quiet); }
.breadcrumb a:hover { color: var(--ink); }

/* ==========================================================================
   Semester-Karten (Grid)
   ========================================================================== */
.sem-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--space-3);
}
.sem-card {
  display: flex; flex-direction: column; gap: var(--space-2);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-decoration: none; color: inherit;
  transition: border-color .12s, box-shadow .12s;
}
.sem-card:hover {
  box-shadow: var(--shadow-1);
  border-color: var(--water);
  text-decoration: none;
}
.sem-card-head {
  display: flex; align-items: baseline; justify-content: space-between;
}
.sem-card .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem; line-height: 1;
  color: var(--water-deep);
  letter-spacing: -0.03em;
}
.sem-card .sem-count {
  font-size: var(--fs-xs); color: var(--ink-quiet);
}
.sem-card h3 { margin: 0; font-size: var(--fs-base); font-weight: 600; line-height: 1.25; }
.sem-card .sem-themen {
  color: var(--ink-quiet); font-size: var(--fs-sm); margin: 0; line-height: 1.45;
}

/* ==========================================================================
   Normen & Richtlinien (kompakte, eingefärbte Kacheln – ohne Bild)
   ========================================================================== */
.norm-group { margin-bottom: var(--space-2); }
.norm-group-title {
  margin: 0 0 6px;
  font-size: var(--fs-sm); font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink-quiet); text-transform: uppercase; letter-spacing: 0.04em;
}
.norm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-2);
}
.norm-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 12px;
  border: 1px solid var(--nc-bd, var(--border));
  border-left: 4px solid var(--nc, var(--ink));
  border-radius: var(--radius);
  background: var(--nc-bg, var(--paper)); color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.norm-card:hover {
  border-color: var(--nc, var(--ink));
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
  text-decoration: none;
}
.norm-card.is-disabled { opacity: 0.7; cursor: default; }
.norm-card.is-disabled:hover { transform: none; box-shadow: none; }
.norm-card-code {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-weight: 700; font-size: var(--fs-sm); letter-spacing: -0.01em;
  color: var(--nc, var(--ink));
}
.norm-card-ext { flex: none; margin-left: auto; opacity: 0.55; color: var(--ink); }
.norm-card-title {
  font-size: var(--fs-xs); line-height: 1.3; color: var(--ink-soft);
}
.norm-card-soon {
  font-size: var(--fs-xs); font-style: italic; color: var(--ink-quiet);
}
.norm-lead { margin-top: calc(-1 * var(--space-3)); margin-bottom: var(--space-3); }
/* Kachel-Farben nach Bereich: kräftiger Akzent (--nc) + heller Tint (--nc-bg) – Look wie Lernauftrags-Kacheln */
.norm-c-blau  { --nc: #2F5496; --nc-bg: #EDF2FA; --nc-bd: #C4D3EA; }
.norm-c-braun { --nc: #7A5A2E; --nc-bg: #F4EDE2; --nc-bd: #DCC9AC; }
.norm-c-gelb  { --nc: #A88600; --nc-bg: #FAF3D6; --nc-bd: #E8D88E; }
.norm-c-weiss { --nc: #0A1419; --nc-bg: var(--paper); --nc-bd: var(--border); }

/* ==========================================================================
   Pills / Badges
   ========================================================================== */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 500;
  background: var(--sand); color: var(--ink);
}
.pill-water { background: var(--water-soft); color: var(--water-deep); }
.pill-hf {
  background: rgba(123, 167, 181, 0.18);
  color: var(--water-deep);
  font-weight: 600;
}
.pill-hk {
  background: color-mix(in srgb, var(--hk-color, var(--water)) 18%, transparent);
  color: var(--hk-color, var(--water-deep));
  font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--hk-color, var(--water)) 30%, transparent);
  display: inline-flex; align-items: center; gap: 4px;
}
.pill-prefix {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 600;
}
.pill-lz {
  background: var(--bg-warm);
  color: var(--ink-quiet);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
}
.pill-thema { background: var(--bg-warm); color: var(--ink-soft); }

/* ==========================================================================
   Auftrags-Karten
   ========================================================================== */
.auf-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}
.auf-card {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.auf-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--sand-strong);
  text-decoration: none;
}
.auf-preview {
  aspect-ratio: 1 / 1.25;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--sand) 100%);
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  position: relative;
  display: grid; place-items: center;
  color: var(--ink-soft);
  transition: background-image .2s;
}
.auf-preview.has-thumb {
  background: var(--paper);
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}
.auf-preview.has-thumb .auf-num {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.auf-preview-big { aspect-ratio: 1 / 1.41; }
.auf-preview .auf-num {
  position: absolute; top: var(--space-3); left: var(--space-3);
  padding: 4px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.85); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-md);
}
.auf-preview .sheet {
  width: 80%; aspect-ratio: 1 / 1.41;
  background: var(--paper); border-radius: 6px;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; padding: 12px;
  gap: 6px;
}
.auf-preview .sheet .line {
  height: 6px; border-radius: 4px; background: var(--border);
}
.auf-preview .sheet .line.short { width: 60%; }
.auf-preview .sheet .line.title { height: 9px; background: var(--ink-quiet); margin-bottom: 4px; }
.auf-preview .sheet .line.water { background: var(--water); }
.auf-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.auf-body h3 { font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.3; margin: 0; }
.auf-body .kurz {
  margin: 0; color: var(--ink-soft); font-size: var(--fs-md);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.auf-body .pill-row { margin-top: auto; padding-top: var(--space-2); }

/* ==========================================================================
   Detail (Auftrag)
   ========================================================================== */
.detail {
  display: grid; grid-template-columns: minmax(220px, 320px) 1fr;
  gap: var(--space-6);
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
}
@media (max-width: 800px) {
  .detail { grid-template-columns: 1fr; }
}
.detail .auf-preview { border-radius: var(--radius); aspect-ratio: 1 / 1.35; cursor: pointer; }
.detail h1 { margin-bottom: var(--space-2); }
.detail .auf-num-big { color: var(--water-deep); font-weight: 600; letter-spacing: -0.01em; }
.detail .meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-4); }
.detail .lead { font-size: 1.05rem; color: var(--ink-soft); }

.kv-list { list-style: none; padding: 0; margin: 0 0 var(--space-4); }
.kv-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-soft);
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-3);
  align-items: baseline;
}
.kv-list li:last-child { border-bottom: 0; }
.kv-list .k {
  color: var(--ink-quiet);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  word-break: break-word;
}
.kv-list .v { color: var(--ink); min-width: 0; }
.kv-list .v .pill { margin: 2px 4px 2px 0; }
@media (max-width: 640px) {
  .kv-list li { grid-template-columns: 1fr; gap: 4px; }
  .kv-list .k { font-size: var(--fs-2xs); }
}

.lz-list { padding-left: 1.1em; margin: 0; color: var(--ink-soft); }
.lz-list li { margin-bottom: 6px; }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }

/* ==========================================================================
   Filter-Bar
   ========================================================================== */
.filterbar {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}
.filter-group {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 0 var(--space-2);
}
.filter-group label { color: var(--ink-quiet); font-size: var(--fs-sm); }
.filter-group select {
  height: 36px; padding: 0 var(--space-3);
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--paper); color: var(--ink);
  font: inherit;
}
.filter-clear {
  margin-left: auto;
  background: transparent; border: 0; color: var(--ink-quiet);
  cursor: pointer; padding: 6px 10px; border-radius: 8px;
}
.filter-clear:hover { background: var(--bg-warm); color: var(--ink); }

/* ==========================================================================
   Suche – Treffer
   ========================================================================== */
.search-head {
  display: flex; gap: var(--space-3); margin-bottom: var(--space-3);
}
.search-head input {
  flex: 1; height: 48px; padding: 0 var(--space-4);
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--paper); font: inherit; outline: none;
}
.search-head input:focus { border-color: var(--water); box-shadow: 0 0 0 4px var(--water-soft); }

.search-summary { color: var(--ink-quiet); margin-bottom: var(--space-4); }

/* Karten-Grid: kompakte Kacheln, so viele Spalten wie Platz (2–4); Labels spannen alle */
.hit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: var(--space-2); align-items: stretch; }
.hit-list > .hit-section-head, .hit-list > .hit-sem-label, .hit-list > .empty { grid-column: 1 / -1; }
@media (max-width: 560px) { .hit-list { grid-template-columns: 1fr; } }

.hit-section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-soft);
}
.hit-section-head:first-child { margin-top: 0; }
.hit-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
}
.hit-section-head .meta { color: var(--ink-quiet); font-size: var(--fs-sm); }
.hit-section-head.is-secondary h2 { color: var(--ink-soft); font-weight: 500; }

.hit-sem-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-quiet);
  font-weight: 600;
  margin: var(--space-4) 0 var(--space-1);
  padding-left: 6px;
}
.hit-sem-label:first-of-type { margin-top: var(--space-2); }

/* Treffer-Kachel: Auftragsfarbe klar erkennbar (getönter Grund + farbige Kante + Nummer),
   kompakt, bewusst OHNE HK-Pills – Nummer, Titel, Thema */
.hit {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--hc-bg, var(--paper));
  border: 1px solid var(--hc-bd, var(--border));
  border-left: 4px solid var(--hc, var(--water));
  border-radius: var(--radius);
  padding: 9px 12px;
  text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.hit:hover {
  border-color: var(--hc, var(--sand-strong));
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
  text-decoration: none;
}
.hit.is-top { box-shadow: inset 0 0 0 1px var(--hc, var(--water)); }
.hit-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.hit-auf {
  font-family: var(--font-mono);
  font-weight: 700; font-size: var(--fs-md);
  color: var(--hc, var(--water-deep));
}
.hit-sem { color: var(--ink-quiet); font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.hit-auf-wrap { display: inline-flex; align-items: baseline; gap: 6px; }
.hit-bg {
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 5px; white-space: nowrap;
}
.hit-bg-efz { color: var(--ink-quiet); background: var(--sand); }
.hit-bg-eba { color: #fff; background: var(--hc, #7030A0); }
.hit h3 { margin: 0; font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; }
.hit-thema { color: var(--ink-quiet); font-size: var(--fs-xs); line-height: 1.3; }
.hit .hit-why { color: var(--ink-quiet); font-size: var(--fs-xs); margin-top: auto; padding-top: 2px; }

mark { background: #FBE8C4; color: var(--ink); padding: 0 2px; border-radius: 3px; }

.empty {
  text-align: center; padding: var(--space-7) var(--space-4);
  color: var(--ink-quiet);
}
.empty h2 { color: var(--ink); }

/* ==========================================================================
   Handlungsfelder & Handlungskompetenzen-Liste (Akkordeon)
   ========================================================================== */
.hf-list { display: grid; gap: var(--space-3); }
.hf-block {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--hf-color, var(--water));
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hf-header-btn {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--space-4);
  align-items: center;
  width: 100%;
  background: transparent;
  border: 0;
  padding: var(--space-4);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background .12s;
}
.hf-header-btn:hover { background: color-mix(in srgb, var(--hf-color) 7%, var(--paper)); }
.hf-head-info h2 { margin: 0 0 2px; font-size: var(--fs-lg); font-family: var(--font-display); }
.hf-head-info p { margin: 0; color: var(--ink-soft); font-size: var(--fs-md); }
.hf-head-meta { display: flex; align-items: center; gap: var(--space-3); }
.hf-count {
  font-size: var(--fs-xs); color: var(--ink-quiet);
  background: var(--bg-warm); padding: 4px 10px; border-radius: 999px;
  white-space: nowrap;
}
.hf-toggle-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hf-color) 14%, transparent);
  color: var(--hf-color);
  transition: transform .25s;
}
.hf-block.is-open .hf-toggle-icon { transform: rotate(180deg); }
.hf-block .hk-list { padding: 0 var(--space-4) var(--space-4); }
.hf-block .hk-list[hidden] { display: none; }
.hf-code {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.2rem; color: #fff;
}
@media (max-width: 640px) {
  .hf-header-btn { grid-template-columns: 44px 1fr auto; gap: var(--space-2); padding: var(--space-3); }
  .hf-code { width: 44px; height: 44px; font-size: var(--fs-base); }
  .hf-head-info h2 { font-size: var(--fs-base); }
  .hf-count { display: none; }
}
.hk-list { display: grid; gap: var(--space-2); }
.hk-row {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  display: grid; grid-template-columns: 56px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s;
}
.hk-row:hover { border-color: var(--sand-strong); background: var(--paper); text-decoration: none; }
.hk-row .hk-code {
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-md); color: #fff;
}
.hk-row h3 { margin: 0 0 2px; font-family: var(--font-body); font-size: var(--fs-md); }
.hk-row p { margin: 0; font-size: var(--fs-sm); color: var(--ink-quiet); }
.hk-row .count {
  padding: 4px 10px; border-radius: 999px;
  background: var(--paper); color: var(--ink-soft);
  font-size: var(--fs-xs);
  border: 1px solid var(--border-soft);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .hk-row { grid-template-columns: 40px 1fr; }
  .hk-row .count { grid-column: 2; justify-self: start; }
}

/* ==========================================================================
   PDF-Modal
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(30, 28, 24, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  width: min(1100px, calc(100vw - 24px));
  height: min(92vh, 100%);
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
}
.modal-header h2 {
  margin: 0; font-family: var(--font-body); font-size: var(--fs-base); font-weight: 600;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.modal-tools { display: flex; align-items: center; gap: 6px; }
.modal-tools .sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.modal-tools .pageinfo {
  padding: 0 6px; font-size: var(--fs-sm); color: var(--ink-soft);
  min-width: 64px; text-align: center;
}
.modal-body {
  flex: 1; overflow: hidden;
  background: #4a5258;
  padding: 0;
  display: grid; place-items: stretch;
  position: relative;
}
.pdf-frame-wrap { width: 100%; height: 100%; position: relative; }
.pdf-frame {
  width: 100%; height: 100%;
  border: 0;
  display: block;
  background: #4a5258;
}
.pdf-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.85);
  text-align: center;
  line-height: 1.6;
  padding: var(--space-5);
}
.pdf-empty[hidden] { display: none; }

/* Schutz-Hinweise: Kontextmenü / Auswahl etc. wird in JS für Modal-Body unterdrückt */
.modal-body, .modal-body * {
  -webkit-touch-callout: none;
}

/* ==========================================================================
   Loader
   ========================================================================== */
.loader {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--water-deep);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Lernpfad – geschwungener Pfad durch alle Aufträge
   ========================================================================== */
.pfad-wrap {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: var(--space-5) 0 var(--space-7);
  /* dezentes Wassertropfen-Pattern als Hintergrund */
  background-image:
    radial-gradient(circle at 20% 15%, rgba(123, 167, 181, 0.06) 0, transparent 30%),
    radial-gradient(circle at 85% 60%, rgba(200, 149, 107, 0.05) 0, transparent 30%),
    radial-gradient(circle at 30% 85%, rgba(123, 167, 181, 0.04) 0, transparent 25%);
}
.pfad-svg { display: block; }

.pfad-station {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

/* Zickzack: linke Seite */
.pfad-station[data-side="left"] {
  padding-right: 50%;
  justify-content: flex-end;
}
/* Zickzack: rechte Seite */
.pfad-station[data-side="right"] {
  padding-left: 50%;
  justify-content: flex-start;
  flex-direction: row-reverse;
}

/* Dot = Anker für die SVG-Linie */
.pfad-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--water-deep);
  box-shadow:
    0 0 0 4px rgba(124, 167, 181, 0.22),
    0 0 0 8px rgba(124, 167, 181, 0.08);
  transition: transform .15s, box-shadow .15s;
}

/* Auftrag-Karte */
.pfad-auftrag {
  text-decoration: none;
  color: inherit;
}
.pfad-auftrag:hover { text-decoration: none; }
.pfad-auftrag:hover .pfad-dot {
  transform: scale(1.25);
  box-shadow:
    0 0 0 5px rgba(124, 167, 181, 0.34),
    0 0 0 12px rgba(124, 167, 181, 0.12);
}

.pfad-card {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  min-width: 0;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-1);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.pfad-auftrag:hover .pfad-card {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--sand-strong);
}
.pfad-card-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--water-deep);
  letter-spacing: -0.01em;
}
.pfad-card h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.3;
  color: var(--ink);
}
.pfad-card-thema {
  font-size: var(--fs-xs);
  color: var(--ink-quiet);
  margin-top: 2px;
}

/* Semester-Marker – grosse Blase */
.pfad-semester {
  margin: var(--space-7) 0 var(--space-6);
}
.pfad-sem-bubble {
  width: 48px; height: 48px; border-radius: 10px;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
}
.pfad-sem-bubble .pfad-sem-num {
  font-size: 1.4rem;
  line-height: 1;
}
.pfad-sem-info { display: flex; flex-direction: column; gap: 1px; }
.pfad-sem-info h2 {
  margin: 0;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
}

/* ----------------------------------------------------------------------------
   Semester-Block (Akkordeon)
   ---------------------------------------------------------------------------- */
.pfad-semester-block {
  width: 100%;
  padding: 0 !important;
  margin: var(--space-4) 0 !important;
  display: block !important;
}
.pfad-sem-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--border);
  border-left: 4px solid var(--sem-color);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  cursor: pointer;
  transition: background .12s, box-shadow .12s, border-color .12s;
  font: inherit;
  color: inherit;
}
.pfad-sem-meta { display: flex; align-items: center; gap: var(--space-3); }
.pfad-sem-count { font-size: var(--fs-xs); color: var(--ink-quiet); white-space: nowrap; }
.pfad-sem-header:hover {
  background: color-mix(in srgb, var(--sem-color) 6%, var(--paper));
  box-shadow: var(--shadow-2);
}
.pfad-semester-block.is-open .pfad-sem-header {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom-color: transparent;
}
.pfad-sem-lj {
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sem-color);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.pfad-sem-info h2 {
  margin: 0 0 4px;
  font-size: var(--fs-lg);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}
.pfad-sem-info p {
  margin: 0 0 var(--space-2);
  color: var(--ink-soft);
  font-size: var(--fs-md);
}
.pfad-sem-pills {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pfad-sem-toggle {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sem-color) 12%, transparent);
  color: var(--sem-color);
  transition: transform .25s, background .15s;
  flex-shrink: 0;
}
.pfad-semester-block.is-open .pfad-sem-toggle {
  transform: rotate(180deg);
  background: color-mix(in srgb, var(--sem-color) 22%, transparent);
}

/* Aufträge-Liste: Zickzack-Grid, transparent damit Linie sichtbar bleibt */
.pfad-sem-aufs {
  position: relative;
  background: transparent;
  border: none;
  padding: var(--space-5) 0 var(--space-5);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--space-7);
  row-gap: var(--space-3);
}
.pfad-sem-aufs[hidden] { display: none; }

/* Header behält die rundum-Box-Optik auch wenn offen */
.pfad-semester-block.is-open .pfad-sem-header {
  border-radius: var(--radius-lg);
  border-bottom-color: var(--border-soft);
}

/* Mini-Karte */
.pfad-mini-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  animation: pfad-card-pop 0.45s cubic-bezier(0.34, 1.32, 0.64, 1) forwards;
  animation-delay: calc(var(--idx, 0) * 60ms);
}
.pfad-mini-card[data-side="left"] {
  grid-column: 1;
  justify-self: end;
  text-align: left;
  animation-name: pfad-card-pop-left;
}
.pfad-mini-card[data-side="right"] {
  grid-column: 2;
  justify-self: start;
  animation-name: pfad-card-pop-right;
}
@keyframes pfad-card-pop-left {
  0% { opacity: 0; transform: translateX(-24px) scale(0.96); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes pfad-card-pop-right {
  0% { opacity: 0; transform: translateX(24px) scale(0.96); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

.pfad-mini-inner {
  display: grid;
  grid-template-columns: 28px 40px 1fr;
  gap: var(--space-3);
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: 0 1px 2px rgba(70, 60, 40, 0.05);
  transition: transform .12s, border-color .12s, box-shadow .12s;
  max-width: 360px;
}
.pfad-mini-card:hover { text-decoration: none; }
.pfad-mini-card:hover .pfad-mini-inner {
  transform: translateY(-2px);
  border-color: var(--sem-deep);
  box-shadow: 0 4px 14px rgba(70, 60, 40, 0.10);
}
.pfad-mini-card:hover .pfad-mini-icon {
  transform: scale(1.08);
}

.pfad-mini-step {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  text-align: center;
}
.pfad-mini-icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: transform .15s;
  background: transparent;
}
.pfad-mini-icon svg { stroke-width: 1.8; }
.pfad-mini-text {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.pfad-mini-head {
  display: flex; gap: 8px; align-items: baseline;
}
.pfad-mini-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  flex-shrink: 0;
}
.pfad-mini-text h4 {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.25;
  color: var(--ink);
}
.pfad-mini-thema {
  font-size: var(--fs-xs);
  color: var(--ink-quiet);
}
.pfad-mini-hk {
  font-size: var(--fs-2xs);
  font-weight: 500;
}

/* Dot innerhalb der Mini-Karte: an der Innenseite (zur Mittellinie hin) */
.pfad-mini-dot {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 0 0 5px color-mix(in srgb, var(--sem-deep) 30%, transparent);
}
.pfad-mini-card[data-side="left"] .pfad-mini-dot {
  right: -7px;
}
.pfad-mini-card[data-side="right"] .pfad-mini-dot {
  left: -7px;
}

@media (max-width: 700px) {
  .pfad-sem-header { grid-template-columns: auto 1fr auto; gap: var(--space-2); padding: var(--space-3); }
  .pfad-sem-info h2 { font-size: var(--fs-base); }
  .pfad-sem-info p { font-size: var(--fs-sm); }
  .pfad-sem-aufs {
    grid-template-columns: 1fr;
    column-gap: 0;
    padding: var(--space-3);
  }
  .pfad-mini-card[data-side="left"],
  .pfad-mini-card[data-side="right"] {
    grid-column: 1;
    justify-self: stretch;
    animation-name: pfad-card-pop-left;
  }
  .pfad-mini-inner { grid-template-columns: 24px 36px 1fr; padding: var(--space-2) var(--space-3); max-width: none; }
  .pfad-mini-icon { width: 36px; height: 36px; border-radius: 10px; }
  .pfad-mini-icon svg { width: 18px; height: 18px; }
  .pfad-mini-dot { display: none; }
}

/* ----------------------------------------------------------------------------
   Milestones: Start, Ziel, Weiterbildung
   ---------------------------------------------------------------------------- */
.pfad-milestone {
  margin: var(--space-7) 0;
  align-items: flex-start;
  gap: var(--space-4);
}
.pfad-flag {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 64px; height: 64px;
  filter: drop-shadow(0 2px 6px rgba(70, 60, 40, 0.18));
  animation: pfad-flag-wave 4.5s ease-in-out infinite;
  transform-origin: bottom left;
}
.pfad-flag-ziel { width: 72px; height: 72px; animation-delay: -1.2s; }
.pfad-flag-weiter { animation: none; }
@keyframes pfad-flag-wave {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(2.5deg); }
}

.pfad-milestone-card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-1);
  max-width: 360px;
}
.pfad-milestone-card h3 {
  margin: 6px 0 4px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.2;
}
.pfad-milestone-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-md);
  line-height: 1.45;
}
.pfad-milestone-label {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Start */
.pfad-milestone-start {
  background: linear-gradient(135deg, var(--paper) 0%, #EFF5EE 100%);
  border-color: rgba(111, 144, 112, 0.32);
}
.pfad-milestone-start .pfad-milestone-label {
  background: rgba(111, 144, 112, 0.16);
  color: #4F7A55;
}

/* Ziel */
.pfad-milestone-ziel {
  background: linear-gradient(135deg, var(--paper) 0%, #FAF2E5 100%);
  border-color: rgba(201, 149, 107, 0.40);
  box-shadow:
    0 1px 2px rgba(70, 60, 40, 0.04),
    0 4px 16px rgba(201, 149, 107, 0.16);
}
.pfad-milestone-ziel .pfad-milestone-label {
  background: rgba(201, 149, 107, 0.20);
  color: #8A5E36;
}
.pfad-milestone-ziel h3 { color: #8A5E36; }

/* Weiterbildung */
.pfad-milestone-weiter {
  background: linear-gradient(135deg, var(--paper) 0%, var(--water-soft) 100%);
  border-color: rgba(76, 122, 138, 0.32);
  max-width: 440px;
}
.pfad-milestone-weiter .pfad-milestone-label {
  background: rgba(76, 122, 138, 0.16);
  color: var(--water-deep);
}
.pfad-milestone-weiter h3 { color: var(--water-deep); }
.pfad-weiter-list {
  margin: var(--space-3) 0 0;
  padding-left: 1.2em;
  list-style: none;
  display: flex; flex-direction: column;
  gap: 4px;
}
.pfad-weiter-list li {
  position: relative;
  padding-left: 1.2em;
  color: var(--ink-soft);
  font-size: var(--fs-md);
  line-height: 1.4;
}
.pfad-weiter-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--water-deep);
  font-weight: 700;
}
.pfad-weiter-list li strong { color: var(--ink); }

/* Mobile: alles linksbündig, Dot links, Karte rechts daneben */
@media (max-width: 700px) {
  .pfad-wrap { padding: var(--space-3) 0 var(--space-7); }
  .pfad-station {
    padding: 0 0 0 var(--space-4) !important;
    justify-content: flex-start !important;
    flex-direction: row !important;
    margin: var(--space-4) 0;
    gap: var(--space-3);
  }
  .pfad-semester { margin: var(--space-5) 0 var(--space-4); }
  .pfad-sem-bubble { width: 56px; height: 56px; }
  .pfad-sem-bubble .pfad-sem-num { font-size: 1.4rem; }
  .pfad-card { max-width: none; flex: 1; }
}

/* ==========================================================================
   Editor (Auftrags-Bearbeitung)
   ========================================================================== */
.edit-toolbar {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.edit-toolbar .btn input[type="file"] { display: none; }

.edit-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 900px) {
  .edit-layout { grid-template-columns: 1fr; }
}

.edit-list {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-3);
  position: sticky; top: 80px;
  max-height: calc(100vh - 100px);
  overflow: auto;
}
.edit-filter {
  display: flex; flex-direction: column; gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
}
.edit-filter input[type="search"] {
  height: 36px; padding: 0 var(--space-3);
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--paper); font: inherit; outline: none;
}
.edit-filter label { font-size: var(--fs-sm); color: var(--ink-soft); display: flex; gap: 6px; align-items: center; }

.edit-items { display: flex; flex-direction: column; gap: 4px; }
.edit-item {
  display: grid; grid-template-columns: 48px 1fr 14px;
  gap: var(--space-2);
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  transition: background .1s, border-color .1s;
  width: 100%;
  font: inherit;
}
.edit-item:hover { background: var(--bg-warm); border-color: var(--border-soft); }
.edit-item .edit-num {
  font-family: var(--font-display); font-weight: 600;
  color: var(--water-deep); font-size: var(--fs-md);
}
.edit-item .edit-title {
  color: var(--ink); font-size: var(--fs-md);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.edit-item .edit-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink-quiet);
  margin-left: auto;
}
.edit-item.is-pending .edit-dot { background: #D9C9A8; }
.edit-item.is-edited  .edit-dot { background: #C0855A; }
.edit-item.is-checked .edit-dot { background: var(--ok); }

.edit-pane {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  min-height: 400px;
  position: relative;
}
.edit-pane-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: var(--space-4);
}
.edit-pane-head h2 { margin: 0; font-family: var(--font-display); }
.edit-pane-head .meta { color: var(--ink-soft); font-size: var(--fs-sm); text-align: right; }

.edit-upload {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-4); flex-wrap: wrap;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}
.edit-upload-info strong { font-size: var(--fs-md); display: block; margin-bottom: 2px; }
.edit-upload-info p { margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); max-width: 420px; }
.edit-upload-info p.is-replaced { color: var(--ok); }
.edit-upload-info code { font-family: var(--font-mono); font-size: var(--fs-xs); }
.edit-upload-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.edit-upload-actions .btn { cursor: pointer; }

.edit-hint {
  font-size: var(--fs-md); color: var(--ink-soft);
  background: var(--water-soft);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
}
.edit-hint code { font-family: var(--font-mono); font-size: var(--fs-sm); }
.edit-form { display: flex; flex-direction: column; gap: var(--space-4); }
.ef { display: flex; flex-direction: column; gap: 6px; }
.ef > span, .ef > legend {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-quiet); padding: 0;
}
.ef input[type="text"],
.ef input[type="search"],
.ef textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--paper); font: inherit; color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  resize: vertical;
}
.ef input[type="text"]:focus,
.ef textarea:focus { border-color: var(--water); box-shadow: 0 0 0 4px var(--water-soft); }
.ef textarea { font-family: var(--font-body); line-height: 1.5; }

fieldset.ef { border: 0; padding: 0; margin: 0; }
.hk-checks {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}
.hk-checks-group {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.hk-checks-group strong { font-size: var(--fs-sm); font-family: var(--font-display); margin-bottom: 4px; }
.hk-check {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 4px 0;
  font-size: var(--fs-sm); color: var(--ink-soft);
  cursor: pointer;
}
.hk-check input { margin-top: 3px; flex-shrink: 0; }

.edit-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--border-soft); }

.edit-flash {
  position: absolute; bottom: 16px; right: 16px;
  background: var(--ok); color: #fff;
  padding: 8px 14px; border-radius: 999px;
  font-weight: 500; font-size: var(--fs-md);
  box-shadow: var(--shadow-2);
  animation: flash-in .2s ease-out;
}
@keyframes flash-in { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ==========================================================================
   Plakat (Handlungskompetenzen) – interaktiv
   ========================================================================== */
.plakat-section { margin-bottom: var(--space-5); }
.plakat-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}
.plakat-hint { color: var(--ink-soft); font-size: var(--fs-md); }

/* Vollbild-Ansicht des Plakats (über den ganzen Bildschirm) */
.plakat-fs {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10, 20, 25, 0.94);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-5);
  overflow: auto;
}
.plakat-fs[hidden] { display: none; }
/* Rahmen ums Vollbild-Plakat: trägt die klickbaren HK-Kacheln (%-Positionen wie in der Normalansicht) */
.plakat-fs-frame {
  position: relative;
  width: 100%; max-width: min(96vw, calc(92vh * 1.414));
  aspect-ratio: 1999 / 1414;
  margin: auto;
  line-height: 0;
}
.plakat-fs-img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
  background: #fff;
  display: block;
}
#plakat-fs-hotspots { position: absolute; inset: 0; }
.plakat-fs-back {
  position: fixed; top: var(--space-4); left: var(--space-4); z-index: 1001;
  display: inline-flex; align-items: center; gap: 4px;
  font: inherit; font-size: var(--fs-md); font-weight: 600;
  color: var(--ink); background: #fff;
  border: none; border-radius: var(--radius);
  padding: 9px 15px 9px 10px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.plakat-fs-back:hover { background: var(--bg-soft); }
body.plakat-fs-open { overflow: hidden; }

.plakat-frame {
  position: relative;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  line-height: 0;
}
.plakat-frame.is-editing { cursor: crosshair; }
#plakat-canvas { display: block; width: 100%; height: auto; }

.plakat-loading {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  gap: 8px;
  background: var(--bg-soft);
  color: var(--ink-quiet);
  font-size: var(--fs-md);
  line-height: 1.5;
  text-align: center;
  padding: var(--space-5);
}
.plakat-loading[hidden] { display: none; }

.plakat-hotspots { position: absolute; inset: 0; }
.plakat-hotspot {
  position: absolute;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
/* Sichtmodus: dezent, beim Hover hervorgehoben */
.plakat-hotspots:not(.is-editing) .plakat-hotspot {
  background: color-mix(in srgb, var(--hs-color) 8%, transparent);
}
.plakat-hotspots:not(.is-editing) .plakat-hotspot:hover {
  background: color-mix(in srgb, var(--hs-color) 26%, transparent);
  border-color: var(--hs-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hs-color) 25%, transparent);
}
.plakat-hotspot-label {
  position: absolute; top: 2px; left: 4px;
  font-size: var(--fs-2xs); font-weight: 700;
  color: var(--hs-color);
  background: rgba(255,255,255,0.82);
  padding: 0 4px; border-radius: 4px;
  opacity: 0; transition: opacity .15s;
}
.plakat-hotspots:not(.is-editing) .plakat-hotspot:hover .plakat-hotspot-label { opacity: 1; }

/* Edit-Modus */
.plakat-hotspot.is-edit {
  background: color-mix(in srgb, var(--hs-color) 16%, transparent);
  border: 2px dashed var(--hs-color);
  cursor: move;
}
.plakat-hotspot.is-unassigned.is-edit {
  border-color: var(--danger);
  background: rgba(184, 92, 92, 0.14);
}
.plakat-hotspot-edit {
  position: absolute; top: 100%; left: 0;
  margin-top: 2px;
  display: flex; gap: 4px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  z-index: 5;
  box-shadow: var(--shadow-2);
}
.plakat-hk-select {
  font-size: var(--fs-xs); max-width: 160px;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 4px;
}
.plakat-hs-del {
  background: var(--danger); color: #fff; border: 0;
  width: 22px; border-radius: 6px; cursor: pointer;
}

.plakat-edit-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-3); flex-wrap: wrap;
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--water-soft);
  border-radius: var(--radius);
  font-size: var(--fs-md); color: var(--water-deep);
}
.plakat-edit-bar[hidden] { display: none; }
.plakat-edit-actions { display: flex; gap: var(--space-2); }

/* ==========================================================================
   HK-Overlay (Plakat-Klick → Aufträge)
   ========================================================================== */
body.has-overlay { overflow: hidden; }
.hk-overlay {
  position: fixed; inset: 0; z-index: 1200;   /* über allem, auch über dem Vollbild-Plakat */
  display: grid; place-items: center;
  padding: var(--space-4);
}
.hk-overlay-backdrop {
  position: absolute; inset: 0;
  background: rgba(40, 38, 34, 0.45);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.hk-overlay-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  padding: var(--space-5);
  animation: hk-overlay-in .22s ease-out;
}
@keyframes hk-overlay-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hk-overlay-close {
  position: absolute; top: var(--space-3); right: var(--space-3);
  width: 36px; height: 36px;
  border-radius: 999px; border: 0;
  background: var(--ink); color: #fff;
  cursor: pointer; font-size: var(--fs-base);
}
.hk-overlay-head {
  display: flex; gap: var(--space-4); align-items: center;
  margin-bottom: var(--space-4);
  padding-right: 40px;
}
.hk-overlay-code {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  color: #fff; font-family: var(--font-display);
  font-weight: 600; font-size: 1.2rem;
  flex-shrink: 0;
}
.hk-overlay-head h2 { margin: 0 0 2px; font-size: 1.3rem; }
.hk-overlay-head p { margin: 0; color: var(--ink-soft); font-size: var(--fs-md); }
.hk-overlay-semrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
}
.hk-overlay-semlabel { font-size: var(--fs-sm); color: var(--ink-quiet); font-weight: 500; }
.hk-overlay-sembadge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--water-soft);
  color: var(--water-deep);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.hk-overlay-count { color: var(--ink-soft); font-size: var(--fs-md); margin-bottom: var(--space-3); }
.hk-overlay-aufs { display: flex; flex-direction: column; gap: var(--space-2); }
.hk-overlay-auftrag {
  display: grid; grid-template-columns: 52px 1fr auto;
  gap: var(--space-3); align-items: center;
  padding: var(--space-3);
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: transform .1s, border-color .12s, box-shadow .12s;
}
.hk-overlay-auftrag:hover {
  transform: translateX(2px);
  border-color: var(--sand-strong);
  box-shadow: var(--shadow-1);
  text-decoration: none;
}
.hk-oa-num { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.hk-oa-titel { font-size: var(--fs-md); color: var(--ink); }
.hk-oa-sem { font-size: var(--fs-xs); color: var(--ink-quiet); white-space: nowrap; }

.hk-overlay-uek {
  text-align: center;
  padding: var(--space-5) var(--space-4);
  background: var(--paper);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.hk-overlay-uek-icon { margin-bottom: var(--space-2); display: flex; justify-content: center; }
.hk-overlay-uek h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--ink);
}
.hk-overlay-uek p {
  margin: 0 auto;
  max-width: 380px;
  color: var(--ink-soft);
  font-size: var(--fs-md);
  line-height: 1.5;
}

/* ==========================================================================
   Auftrag-Detail (auf2) – grosses Vorschaubild, kompakte Info, Info-Toggle
   ========================================================================== */
.auf2 {
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  gap: var(--space-7);
  align-items: start;
}
@media (max-width: 860px) {
  .auf2 { grid-template-columns: 1fr; gap: var(--space-5); }
}

.auf2-media { position: sticky; top: 88px; }
@media (max-width: 860px) { .auf2-media { position: static; } }

.auf-preview-xl {
  position: relative;
  aspect-ratio: 1 / 1.414;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line);
  transition: transform .15s, box-shadow .15s;
  overflow: hidden;
  background: var(--paper);
}
.auf-preview-pending {
  display: grid; place-items: center;
  cursor: default;
  color: var(--ink-quiet);
  font-size: var(--fs-md);
  font-style: italic;
}
/* Scharfe Live-Vorschau (iframe von sanitaerlernen.ch) – klickt durch zur Vollansicht */
.auf-preview-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; pointer-events: none; background: var(--paper);
}
.auf-preview-xl:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-3);
}
.auf-preview-xl .auf-num {
  font-size: var(--fs-lg);
  padding: 6px 12px;
}
.auf-preview-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: 0; transition: opacity .15s;
}
.auf-preview-xl:hover .auf-preview-play { opacity: 1; }
.auf-preview-play svg {
  width: 56px; height: 56px;
  padding: 16px;
  background: rgba(13, 73, 85, 0.9);
  color: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-3);
}
.auf2-open {
  width: 100%;
  justify-content: center;
  margin-top: var(--space-4);
  height: 50px;
  font-size: var(--fs-base);
}

/* Info-Spalte */
.auf2-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: var(--space-4);
}
.auf2-tag {
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.auf2-tag-sem { background: var(--water-soft); color: var(--water-deep); border-color: transparent; font-weight: 600; }
.auf2-tag-hk {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: -0.02em;
  color: var(--hk-color); border-color: color-mix(in srgb, var(--hk-color) 35%, transparent);
  background: color-mix(in srgb, var(--hk-color) 10%, transparent);
}
.auf2-title {
  font-size: clamp(1.5rem, 1.6vw + 1rem, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-5);
  font-weight: 600;
}
.auf2-num {
  font-family: var(--font-mono);
  color: var(--water-deep);
  font-weight: 500;
  margin-right: 6px;
}
.auf2-lead { color: var(--ink-soft); font-size: var(--fs-base); line-height: 1.55; margin: 0 0 var(--space-4); }
.auf2-block { margin-bottom: var(--space-5); }
.auf2-block h2 {
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-quiet); margin-bottom: var(--space-3);
}
.auf2-goals {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.auf2-goals li {
  position: relative; padding-left: 26px;
  color: var(--ink); font-size: var(--fs-base); line-height: 1.4;
}
.auf2-goals li::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--water-deep);
}

/* Info-Button + ausklappbares Panel */
.auf2-infobtn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: var(--space-3);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit; font-size: var(--fs-md); font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.auf2-infobtn:hover { border-color: var(--sand-strong); color: var(--ink); background: var(--bg-soft); }
.auf2-infochev { transition: transform .25s; }
.auf2-infobtn.is-open .auf2-infochev { transform: rotate(180deg); }

.auf2-details {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: var(--space-4);
  animation: auf2-reveal .25s ease-out;
}
.auf2-details[hidden] { display: none; }
@keyframes auf2-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.auf2-dl { display: grid; grid-template-columns: 160px 1fr; gap: var(--space-3); align-items: start; }
@media (max-width: 560px) { .auf2-dl { grid-template-columns: 1fr; gap: 4px; } }
.auf2-dt {
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-quiet); padding-top: 3px;
}
.auf2-dd { color: var(--ink); font-size: var(--fs-md); }
.auf2-dd .pill { margin: 2px 4px 2px 0; }
.auf2-dd .auf2-goals { gap: 6px; }
.auf2-dd .auf2-goals li { font-size: var(--fs-md); }

/* ==========================================================================
   Editor-Passwort-Gate
   ========================================================================== */
.editor-gate {
  min-height: 60vh;
  display: grid; place-items: center;
  padding: var(--space-6) 0;
}
.editor-gate-card {
  width: min(420px, 100%);
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  box-shadow: var(--shadow-2);
}
.editor-gate-icon {
  width: 56px; height: 56px;
  margin: 0 auto var(--space-4);
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--water-soft);
  color: var(--water-deep);
}
.editor-gate-card h1 { font-size: 1.5rem; margin-bottom: var(--space-2); }
.editor-gate-card p { color: var(--ink-soft); font-size: var(--fs-md); margin-bottom: var(--space-5); }
/* IDs müssen zum Markup in renderLehrerGate passen (#lehrer-gate-form / #lehrer-pw) */
#lehrer-gate-form { display: flex; flex-direction: column; gap: var(--space-3); }
#lehrer-pw {
  height: 48px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: var(--fs-base); text-align: center;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
#lehrer-pw:focus { border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-light); }
#lehrer-gate-form .btn { justify-content: center; height: 48px; }
.editor-gate-merken {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: var(--fs-sm); color: var(--ink-soft); cursor: pointer;
}
.editor-gate-merken input { width: 17px; height: 17px; accent-color: var(--brand-dark); cursor: pointer; }
.editor-gate-hint { font-size: var(--fs-xs) !important; color: var(--ink-quiet) !important; line-height: 1.45; margin: var(--space-3) 0 0 !important; }
.editor-gate-error { color: var(--danger) !important; font-weight: 500; margin: var(--space-3) 0 0 !important; }
.editor-gate-back { display: inline-block; margin-top: var(--space-4); font-size: var(--fs-md); color: var(--ink-quiet); }

/* ==========================================================================
   Tagesprogramm (neue Startseite)
   ========================================================================== */
.btn-brand { background: var(--brand); color: var(--brand-darker); border-color: var(--brand); font-weight: 600; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }

.tp { padding-top: 0; }

/* Kopfbereich */
.tp-head {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.tp-head-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.tp-classpick { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.tp-classpick > label {
  font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-quiet);
}
.tp-classpick .select-wrap select { height: 46px; font-size: var(--fs-base); font-weight: 700; background: var(--bg-soft); }

/* Status-Badge */
.tp-status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap;
}
.tp-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tp-status--heute     { background: var(--brand-light); color: var(--brand-darker); }
.tp-status--naechster { background: var(--water-soft); color: var(--water-deep); }
.tp-status--ferien    { background: #FBEFD8; color: #8A5A12; }
.tp-status--vorbei    { background: var(--bg-soft); color: var(--ink-quiet); }

/* Datum + Navigation */
.tp-dateline {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-5); flex-wrap: wrap;
}
.tp-date { display: flex; flex-direction: column; gap: 2px; }
.tp-weekday {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.2vw + 1rem, 2.7rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  color: var(--ink);
}
.tp-fulldate { font-size: var(--fs-lg); font-weight: 600; color: var(--ink-soft); }
.tp-meta { margin-top: 4px; font-size: var(--fs-sm); color: var(--ink-quiet); }
.tp-meta .tp-dot { margin: 0 6px; opacity: .5; }

.tp-nav { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.tp-nav .btn { height: 40px; }
.tp-navbtn[disabled] { opacity: .4; pointer-events: none; }

/* Ferien-/Hinweisbanner */
.tp-banner {
  display: flex; align-items: center; gap: var(--space-3);
  background: #FBEFD8; color: #7A4F10;
  border: 1px solid #F0DCB0; border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
  font-size: var(--fs-md); font-weight: 500;
}
.tp-banner svg { color: #C08A2E; flex-shrink: 0; }

/* Lektionsliste */
.tp-section-label {
  display: flex; align-items: baseline; gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-3);
}
.tp-section-label h2 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.tp-section-label .meta { color: var(--ink-quiet); font-size: var(--fs-sm); }

.lektion-list { display: flex; flex-direction: column; gap: var(--space-3); }
/* 2 Blöcke (Lektion 1–3 / 4–5), je mit Titel + Auftrag, dezent in Auftragsfarbe getönt */
.lektion-blocks { display: flex; flex-direction: column; gap: var(--space-3); }
.lektion-block { padding: var(--space-3) var(--space-4); border-radius: var(--radius); border: 1px solid transparent; }
.lektion-block.has-blk {
  background: var(--blk-bg);
  border-color: var(--blk-bd, var(--border));
  border-left: 3px solid var(--blk);
}
.lektion-block-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3);
  padding-bottom: 5px;
}
.blk-titel-wrap { min-width: 0; display: flex; flex-direction: column; gap: 0; }
.lektion-group-label {
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-quiet);
}
.lektion-block.has-blk .lektion-group-label { color: var(--blk); opacity: .75; }
.blk-titel { font-size: var(--fs-base); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); line-height: 1.25; }
/* Fusszeile eines Blocks: LZ-Button + Lernauftrag-Chip zusammen LINKS auf einer Zeile
   (linksbündig, damit beide auch im schmalen Teams-Ausschnitt sicher sichtbar sind) */
.blk-foot {
  display: flex; align-items: center; justify-content: flex-start;
  gap: var(--space-3); flex-wrap: wrap;
  margin-top: var(--space-2);
}
.blk-foot .lz-btn-inline { margin-top: 0; }
.blk-auf-wrap { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; }

/* Inhalte der Tageskachel müssen nicht über die ganze Breite laufen:
   angenehme Lesebreite auf grossen Bildschirmen (Kachel/Rahmen bleibt full-bleed) */
@media (min-width: 1100px) {
  .tp-dc-body .lektion-blocks,
  .tp-dc-body .ha-box,
  .tp-dc-body .tp-chiprow,
  .tp-dc-body .tp-zusatz,
  .tp-dc-body .tp-pruef-vorab,
  .tp-dc-body .tp-sondertag,
  .tp-dc-body .tp-ausfall { max-width: 920px; }
}
.blk-auf-label { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-quiet); white-space: nowrap; }
.lektion-block.has-blk .blk-auf-label { color: var(--blk); opacity: .8; }
.blk-auf {
  flex-shrink: 0; align-self: flex-start;
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-md);
  color: #fff; background: var(--blk, var(--ink)); border-radius: 7px; padding: 3px 11px;
  text-decoration: none;
}
.blk-auf:hover { text-decoration: none; filter: brightness(1.12); }
.blk-auf.is-pending { background: none; color: var(--ink-quiet); border: 1px dashed var(--line); }
.lektion-row { display: flex; gap: var(--space-3); padding: 7px 0; align-items: baseline; }
.lektion-row + .lektion-row { border-top: 1px solid var(--border-soft); }
.lektion-zeit {
  flex-shrink: 0; width: 86px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: var(--ink-soft);
  letter-spacing: -0.02em;
}
.lektion-row.is-empty .lektion-zeit { color: var(--ink-quiet); }
.lektion-row-body { min-width: 0; flex: 1; }
.lektion-thema { font-size: var(--fs-md); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin: 0; line-height: 1.3; }
/* Leere Lektion: Zeit bleibt stehen, der Textbereich bleibt leer –
   min-height hält die Zeilenhöhe, damit das Raster nicht zusammenfällt. */
.lektion-row.is-empty .lektion-thema { color: var(--ink-quiet); font-weight: 500; min-height: 1.3em; }
/* Prüfung direkt in der Lektion: grün hinterlegt + fett, mit verlinktem Ziel-Icon.
   KEIN horizontales Padding → Text bleibt bündig mit den übrigen Lektionen. */
.lektion-row.is-pruef { background: #E7F0CE; border-radius: var(--radius-sm); }
.lektion-row.is-pruef + .lektion-row { border-top: none; }
.lektion-row.is-pruef .lektion-thema { font-weight: 800; color: #33430F; }
.lektion-row.is-pruef .lz-icon-link { display: inline-flex; vertical-align: -3px; color: #5F7A1F; }
.lektion-row.is-pruef .lz-icon-link:hover { color: #33430F; }
.lektion-row.is-pruef .lz-icon { width: 18px; height: 18px; }

/* Einzelne Zeile für den ganzen Block (im Excel steht nur ein Stichpunkt):
   Zeit = ganzer Blockzeitraum. Bündig wie alle anderen Lektionszeilen, nur
   etwas luftiger, weil sie allein im Block steht. */
.lektion-row.is-solo { padding: var(--space-3) 0; }

/* Freie Liste (Standard): Die Zeit links ist nur Orientierung, sie gehört NICHT
   fest zur Zeile daneben – ein Thema kann über 1,5 Lektionen laufen. Darum
   ohne Trennlinien und mit zurückhaltender, durch einen Punkt abgesetzter Zeit.
   Fest zugeordnet (mit Trennlinien) wird nur bei blk.proLektion. */
.lektion-row.is-free + .lektion-row.is-free { border-top: none; }
.lektion-row.is-free { padding: 5px 0; }
.lektion-row.is-free .lektion-zeit {
  width: 62px; font-weight: 500; color: var(--ink-quiet);
  display: inline-flex; justify-content: space-between; gap: var(--space-2);
}
.lektion-row.is-free .lektion-zeit::after { content: "·"; color: var(--sand-strong); }
/* Stichpunkt ohne eigene Zeit (Thema läuft weiter): kein einsamer Punkt */
.lektion-row.is-free .lektion-zeit:empty::after { content: ""; }
.lektion-row.is-free.is-empty .lektion-zeit::after { color: var(--border); }
.lektion-row.is-free.is-solo .lektion-zeit { width: auto; }
.lektion-row.is-free.is-solo .lektion-zeit::after { content: ""; margin-left: var(--space-2); }
@media (max-width: 560px) { .lektion-row.is-free .lektion-zeit { width: 54px; } }

.lektion-material { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.mat-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft);
  border: 1px solid var(--border);
  font-size: var(--fs-2xs); font-weight: 500;
}
.mat-chip svg { width: 11px; height: 11px; color: var(--ink-quiet); }
.lektion-notizen { margin: 4px 0 0; color: var(--ink-quiet); font-size: var(--fs-sm); line-height: 1.4; }
.lektion-thema :is(ul, ol),
.lektion-notizen :is(ul, ol),
.lektion-rich-content :is(ul, ol) { margin: 4px 0; padding-left: 21px; }
.lektion-thema blockquote,
.lektion-notizen blockquote,
.lektion-rich-content blockquote { margin: 5px 0; padding-left: 10px; border-left: 3px solid var(--brand); color: var(--ink-soft); }
.lektion-rich-content { font-size: var(--fs-md); font-weight: 600; color: var(--ink); line-height: 1.4; }
.lektion-rich-content a,
.lektion-thema a,
.lektion-notizen a { color: var(--brand-darker); text-decoration: underline; text-underline-offset: 2px; }

/* Prüfungs-Hinweis – dezent, ruhig (am Prüfungstag oben / 2 Wochen davor unten) */
.tp-pruef-top, .tp-pruef-vorab {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-2) var(--space-3);
  font-size: var(--fs-md); color: var(--ink-soft);
}
.tp-pruef-vorab { margin-top: var(--space-3); }
.tp-pruef-vorab .lz-icon { color: var(--ink-soft); flex-shrink: 0; }
.tp-pruef-vorab strong { color: var(--ink); }
.tp-pruef-top > span, .tp-pruef-vorab > span { flex: 1; min-width: 0; }
/* Prüfung AM Schultag: kräftig grün hinterlegt, fett (wie im Excel markiert) */
.tp-pruef-top {
  margin-bottom: var(--space-3);
  background: #E7F0CE; border-color: #9BBB59; color: var(--ink); font-weight: 600;
}
.tp-pruef-top strong { color: var(--ink); font-weight: 800; }
.tp-pruef-top .lz-icon { color: #5F7A1F; flex-shrink: 0; }
.tp-pruef-top .tp-pruef-lz { background: #fff; border-color: #9BBB59; color: #4C6318; }
.tp-pruef-top .tp-pruef-lz:hover { border-color: #77933C; }
.tp-pruef-list { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.tp-pruef-list .tp-pruef-top { margin-bottom: 0; }
.tp-pruef-lz {
  flex-shrink: 0; font-weight: 600; font-size: var(--fs-sm); color: var(--ink);
  background: var(--paper); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px; text-decoration: none; white-space: nowrap;
}
.tp-pruef-lz:hover { border-color: var(--ink-soft); text-decoration: none; }

/* Prüfungs-Hinweis in der Hausaufgaben-Box: schlicht "Prüfung am <Datum>" fett
   + verlinktes Ziel-Icon, kein eigener Balken */
.ha-pruef {
  display: flex; align-items: center; gap: 7px;
  width: fit-content; max-width: 100%;
  min-height: 34px; margin: 6px 0 0; padding: 4px 8px; border-radius: var(--radius-sm);
  background: rgba(231, 240, 206, .45); border: 1px solid rgba(155, 187, 89, .36);
  color: #455622; text-decoration: none;
}
.ha-pruef:hover { border-color: rgba(119, 147, 60, .62); background: rgba(231, 240, 206, .68); color: #33430F; text-decoration: none; }
.ha-pruef .lz-icon { flex-shrink: 0; width: 16px; height: 16px; color: #5F7A1F; opacity: .9; }
.ha-pruef-text { min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ha-pruef-text strong { font-size: var(--fs-xs); font-weight: 700; color: #455622; }
.ha-pruef:hover .ha-pruef-text strong { color: #33430F; }
.ha-pruef-text small { font-size: var(--fs-2xs); color: #5F6F31; }
.ha-pruef-list { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.ha-pruef-list .ha-pruef { margin-top: 0; }
/* Vorab-Lernziele (untere Box, 2 Wochen vor der Prüfung) – neutral, nicht fett, ohne Farbmarkierung */
.ha-pruef-vorab { flex-wrap: wrap; }
.ha-pruef-vorab .lz-icon-link { display: inline-flex; align-items: center; gap: 2px; line-height: 1.2; color: #455622; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ha-pruef-vorab .lz-icon-link:hover { color: #33430F; }
.ha-pruef-vorab .lz-icon-link .lz-icon { width: 14px; height: 14px; }
.ha-lnw-list { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.ha-lnw {
  display: flex; align-items: center; gap: 7px;
  width: fit-content; max-width: 100%;
  min-height: 34px; padding: 4px 8px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .48); border: 1px solid var(--border);
  color: var(--ink-soft); text-decoration: none;
}
.ha-lnw:hover { border-color: var(--ink-quiet); background: var(--paper); color: var(--ink); text-decoration: none; }
.ha-lnw .lnw-icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--ink-quiet); opacity: .85; }
.ha-lnw:hover .lnw-icon { color: var(--ink-soft); opacity: 1; }
.ha-lnw-text { min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ha-lnw-text strong { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); }
.ha-lnw:hover .ha-lnw-text strong { color: var(--ink); }
.ha-lnw-text small { font-size: var(--fs-2xs); color: var(--ink-quiet); }

/* Zusatzmaterial-Button (aufklappbar) */
.tp-zusatz { margin-top: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); }
.tp-zusatz-sum { display: flex; align-items: center; gap: 8px; padding: var(--space-2) var(--space-3); cursor: pointer; font-weight: 600; font-size: var(--fs-sm); color: var(--ink); list-style: none; }
.tp-zusatz-sum::-webkit-details-marker { display: none; }
.tp-zusatz-sum:hover { background: var(--bg-soft); }
.tp-zusatz-count { background: var(--brand); color: var(--ink); font-size: var(--fs-2xs); font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.tp-zusatz-chev { margin-left: auto; transition: transform .15s; color: var(--ink-quiet); }
.tp-zusatz[open] .tp-zusatz-chev { transform: rotate(180deg); }
.tp-zusatz-list { padding: 0 var(--space-3) var(--space-3); }

/* Editor: einklappbare „Hausaufgaben auf diesen Schultag"-Box */
.ed-collapse > summary { list-style: none; cursor: pointer; }
.ed-collapse > summary::-webkit-details-marker { display: none; }
.ed-collapse-sum { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); padding: 2px 0; }
.ed-collapse-hint { font-weight: 400; color: var(--ink-quiet); font-size: var(--fs-2xs); }
.ed-collapse[open] .ed-collapse-hint { display: none; }
.ed-ha-auto { margin-top: var(--space-2); }

/* Bestätigungs-Dialog (Klassenwechsel) */
.confirm-panel { max-width: 440px; text-align: left; }
.confirm-msg { font-size: var(--fs-base); font-weight: 600; color: var(--ink); margin: 0 0 var(--space-3); }
.confirm-dontask { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--space-4); cursor: pointer; }
.confirm-dontask input { width: 16px; height: 16px; accent-color: var(--brand); }
.confirm-actions { display: flex; gap: var(--space-2); justify-content: flex-end; }
.confirm-sub { font-size: var(--fs-sm); color: var(--ink-soft); margin: 0 0 var(--space-4); line-height: 1.45; }
.confirm-actions-col { flex-direction: column; align-items: stretch; }
.confirm-actions-col .btn { width: 100%; justify-content: center; }

/* Editor: Prüfungs-Feld */
.ed-pruef-row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
@media (max-width: 480px) { .ed-pruef-row { grid-template-columns: 1fr; } }

.lektion-pause {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 5px 0; margin: 2px 0;
  color: var(--ink-quiet); font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
/* „Pause" linksbündig: keine linke Linie, Linie füllt rechts auf */
.lektion-pause::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Ferien-Trenner in der Kachel-Übersicht (volle Breite zwischen den Schultagen) */
.tp-ferien-sep {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: var(--space-3);
  margin: var(--space-1) 0;
}
/* Ferienbalken linksbündig: nur rechts der Pille läuft die Linie weiter */
.tp-ferien-sep::after { content: ""; flex: 1; border-top: 1px dashed var(--sand-strong); }
.tp-ferien-sep span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 13px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--ink-quiet); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0.02em;
}
.tp-ferien-sep span svg { color: var(--brand-dark); }

/* Lernaufträge + Zusatzlinks als Chips */
.tp-chiprow { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tp-auf-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 14px 9px 11px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--border);
  color: var(--ink); font-weight: 500; font-size: var(--fs-md);
  transition: border-color .15s, background .15s, transform .05s;
}
.tp-auf-chip:hover { border-color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.tp-auf-chip:active { transform: translateY(1px); }
.tp-auf-chip .tp-auf-num {
  font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-xs);
  background: var(--brand-light); color: var(--brand-darker);
  padding: 2px 7px; border-radius: 6px;
}
.tp-auf-chip .tp-auf-titel { color: var(--ink-soft); }
.tp-link-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--ink-soft); font-weight: 500; font-size: var(--fs-md);
  transition: border-color .15s, color .15s;
}
.tp-link-chip:hover { border-color: var(--water); color: var(--water-deep); text-decoration: none; }
.tp-link-chip svg { color: var(--ink-quiet); }
.tp-link-chip.tp-link-video {
  border-color: rgba(0, 124, 145, 0.28);
  background: rgba(0, 124, 145, 0.06);
}
.tp-link-chip.tp-link-video svg { color: var(--water); }
.tp-link-chip.tp-link-video:hover { border-color: var(--water); color: var(--water-deep); }

/* Leerer Schultag */
.tp-empty {
  text-align: center; padding: var(--space-7) var(--space-5);
  background: var(--bg-soft); border: 1px dashed var(--border);
  border-radius: var(--radius-lg); color: var(--ink-quiet);
}
.tp-empty svg { color: var(--sand-strong); margin: 0 auto var(--space-3); }
.tp-empty h3 { color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }

/* ==========================================================================
   Semesterübersicht – einklappbare Timeline
   ========================================================================== */
.sem-tl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin: var(--space-4) 0 var(--space-5); }
.sem-timeline { display: flex; flex-direction: column; }
.sem-day { border-left: 2px solid var(--border); padding-left: var(--space-4); position: relative; }
.sem-day::before {
  content: ""; position: absolute; left: -7px; top: 18px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--sand-strong);
}
.sem-day.is-today::before { border-color: var(--brand); background: var(--brand); }
.sem-day.is-filled::before { border-color: var(--brand-dark); }
.sem-day-head {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-3) 0;
  background: transparent; border: none;
  border-radius: var(--radius);
}
.sem-day-head:hover { background: var(--bg-soft); }
.sem-day-date { display: flex; flex-direction: column; gap: 1px; }
.sem-day-date .d-wd { font-weight: 600; font-size: var(--fs-md); color: var(--ink); }
.sem-day-date .d-full { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-quiet); }
.sem-day-topic { color: var(--ink-soft); font-size: var(--fs-md); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sem-day-topic.is-empty { color: var(--ink-quiet); font-style: italic; }
.sem-day-meta { display: flex; align-items: center; gap: var(--space-3); }
.sem-day-badge { font-size: var(--fs-2xs); font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--brand-light); color: var(--brand-darker); }
.sem-day-chev { color: var(--ink-quiet); transition: transform .2s; }
.sem-day.is-open .sem-day-chev { transform: rotate(180deg); }
.sem-day-body { padding: 0 0 var(--space-4); }
.sem-day:not(.is-open) .sem-day-body { display: none; }

@media (max-width: 560px) {
  .tp-head { padding: var(--space-4); }
  .tp-dateline { align-items: flex-start; }
  .tp-nav .btn { flex: 1; justify-content: center; }
  .lektion-card { grid-template-columns: 34px 1fr; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
  .lektion-num { width: 32px; height: 32px; font-size: var(--fs-md); }
  .sem-day-head { grid-template-columns: auto 1fr auto; }
  .sem-day-topic { display: none; }
}

/* ==========================================================================
   Tagesprogramm v2: Klassen-Tag, Überthema, Hausaufgaben, Kacheln
   ========================================================================== */
/* Schlanke Leiste: Klasse (Auswahl in der Sidebar) + Tagesnavigation */
.tp-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.tp-bku {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.01em; color: var(--ink);
}
/* Tagesnavigation – dezent, modern, fully responsive */
.tp-nav { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.tp-nav-group { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.tp-navbtn {
  height: 36px; min-width: 38px; padding: 0 12px; border: none; background: transparent;
  color: var(--ink-soft); font: inherit; font-size: var(--fs-md); font-weight: 500; cursor: pointer;
  transition: background .15s, color .15s;
}
.tp-navbtn + .tp-navbtn { border-left: 1px solid var(--border); }
.tp-navbtn:hover:not([disabled]) { background: var(--bg-soft); color: var(--ink); }
.tp-navbtn[disabled] { opacity: .35; cursor: default; }
.tp-navbtn-mid { font-weight: 600; color: var(--ink); }
.tp-navlink {
  height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: transparent; color: var(--ink-soft); font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.tp-navlink:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--sand-strong); }
@media (max-width: 560px) {
  .tp-bar { gap: var(--space-2); }
  .tp-bku { font-size: var(--fs-md); }
  .tp-nav { width: 100%; }
  .tp-navbtn { font-size: var(--fs-sm); padding: 0 10px; }
}

/* Tageskachel: der komplette Schultag in EINER Karte.
   Kopf = durchgehend schwarzer Balken (volle Kartenbreite) mit Titel, Klasse,
   Schultag und Navigation; darunter der weisse Inhaltsbereich. */
.tp-daycard {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.tp-dc-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3) var(--space-4);
  background: var(--brand); color: var(--ink);   /* GBS-Hellgrün, schwarze Schrift */
  padding: var(--space-4);
}
.tp-dc-body { padding: var(--space-5); }
.tp-dc-num {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0; width: 54px; padding: 6px 0;
  background: var(--ink); color: #fff; border-radius: var(--radius); line-height: 1;
}
.tp-dc-num-l { font-size: 0.54rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; opacity: .8; }
.tp-dc-num strong { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; margin: 2px 0 1px; }
.tp-dc-of { font-size: 0.6rem; opacity: .7; }
.tp-dc-when { flex: 0 1 auto; min-width: 180px; display: flex; flex-direction: column; gap: var(--space-2); }
.tp-dc-eyebrow { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
/* Schwarzes Feld mit Schultag-Nr + Wochentag + Datum (weisse Schrift), rechts daneben die Klasse */
.tp-dc-idrow { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3) var(--space-4); }
/* Schwarzes Feld: breit & flach, alles in EINER Reihe – Nummer · Wochentag · Datum (weiss) */
.tp-dc-daybox {
  display: inline-flex; flex-direction: row; align-items: baseline; gap: var(--space-3);
  background: var(--ink); color: #fff;
  border-radius: var(--radius); padding: 5px 18px;
}
.tp-dc-daynr { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; line-height: 1; color: #fff; }
.tp-dc-wd { font-family: var(--font-display); font-size: clamp(1.2rem, 0.9vw + 0.85rem, 1.55rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: #fff; }
.tp-dc-date { font-size: var(--fs-md); font-weight: 600; color: rgba(255, 255, 255, 0.82); white-space: nowrap; }
.tp-dc-klasse { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.tp-dc-sem { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 12px; white-space: nowrap; }
.tp-dc-thema { margin-top: 2px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }

/* Navigation im hellgrünen Kopfbalken (für hellen Hintergrund: dunkle Schrift/Ränder) */
/* Navi (Aktuell/vor/zurück + Alle Schultage) IMMER in einer eigenen Zeile unter dem Kopf
   (wie in der Mobil-Ansicht) – links, gut sichtbar auch im Teams-Ausschnitt. */
.tp-dc-head .tp-nav { flex: 1 0 100%; margin-left: 0; }
.tp-dc-head .tp-nav-group { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.22); }
.tp-dc-head .tp-navbtn { color: rgba(0, 0, 0, 0.7); }
.tp-dc-head .tp-navbtn-mid { color: var(--ink); }
.tp-dc-head .tp-navbtn + .tp-navbtn { border-left-color: rgba(0, 0, 0, 0.18); }
.tp-dc-head .tp-navbtn:hover:not([disabled]) { background: rgba(0, 0, 0, 0.1); color: var(--ink); }
.tp-dc-head .tp-navlink { color: var(--ink); border-color: rgba(0, 0, 0, 0.28); background: transparent; }
.tp-dc-head .tp-navlink:hover { background: rgba(0, 0, 0, 0.08); color: var(--ink); border-color: rgba(0, 0, 0, 0.45); }
.tp-dc-label {
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-quiet); margin: 0 0 var(--space-2);
}
.tp-daycard .tp-section-label { margin: var(--space-4) 0 var(--space-2); }
.tp-daycard .tp-section-label h2 { font-size: var(--fs-md); }
.tp-empty-inline { padding: var(--space-4); margin-top: var(--space-2); }

/* Verschobener/ausgefallener Schultag – Hinweis in der Tageskachel */
/* Sondertag (z. B. Schneesporttage) – prominenter, freundlicher Hinweis */
.tp-sondertag {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-5); background: var(--brand-soft); border: 1px solid var(--brand);
  border-radius: var(--radius); color: var(--ink);
}
.tp-sondertag svg { color: var(--brand-dark); flex-shrink: 0; }
.tp-sondertag strong { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.02em; }

.tp-ausfall { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink-soft); }
.tp-ausfall svg { color: var(--ink-soft); flex-shrink: 0; margin-top: 1px; }
.tp-ausfall strong { color: var(--ink); }
.tp-ausfall p { margin: 4px 0 0; }
.tp-ausfall-hint { font-size: var(--fs-sm); color: var(--ink-quiet); }

/* Editor: Ausfall/Verschoben-Box */
.ed-ausfall-toggle { display: flex; align-items: center; gap: 8px; font-size: var(--fs-md); cursor: pointer; margin-bottom: var(--space-2); }
.ed-ausfall-toggle input { width: 18px; height: 18px; flex-shrink: 0; }

/* Lernziele als ausklappbare runde Buttons (platzsparend, fully responsive) */
.tp-lz2 { margin-bottom: var(--space-3); }
.tp-lz2-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.tp-lz2-label { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-quiet); margin-right: 2px; }
.lz-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--ink);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.lz-btn:hover { border-color: var(--brand-dark); }
.lz-btn.is-open { background: var(--brand-light); border-color: var(--brand); color: var(--brand-darker); }
.lz-btn-ic { color: var(--brand-dark); flex-shrink: 0; }
.lz-btn.is-open .lz-btn-ic { color: var(--brand-darker); }
.lz-btn-chev { opacity: .55; transition: transform .2s; }
.lz-btn.is-open .lz-btn-chev { transform: rotate(180deg); }
.lz-panel { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-3) var(--space-4); margin-top: var(--space-2); }
.lz-panel[hidden] { display: none; }
.lz-list2 { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.lz-list2 li { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.4; }

/* Lernziele-Button innerhalb eines Lektionsblocks (in der Auftragsfarbe) */
.lz-btn-inline { margin-top: var(--space-2); padding: 5px 12px; font-size: var(--fs-xs); }
.lz-btn-inline .lz-icon { width: 15px; height: 15px; flex-shrink: 0; color: var(--ink-soft); }
.has-blk .lz-btn-inline { background: var(--paper); border-color: var(--blk-bd, var(--border)); color: var(--blk); }
.has-blk .lz-btn-inline .lz-icon { color: var(--blk); }
.has-blk .lz-btn-inline:hover { border-color: var(--blk); }
.has-blk .lz-btn-inline.is-open { background: var(--blk-bg); border-color: var(--blk); color: var(--blk); }
.has-blk .lz-panel { background: var(--paper); border-color: var(--blk-bd, var(--border)); }

/* Hausaufgaben-Bänder innerhalb der Tageskachel – kompakt */
.ha-due-pop {
  margin: 0 0 var(--space-2);
  min-height: 34px;
}
.ha-due-pop > summary {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  cursor: pointer;
}
.ha-due-pop > summary::-webkit-details-marker { display: none; }
.ha-due-pop > summary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(190, 58, 58, .38);
  background: rgba(255, 235, 235, .92);
  color: #8d2424;
  font-size: var(--fs-xs);
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(190, 58, 58, .08);
}
.ha-due-pop[open] > summary span {
  background: #fff2f2;
  border-color: rgba(190, 58, 58, .62);
}
.ha-due-panel {
  margin-top: var(--space-2);
  padding: var(--space-2);
  border: 1px solid rgba(190, 58, 58, .22);
  border-radius: var(--radius);
  background: rgba(255, 248, 248, .82);
  overscroll-behavior: contain;
}
.ha-due-panel-actions {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  margin: 0 0 var(--space-2);
  pointer-events: none;
}
.ha-due-close {
  min-height: 32px;
  padding: 5px 13px;
  border: 1px solid rgba(190, 58, 58, .34);
  border-radius: 999px;
  background: var(--paper);
  color: #8d2424;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 850;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  pointer-events: auto;
}
.ha-due-close:hover { border-color: rgba(190, 58, 58, .62); background: #fff7f7; }
.ha-due-panel .ha-box { margin: 0; background: var(--paper); }
body.has-ha-due-pop:not(.is-embed) { overflow: hidden; }
body:not(.is-embed) .ha-due-pop[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(15, 25, 29, .46);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
body:not(.is-embed) .ha-due-pop[open] > summary { display: none; }
body:not(.is-embed) .ha-due-pop[open] .ha-due-panel {
  position: fixed;
  z-index: 1191;
  left: 50%;
  top: 50%;
  width: min(760px, calc(100vw - 32px));
  max-height: min(78vh, 760px);
  overflow: auto;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: var(--space-3);
  border-color: rgba(190, 58, 58, .28);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-3);
}
body.is-appmode .ha-due-pop[open] .ha-due-panel {
  left: 12px;
  right: 12px;
  top: calc(env(safe-area-inset-top) + 70px);
  bottom: calc(env(safe-area-inset-bottom) + 86px);
  width: auto;
  max-height: none;
  transform: none;
  padding: var(--space-3);
}
.ha-box { border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.ha-faellig { border-left: 3px solid var(--ink); background: var(--bg-soft); margin-bottom: var(--space-3); }
.ha-naechste { border-left: 3px solid var(--brand); background: var(--brand-soft); margin-top: var(--space-3); }
.ha-head {
  display: flex; align-items: center; gap: 7px;
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 3px;
}
.ha-head svg { width: 15px; height: 15px; }
.ha-naechste .ha-head { color: var(--brand-darker); }
.ha-naechste .ha-head svg { color: var(--brand-dark); }
.ha-faellig .ha-head svg { color: var(--ink); }
.ha-text { margin: 0; color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.4; }
/* Hausaufgaben als Aufzählung – jede Zeile eine Aufgabe mit Punkt davor */
.ha-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ha-list li {
  position: relative; padding-left: 16px;
  color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.4;
}
.ha-list li::before {
  content: ""; position: absolute; left: 3px; top: 0.55em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--ink-quiet);
}
.ha-naechste .ha-list li::before { background: var(--brand-dark); }
.ha-rich {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.45;
  white-space: pre-wrap;
}
.ha-rich :is(ul, ol) { margin: 3px 0; padding-left: 22px; white-space: normal; }
.ha-rich li { margin: 2px 0; }
.ha-rich a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.ha-rich blockquote { margin: 5px 0; padding-left: 10px; border-left: 3px solid var(--brand); color: var(--ink-soft); }
.ha-fotos { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.ha-foto { display: inline-block; width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.ha-foto img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 480px) {
  .tp-daycard { padding: var(--space-3); }
  .tp-dc-head { gap: var(--space-2); }
  .tp-dc-num { width: 46px; }
  .tp-dc-num strong { font-size: 1.3rem; }
  .lektion-zeit { width: 66px; font-size: var(--fs-2xs); }
  .lektion-row { gap: var(--space-2); }
}

/* ==========================================================================
   Embed-Modus (eingebettet, z. B. als Teams-Reiter)
   Ziel: der GANZE Schultag passt ohne Scrollen in den iframe.
   Kerngedanke: die zwei Blöcke (Lektion 1–3 / 4–5) nebeneinander statt
   untereinander → etwa halbe Höhe; dazu Footer aus + kompaktere Abstände.
   ========================================================================== */
body.is-embed .footer { display: none; }
/* Teams/Embed: die Klasse ist über den Reiter-Deeplink fix vorgegeben → die
   Klassen-Auswahl (Dropdown) und der Lehrer-Bereich werden dort nicht gebraucht. */
body.is-embed .sidebar-klasse { display: none; }
body.is-embed .sidebar-lehrer { display: none; }
/* Links ausgerichtet (kein Zentrieren). fitEmbed() in app.js setzt per JS ein
   zoom < 1, bis der ganze Schultag in die sichtbare iframe-Höhe passt. zoom
   skaliert den Layout-Fluss mit (inkl. linker Ausrichtung). Blöcke bleiben
   untereinander (Standard-Layout). */
/* Embed nutzt dasselbe randlose Layout wie die Website (siehe @media min-width:861px);
   fitEmbed() skaliert per zoom, damit immer alles sichtbar bleibt. */
body.is-embed .tp-banner { padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3); }
body.is-embed .tp-daycard { padding: 0; }
body.is-embed .tp-dc-head { padding: var(--space-3) var(--space-4); }
body.is-embed .tp-dc-body { padding: var(--space-3) var(--space-4); }
body.is-embed .tp-daycard .tp-dc-label { margin: var(--space-3) 0 var(--space-2); }
body.is-embed .tp-daycard .tp-section-label { margin: var(--space-3) 0 var(--space-2); }
/* Etwas kompaktere Lektionszeilen → weniger Skalierung nötig, besser lesbar */
body.is-embed .lektion-row { padding: 5px 0; }
body.is-embed .lektion-block-head { padding-bottom: 3px; }
body.is-embed .blk-foot { margin-top: 6px; }
body.is-embed .blk-foot .lz-btn-inline { margin-top: 0; }

/* Teams/Embed: Sidebar verhält sich wie normal (ausgeklappt, mit Einklapp-Toggle). */

/* "Alle Schultage": einklappbarer Kopf (Schrift etwas eingerückt) */
/* „Alle Schultage" + Kacheln: linke Kante bündig mit den Lektionsblöcken in der
   Tageskachel (Kachel ist full-bleed + Body-Margin 8px + Body-Padding). */
@media (min-width: 861px) {
  /* per left statt margin (margin wird teils überschrieben/eingefroren) */
  body.page-tagesprogramm:not(.is-embed) #tp-weitere { position: relative; left: calc(-1 * var(--space-6) + 8px + var(--space-5)); }
  body.page-tagesprogramm.is-embed #tp-weitere { position: relative; left: calc(-1 * var(--space-6) + 8px + var(--space-4)); }
}
/* Zeile unter der Tageskachel: «Alle Schultage»-Button + (im Embed am 1. Schultag) QR-Karte */
.tp-weitere-row { display: flex; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; }
.tp-qr-card {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--paper); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 8px 14px 9px; margin: var(--space-5) 0 var(--space-3);
}
.tp-qr-label {
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-quiet);
}
.tp-qr-box { position: relative; display: block; line-height: 0; }
.tp-qr-box img { display: block; width: 96px; height: 96px; image-rendering: pixelated; }
.tp-qr-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 4px; padding: 2px; line-height: 0;
  box-shadow: 0 0 0 1px rgba(10, 20, 25, 0.08);
}
.tp-qr-logo img { width: 18px; height: 18px; display: block; }
.tp-qr-klasse { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }

/* „Alle Schultage" – kompakter, gut sichtbarer, linksbündiger Button */
.tp-weitere-head {
  display: inline-flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--radius); cursor: pointer; text-align: left;
  padding: 10px var(--space-4); margin: var(--space-5) 0 var(--space-3);
  color: var(--ink); font: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.tp-weitere-head:hover { background: var(--bg-soft); box-shadow: var(--shadow-2); }
.tp-weitere-chev { transition: transform .2s; color: var(--brand-dark); flex-shrink: 0; }
.tp-weitere-head[aria-expanded="true"] .tp-weitere-chev { transform: rotate(90deg); }
.tp-weitere-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.02em; }
.tp-weitere-head .meta { color: var(--ink-quiet); font-size: var(--fs-sm); }
@media (max-width: 560px) {
  .tp-weitere-head { width: auto; }
  .tp-weitere-title { font-size: var(--fs-md); }
}

/* Kachel-Übersicht aller Schultage – grüner Kopf (Nr + Datum schwarz), kompakt */
.tp-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-2);
}
.tp-tiles[hidden] { display: none; }
.tp-tile {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .05s;
}
.tp-tile:hover { border-color: var(--ink); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-2); }
.tp-tile.is-current { border-color: var(--brand-dark); box-shadow: inset 0 0 0 1px var(--brand-dark); }
.tp-tile-head {
  display: flex; align-items: center; gap: 8px;
  background: var(--brand); color: var(--ink); padding: 4px 10px;
}
.tp-tile-nr { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-md); color: var(--ink); }
.tp-tile-date { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xs); color: var(--ink); letter-spacing: -0.01em; }
.tp-tile-badge { margin-left: auto; font-size: 0.62rem; font-weight: 700; background: var(--ink); color: #fff; padding: 1px 8px; border-radius: 999px; }
.tp-tile-ziel { margin-left: auto; display: inline-flex; color: var(--ink); }
.tp-tile-ziel svg { width: 15px; height: 15px; }
.tp-tile-body { display: flex; flex-direction: column; gap: 5px; padding: 7px 10px; }
.tp-tile-thema {
  font-weight: 600; font-size: var(--fs-sm); letter-spacing: -0.01em; line-height: 1.25; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tp-tile-thema.is-empty { color: var(--ink-quiet); font-weight: 500; font-style: italic; }
.tp-tile-aufs { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-tile-auf {
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600;
  background: var(--bg-soft); color: var(--ink-soft);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px;
}

/* Feiertags-Kachel: regulärer Schultag fällt auf einen Feiertag → grauer Platzhalter (nicht klickbar) */
.tp-tile-frei { background: var(--bg-soft); border-style: dashed; border-color: var(--sand-strong); }
.tp-tile-frei .tp-tile-head { background: var(--sand-strong); }
.tp-tile-frei .tp-tile-date { color: var(--ink-soft); }
.tp-tile-frei .tp-tile-thema { color: var(--ink-soft); }
.tp-tile-frei-badge { margin-left: auto; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.tp-tile-frei-note { font-size: var(--fs-2xs); color: var(--ink-quiet); font-style: italic; }
.tp-tile.tp-tile-frei:hover { transform: none; box-shadow: none; border-color: var(--sand-strong); }

/* Verschobener/ausgefallener Schultag: leicht sandfarben getönt, Kopf gedämpft */
.tp-tile.is-ausfall { background: var(--sand); border-color: var(--sand-strong); }
.tp-tile.is-ausfall .tp-tile-head { background: var(--sand-strong); }
.tp-tile.is-ausfall .tp-tile-thema { color: var(--ink-soft); font-style: italic; }
.tp-tile-aus-badge {
  margin-left: auto; font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--ink-soft); white-space: nowrap;
}

@media (max-width: 560px) {
  .tp-tiles { grid-template-columns: 1fr 1fr; }
  .ha-box { padding: var(--space-2) var(--space-3); }
}

/* ==========================================================================
   Lehrer-Editor (Tagesprogramm)
   ========================================================================== */
/* Editor nutzt die volle Inhaltsbreite bis zur Sidebar (responsive) */
.editor2 { width: 100%; max-width: none; margin: 0; }
/* Lektionsblöcke immer untereinander (chronologisch) */
.ed-blocks-grid { display: flex; flex-direction: column; gap: var(--space-4); }
/* Editor-Hauptbereich: Blöcke links, Weblinks/Zusatzmaterial rechts als eigene Fenster */
.ed-main-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); align-items: start; }
.ed-col-blocks { min-width: 0; }
.ed-col-side { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.ed-col-side .ed-block { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); padding: var(--space-3); }
@media (min-width: 900px) {
  .ed-main-grid { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
}
/* Schwarzer Kopf-Balken des Editors – wie die übrigen Unterseiten, mit Lime-Akzent */
.editor2-head {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  background: var(--ink); color: #fff;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
  margin-bottom: var(--space-5);
}
.editor2-tag { display: inline-block; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); background: var(--brand); padding: 3px 10px; border-radius: 999px; margin-bottom: 6px; }
.editor2-head h1 { font-size: clamp(1.5rem, 1.4vw + 1rem, 2rem); margin: 0; color: #fff; font-weight: 700; }
.editor2-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.editor2-head .btn-ghost { border-color: rgba(255, 255, 255, 0.28); color: #fff; background: transparent; }
.editor2-head .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
/* Primäraktion im schwarzen Kopf: Lime (sonst schwarz auf schwarz = unsichtbar) */
.editor2-head .btn-primary { background: var(--brand); color: var(--ink); border-color: var(--brand); font-weight: 600; }
.editor2-head .btn-primary:hover { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
/* Klare 3-Schritt-Anleitung statt Fliesstext */
.ed-steps {
  list-style: none; margin: 0 0 var(--space-3); padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2);
}
.ed-steps li {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-3);
}
.ed-step-n {
  flex: none; width: 26px; height: 26px; border-radius: 999px;
  background: var(--brand); color: var(--ink);
  display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm);
}
.ed-step-tx { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ed-step-tx strong { color: var(--ink); font-size: var(--fs-sm); font-weight: 700; }
.ed-step-tx span { color: var(--ink-quiet); font-size: var(--fs-2xs); }
.ed-steps-note {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: var(--fs-sm); color: var(--ink-soft); margin: 0 0 var(--space-5); line-height: 1.45;
}
.ed-steps-note svg { flex: none; margin-top: 2px; color: var(--ink-quiet); }
.ed-steps-note strong { color: var(--ink); }
.editor-guide { margin: var(--space-5) 0; border-bottom: 1px solid var(--border); }
.editor-guide > summary { display: flex; align-items: center; min-height: 40px; cursor: pointer; font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.editor-guide > summary::marker { color: var(--brand-dark); }
.editor-guide .ed-steps { margin: 0 0 var(--space-3); }
.editor-guide .ed-steps-note { margin-bottom: var(--space-4); }
@media (max-width: 640px) { .ed-steps { grid-template-columns: 1fr; } }
.btn-sm { height: 34px; padding: 0 12px; font-size: var(--fs-sm); }

/* Teams-Links der Klassen (einklappbar) */
.ed-teamslinks {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-soft); padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
}
.ed-teamslinks > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 700; font-size: var(--fs-md); color: var(--ink); list-style: none;
}
.ed-teamslinks > summary::-webkit-details-marker { display: none; }
.ed-teamslinks > summary svg { color: var(--brand-dark); flex-shrink: 0; }
.ed-tl-sub { font-weight: 500; color: var(--ink-quiet); font-size: var(--fs-sm); }
.ed-tl-hint { margin: var(--space-3) 0; font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.45; }
.ed-tl-list { display: flex; flex-direction: column; gap: var(--space-2); }
.ed-tl-row { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: var(--space-2); }
.ed-tl-klasse { font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-sm); color: var(--brand-darker); }
.ed-tl-url {
  width: 100%; height: 34px; padding: 0 10px;
  font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-soft);
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper);
}
.ed-tl-copy { white-space: nowrap; }
.ed-tl-copy.is-copied { color: var(--brand-darker); border-color: var(--brand); background: var(--brand-light); }
@media (max-width: 620px) {
  .ed-tl-row { grid-template-columns: 1fr auto; }
  .ed-tl-klasse { grid-column: 1 / -1; }
}

.editor2-pick { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--space-3); margin-bottom: var(--space-5); }
.ed-field { display: flex; flex-direction: column; gap: 5px; }
.ed-field > label { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-quiet); }
.ed-field > label.ed-class-fav {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin-top: 2px; font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0;
  text-transform: none; color: var(--ink-soft); cursor: pointer;
}
.ed-class-fav input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

.ed-form { display: flex; flex-direction: column; gap: var(--space-4); }
.ed-block { display: flex; flex-direction: column; gap: 7px; }
.ed-label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.ed-input {
  width: 100%; font: inherit; font-size: var(--fs-md); color: var(--ink);
  padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--paper); outline: none; resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.ed-input:focus { border-color: var(--brand-dark); box-shadow: 0 0 0 3px var(--brand-light); }
.ed-hint { margin: 0; font-size: var(--fs-xs); color: var(--ink-quiet); }
.ed-hint code { font-size: 0.92em; }

.ed-preview-panel {
  width: min(1280px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ed-preview-head {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-soft);
}
.ed-preview-head h2 { margin: 0 0 2px; font-size: var(--fs-xl); }
.ed-preview-head p { margin: 0; color: var(--ink-soft); }
.ed-preview-grid {
  min-height: 0;
  overflow: auto;
  padding: var(--space-3);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: var(--space-3);
  background: var(--bg-soft);
}
.ed-preview-framecard {
  min-height: min(72vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
.ed-preview-framecard header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  border-bottom: 1px solid var(--border-soft);
}
.ed-preview-framecard h3 { margin: 0; font-size: var(--fs-sm); }
.ed-preview-framecard header a { color: var(--ink-soft); font-size: var(--fs-xs); font-weight: 700; }
.ed-preview-framecard iframe {
  flex: 1;
  width: 100%;
  min-height: 640px;
  border: 0;
  background: #fff;
}
.ed-preview-phone iframe {
  width: min(100%, 430px);
  margin: 0 auto;
  border-left: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
}
@media (max-width: 920px) {
  .ed-preview-grid { grid-template-columns: 1fr; }
  .ed-preview-framecard { min-height: 70vh; }
  .ed-preview-phone iframe { width: 100%; border-left: 0; border-right: 0; }
}

body.is-teacherapp .sidebar,
body.is-teacherapp .mobile-topbar,
body.is-teacherapp .bottomnav,
body.is-teacherapp .footer { display: none !important; }
body.is-teacherapp .content { padding-bottom: 0; }
body.is-teacherapp .view {
  width: min(1180px, calc(100vw - 24px));
  margin: var(--space-3) auto var(--space-5);
  padding: 0;
}
.teacher-app {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.teacher-app-head,
.teacher-app-controls,
.teacher-app-panel,
.teacher-action,
.teacher-preview,
.teacher-editor-shortcut,
.teacher-more-panel,
.teacher-owned-classes,
.teacher-editor-embed,
.teacher-app-setup {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
.teacher-app-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
}
.teacher-app-head h1 { margin: 2px 0 4px; font-size: var(--fs-2xl); }
.teacher-app-head p { margin: 0; color: var(--ink-soft); font-size: var(--fs-sm); }
.teacher-app-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.teacher-app-actions,
.teacher-appqr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}
.teacher-update-card,
.class-update-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border: 1px solid rgba(154, 90, 0, .25);
  border-radius: var(--radius);
  background: #fff7df;
  color: var(--ink);
  padding: var(--space-3);
}
.class-update-card { margin-bottom: var(--space-3); }
.teacher-update-card strong,
.teacher-update-card span,
.class-update-card strong,
.class-update-card span { display: block; }
.teacher-update-card strong,
.class-update-card strong { font-weight: 850; }
.teacher-update-card span,
.class-update-card span { margin-top: 2px; color: var(--ink-soft); font-size: var(--fs-sm); }
.teacher-class-manager {
  margin-top: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
}
.teacher-class-manager > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 9px 11px;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}
.teacher-class-manager > summary::-webkit-details-marker { display: none; }
.teacher-class-manager > summary::after {
  content: "›";
  transform: rotate(90deg);
  color: var(--brand-darker);
  font-size: 18px;
}
.teacher-class-manager[open] > summary {
  border-bottom: 1px solid var(--border-soft);
  background: var(--paper);
}
.teacher-class-manager[open] > summary::after { transform: rotate(-90deg); }
.teacher-class-manager small {
  margin-left: auto;
  color: var(--ink-quiet);
  font-size: var(--fs-2xs);
  font-weight: 750;
}
.teacher-class-manager .teacher-class-checks {
  padding: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.teacher-class-manager .teacher-setup-save {
  margin: 0 var(--space-2) var(--space-2);
}
.teacher-app-quick {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: 1px;
}
.teacher-app-quick button,
.teacher-kind button {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.teacher-app-quick button {
  flex: 0 0 auto;
  min-width: 132px;
  padding: 8px 12px;
  text-align: left;
}
.teacher-app-quick button strong { display: block; color: var(--ink); }
.teacher-app-quick button span { display: block; font-size: var(--fs-2xs); color: var(--ink-quiet); }
.teacher-app-quick button.is-active,
.teacher-app-quick button.is-now,
.teacher-kind button.is-active {
  border-color: var(--brand-dark);
  background: var(--brand-light);
  color: var(--ink);
}
.teacher-owned-classes {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: var(--space-2);
  scroll-snap-type: x proximity;
}
.teacher-own-class {
  flex: 0 0 min(210px, 72vw);
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 9px 12px;
  scroll-snap-align: start;
}
.teacher-own-class strong { color: var(--ink); font-weight: 850; }
.teacher-own-class span { font-size: var(--fs-2xs); font-weight: 750; color: var(--ink-quiet); }
.teacher-own-class.is-active {
  border-color: var(--brand-dark);
  background: var(--brand-light);
  box-shadow: 0 0 0 2px rgba(104, 122, 0, .12) inset;
}
.teacher-app-controls {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) minmax(240px, 1.3fr);
  gap: var(--space-3);
  padding: var(--space-3);
}
.teacher-class-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
}
.teacher-editor-shortcut,
.teacher-preview-mini {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.teacher-editor-shortcut { padding: var(--space-2) var(--space-3); }
.teacher-editor-shortcut .btn { min-height: 46px; }
.teacher-preview-mini { justify-content: flex-end; }
.teacher-editor-embed {
  padding: var(--space-2);
  background: var(--bg-soft);
}
body.is-teacherapp .teacher-editor-embed .ed-form { gap: var(--space-2); }
body.is-teacherapp .teacher-editor-embed .ed-main-grid { grid-template-columns: 1fr; }
body.is-teacherapp .teacher-editor-embed .ed-block,
body.is-teacherapp .teacher-editor-embed .ed-blockgroup {
  border-color: var(--border-soft);
  box-shadow: none;
}
body.is-teacherapp .teacher-editor-embed .ed-blockgroup:not([open]) {
  background: var(--paper);
}
body.is-teacherapp .teacher-editor-embed .ed-col-side {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
body.is-teacherapp .teacher-editor-embed .ed-bar {
  position: sticky;
  bottom: calc(env(safe-area-inset-bottom) + 6px);
  z-index: 5;
  background: rgba(250, 252, 248, .92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-2);
}
.teacher-more-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: var(--space-2);
  padding: var(--space-3);
}
.teacher-class-pill {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--ink-quiet);
  font: inherit;
  cursor: pointer;
  text-align: left;
  padding: 8px 10px;
}
.teacher-class-pill strong { color: inherit; font-weight: 800; }
.teacher-class-pill span { font-size: var(--fs-2xs); }
.teacher-class-pill.is-own {
  border-color: var(--brand-dark);
  background: var(--brand-light);
  color: var(--ink);
}
.teacher-class-pill.is-own strong { color: var(--brand-darker); }
.teacher-class-pill.is-other { opacity: .58; }
.teacher-class-pill.is-active {
  box-shadow: 0 0 0 2px var(--brand-dark) inset;
  opacity: 1;
}
.teacher-app-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr);
  gap: var(--space-3);
}
.teacher-action,
.teacher-preview,
.teacher-app-setup {
  padding: var(--space-3);
}
.teacher-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.teacher-action-head span { font-weight: 800; color: var(--ink); }
.teacher-action-head a { color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 700; }
.teacher-action-link { color: var(--ink-soft) !important; font-size: var(--fs-sm); }
.teacher-action-meta {
  margin: -4px 0 var(--space-3);
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.teacher-kind {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.teacher-upload-btn {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--brand-dark);
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.teacher-photo-pending {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.teacher-photo-thumb.is-pending {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 2px var(--brand-light) inset;
}
.teacher-photo-save {
  width: 100%;
  justify-content: center;
  margin-top: var(--space-3);
}
.teacher-photo-save:disabled { opacity: .55; cursor: not-allowed; }
.teacher-upload-status {
  min-height: 22px;
  margin: var(--space-2) 0;
  color: var(--brand-darker);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.teacher-upload-status.is-warn { color: #9a5a00; }
.teacher-photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.teacher-photo-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.teacher-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.teacher-photo-thumb button {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 20, 25, .76);
  color: #fff;
  cursor: pointer;
}
.teacher-preview-open {
  width: 100%;
  min-height: 128px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--brand-dark);
  border-radius: var(--radius);
  background: var(--brand-light);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-align: center;
}
.teacher-preview-open span,
.teacher-preview-open small {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.teacher-preview-open strong { font-size: var(--fs-lg); }
.teacher-preview iframe {
  width: 100%;
  min-height: 580px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: #fff;
}
.teacher-preview-full .teacher-preview iframe { min-height: calc(100vh - 156px); }
.teacher-app-setup {
  display: grid;
  gap: var(--space-3);
}
.teacher-app-setup.is-intro {
  max-width: 760px;
  margin: var(--space-6) auto 0;
}
.teacher-app-setup h1 { margin: 2px 0 3px; font-size: var(--fs-2xl); }
.teacher-app-setup p { margin: 0; color: var(--ink-soft); }
.teacher-class-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-2);
}
.teacher-class-check {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-soft);
  cursor: pointer;
}
.teacher-class-check input { width: 18px; height: 18px; accent-color: var(--brand-dark); }
.teacher-class-check strong,
.teacher-class-check small { display: block; }
.teacher-class-check small { color: var(--ink-quiet); font-size: var(--fs-2xs); }
.teacher-appqr-panel .qr-url { margin-top: var(--space-2); }
@media (max-width: 760px) {
  body.is-teacherapp .view {
    width: calc(100vw - 16px);
    margin-top: var(--space-2);
  }
  .teacher-app-head,
  .teacher-app-controls,
  .teacher-app-grid {
    display: flex;
    flex-direction: column;
  }
  .teacher-editor-shortcut,
  .teacher-preview-mini { align-items: stretch; justify-content: flex-start; }
  .teacher-editor-shortcut .btn,
  .teacher-preview-mini .btn { width: 100%; justify-content: center; }
  .teacher-owned-classes { margin-inline: -2px; }
  .teacher-own-class { flex-basis: 78vw; }
  .teacher-class-line { grid-template-columns: 1fr; }
  .teacher-app-actions { justify-content: flex-start; }
  .teacher-update-card,
  .class-update-card {
    flex-direction: column;
    align-items: stretch;
  }
  .teacher-update-card .btn,
  .class-update-card .btn { justify-content: center; }
  .teacher-class-manager .teacher-class-checks { grid-template-columns: 1fr; }
  .teacher-class-manager .teacher-setup-save { width: calc(100% - 16px); justify-content: center; }
  .teacher-preview iframe { min-height: 520px; }
  body.is-teacherapp .teacher-editor-embed {
    margin-inline: -2px;
    padding: var(--space-2);
  }
}

/* Block-zentrierter Editor: jede Blockgruppe als Karte */
.ed-blockgroup { display: block; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); padding: var(--space-3); }
.ed-blockgroup[open] { background: var(--paper); box-shadow: var(--shadow-soft); }
.ed-blockgroup > summary { list-style: none; cursor: pointer; }
.ed-blockgroup > summary::-webkit-details-marker { display: none; }
.ed-block-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
}
.ed-block-summary::after {
  content: "Öffnen";
  align-self: center;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 800;
}
.ed-blockgroup[open] > .ed-block-summary::after { content: "Schliessen"; }
.ed-block-summary-main { min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ed-block-summary-main strong { font-size: var(--fs-2xs); letter-spacing: .04em; text-transform: uppercase; }
.ed-block-summary-main em { color: var(--ink); font-style: normal; font-weight: 800; }
.ed-block-summary small {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ed-block-inside {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.ed-blk-bar { display: flex; align-items: center; }
.ed-blk-row2 {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
  flex-wrap: wrap;
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.ed-blk-row2 > div { display: flex; flex-direction: column; gap: 4px; }
.ed-field-grow { flex: 1; min-width: 200px; }
.ed-mini { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-quiet); }
.ed-mini-quiet { text-transform: none; letter-spacing: 0; font-weight: 400; }
.ed-blk-inhaltwrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.ed-blk-inhalt { font-family: inherit; line-height: 1.5; resize: vertical; }
.ed-blk-lessons { border-top: 1px dashed var(--border); padding-top: var(--space-2); }
.ed-blk-toggle { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: transparent; border: none; color: var(--ink-soft); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; padding: 2px; }
.ed-blk-toggle:hover { color: var(--ink); }
.ed-blk-toggle svg { transition: transform .15s; }
.ed-blk-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ed-blk-head { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label label" "titel auf"; gap: 6px 8px; align-items: center; }
.ed-blk-label { grid-area: label; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-quiet); }
.ed-blk-titel { grid-area: titel; font-weight: 600; }
.ed-blk-auf { grid-area: auf; width: 110px; text-align: center; font-family: var(--font-mono); font-weight: 600; }

.ed-lekt-list { display: flex; flex-direction: column; gap: var(--space-2); }
.ed-lekt { display: flex; flex-direction: column; gap: 5px; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.ed-lekt-head { display: flex; align-items: baseline; gap: 8px; }
.ed-lekt-zeit { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-soft); }
.ed-lekt-nr { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-quiet); }
.ed-lekt .ed-input { background: var(--paper); }
.ed-rich-field { display: flex; flex-direction: column; gap: 4px; }
.ed-rich-control-row { display: flex; align-items: center; gap: 5px; min-height: 28px; }
.ed-rich-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 28px; padding: 3px 0; }
.ed-rich-tools[hidden] { display: none; }
.ed-rich-btn,
.ed-rich-swatch {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 1px solid var(--border); border-radius: 4px; background: var(--paper); color: var(--ink);
  font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.ed-rich-btn:hover,
.ed-rich-btn:focus-visible,
.ed-rich-swatch:hover,
.ed-rich-swatch:focus-visible { border-color: var(--brand-dark); outline: 2px solid var(--brand-light); outline-offset: 1px; }
.ed-rich-toggle[aria-expanded="true"] { border-color: var(--brand-dark); background: var(--brand-light); color: var(--brand-darker); }
.ed-rich-undo { font-size: 19px; line-height: 1; color: var(--ink-soft); }
.ed-rich-sep { width: 1px; height: 18px; margin: 0 2px; background: var(--border); }
.ed-rich-clear { color: var(--ink-soft); text-decoration: line-through; }
.ed-rich-list { font-family: var(--font-mono); font-size: 15px; font-weight: 700; }
.ed-rich-link span { position: relative; display: block; width: 15px; height: 10px; transform: rotate(-38deg); }
.ed-rich-link span::before,
.ed-rich-link span::after { content: ""; position: absolute; top: 2px; width: 9px; height: 6px; border: 1.5px solid currentColor; border-radius: 5px; }
.ed-rich-link span::before { left: 0; }
.ed-rich-link span::after { right: 0; }
.ed-rich-swatch::after { content: ""; display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--rich-swatch); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.ed-rich-input {
  min-height: 40px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font: inherit; font-size: var(--fs-md); line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere; outline: none; cursor: text;
}
.ed-rich-input-notizen { min-height: 66px; }
.ed-rich-input-block { min-height: 108px; }
.ed-rich-input-homework { min-height: 76px; }
.ed-rich-input:focus { border-color: var(--brand-dark); box-shadow: 0 0 0 3px var(--brand-light); }
.ed-rich-input:empty::before { content: attr(data-placeholder); color: var(--ink-quiet); pointer-events: none; }
.ed-rich-input :is(ul, ol) { margin: 4px 0; padding-left: 22px; }
.ed-rich-input blockquote { margin: 5px 0; padding-left: 10px; border-left: 3px solid var(--brand); color: var(--ink-soft); }
/* Prüfungs-Häkchen + Nr pro Lektion */
.ed-lekt-pruef { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-pruef-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); white-space: nowrap; cursor: pointer; }
.ed-pruef-check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.ed-lekt-pruef .ed-input:disabled { opacity: 0.45; cursor: not-allowed; }

.ed-links { display: flex; flex-direction: column; gap: var(--space-2); }
.ed-link-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ed-link-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: var(--space-2); align-items: center; }
.ed-link-row.has-kind { grid-template-columns: minmax(86px, 0.55fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; }
.ed-link-kind { min-width: 86px; height: 39px; padding-inline: 8px; }
.ed-link-del { width: 34px; height: 34px; flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); color: var(--ink-quiet); cursor: pointer; font-size: var(--fs-md); }
.ed-link-del:hover { border-color: var(--danger); color: var(--danger); }
.ed-lnw { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--border); }
.ed-lnw.ed-compact-details { display: block; }
.ed-compact-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 7px 0;
  list-style: none;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.ed-compact-details > summary::-webkit-details-marker { display: none; }
.ed-compact-details > summary::after {
  content: "Öffnen";
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 800;
}
.ed-compact-details[open] > summary::after { content: "Schliessen"; }
.ed-compact-details > summary small { color: var(--ink-quiet); font-weight: 700; }
.ed-lnw-body { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-2); }
.ed-lnw-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.ed-lnw-rows { display: flex; flex-direction: column; gap: var(--space-2); }
.ed-lnw-row { display: grid; grid-template-columns: minmax(110px, .6fr) minmax(0, 1.5fr) 150px auto; gap: var(--space-2); align-items: center; }
.ed-lnw-del { width: 34px; height: 34px; flex-shrink: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); color: var(--ink-quiet); cursor: pointer; font-size: var(--fs-md); }
.ed-lnw-del:hover { border-color: var(--danger); color: var(--danger); }
@media (max-width: 560px) {
  .ed-link-row { grid-template-columns: 1fr auto; }
  .ed-link-row.has-kind { grid-template-columns: minmax(0, 1fr) auto; }
  .ed-link-row.has-kind .ed-link-kind { grid-column: 1 / -1; }
  .ed-link-row .ed-link-url { grid-column: 1 / -1; }
  .ed-lnw-row { grid-template-columns: 1fr auto; }
  .ed-lnw-url, .ed-lnw-date { grid-column: 1 / -1; }
}

.ha-edit { border-left: 3px solid var(--border); padding-left: var(--space-3); }
.ha-edit.ha-faellig { border-left-color: var(--ink); }
.ha-edit.ha-naechste { border-left-color: var(--brand); }

.ed-fotos { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ed-fotos:empty { display: none; }
.ed-foto { position: relative; width: 84px; height: 84px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.ed-foto img { width: 100%; height: 100%; object-fit: cover; }
.ed-foto-del { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(10,20,25,.72); color: #fff; font-size: var(--fs-xs); line-height: 1; display: grid; place-items: center; cursor: pointer; }
.ed-foto-del:hover { background: var(--ink); }
.ed-foto-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.ed-bar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.ed-saved { color: var(--brand-darker); font-weight: 600; font-size: var(--fs-md); }
.ed-saved.is-warn { color: #a15c00; }

/* Klassen verwalten (Tabelle) */
.kl-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin: var(--space-3) 0 var(--space-4); }
.kl-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 900px; }
.kl-table th { text-align: left; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-quiet); padding: var(--space-2) var(--space-3); background: var(--bg-soft); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; }
.kl-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.kl-table tr:last-child td { border-bottom: none; }
.kl-table .ed-input { width: 100%; min-width: 0; height: 34px; }
.kl-table .kl-num { width: 58px; text-align: center; }
.kl-table .kl-master { min-width: 210px; font-family: var(--font-mono); font-size: var(--fs-2xs); }
.kl-table td:first-child input { min-width: 130px; font-weight: 600; }
.kl-count { text-align: center; font-weight: 800; color: var(--ink); }
.kl-del { color: var(--danger); padding: 2px 9px; font-size: var(--fs-md); }
.kl-bar-spacer { flex: 1; min-width: var(--space-4); }

/* QR-Overlay */
.qr-panel { text-align: center; max-width: 420px; }
.qr-box { display: grid; place-items: center; min-height: 180px; margin: var(--space-4) auto; }
.qr-box svg { width: 200px; height: 200px; }
.qr-url { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--ink-quiet); word-break: break-all; margin: 0 0 var(--space-3); }

@media (max-width: 560px) {
  .editor2-pick { grid-template-columns: 1fr; }
  .editor2-actions { width: 100%; }
}

/* ==========================================================================
   Print
   ========================================================================== */
/* Einheitliche Kopfzeile ALLER Unterseiten (Lernaufträge, Ablauf der Lehre,
   Kompetenzen, Info): gleiche Titelgrösse + gleiche Position. */
.home-hero, .la-head, .section-head { margin: var(--space-3) 0 var(--space-5); padding: 0; }
.home-hero h1, .la-head h1, .section-head h1 {
  margin: 0 0 var(--space-2);
  font-size: clamp(1.9rem, 1.8vw + 1.1rem, 2.6rem);
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.12;
}
.home-sub, .la-sub, .section-head p { font-size: var(--fs-base); line-height: 1.5; color: var(--ink-soft); margin: 0; max-width: 760px; }
/* Beschreibung unter dem schwarzen Titel-Header (heller Bereich, gut lesbar) */
.page-lead { font-size: var(--fs-base); line-height: 1.55; color: var(--ink-soft); margin: 0 0 var(--space-5); max-width: 820px; }
.page-lead strong { color: var(--ink); font-weight: 600; }

/* Lernaufträge-Seite (Suche) – intuitiv & responsive */
.la-sub strong { color: var(--ink); font-weight: 600; }
.la-search { margin-bottom: var(--space-4); }
.la-search-box {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 6px 6px 6px var(--space-4);
  transition: border-color .15s, box-shadow .15s;
}
.la-search-box:focus-within { border-color: var(--brand-dark); box-shadow: 0 0 0 4px var(--brand-light); }
.la-search-ic { color: var(--ink-quiet); flex-shrink: 0; }
.la-search-box input {
  flex: 1; min-width: 0; height: 44px; border: none; background: transparent;
  font: inherit; font-size: var(--fs-base); color: var(--ink); outline: none;
}
.la-search-box input::placeholder { color: var(--ink-quiet); }
.la-search-btn { flex-shrink: 0; }
@media (max-width: 560px) {
  .la-sub { font-size: var(--fs-md); }
  .la-search-box { padding-left: var(--space-3); }
  .la-search-box input { font-size: var(--fs-md); height: 42px; }
}

/* Lehrer-Footer: Semester-PDF-Download */
.ed-footer { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--border); display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.ed-footer-hint { font-size: var(--fs-xs); color: var(--ink-quiet); }

/* Druck-Archiv eines Semesters (nur beim Drucken sichtbar) */
.print-archiv { display: none; }
.print-archiv-head h1 { font-size: 1.5rem; margin: 0 0 4px; }
.print-archiv-head p { font-size: var(--fs-sm); color: var(--ink-soft); margin: 0 0 12px; }
.print-day-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: var(--fs-md); font-weight: 700; padding: 6px 0; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.print-day-nr { font-family: var(--font-mono); background: var(--ink); color: #fff; border-radius: 5px; padding: 2px 8px; font-size: var(--fs-xs); }
.print-day-pruef { font-weight: 600; color: var(--ink-soft); }

/* Eine Seite = Titelseite + je ein Schultag; Logo (Kopf) + Fusszeile mit Seitenzahl */
.pdfpage { display: flex; flex-direction: column; min-height: 271mm; page-break-after: always; break-after: page; }
.pdfpage:last-child { page-break-after: auto; break-after: auto; }
.pdfpage-head { display: flex; justify-content: space-between; align-items: center; gap: 8mm; margin-bottom: 2mm; }
.pdfpage-bku { font-family: var(--font-display); font-weight: 700; font-size: 9.5pt; color: #1a1a1a; letter-spacing: -0.01em; }
.pdfpage-logo { height: 9mm; width: auto; }
.pdfpage-body { flex: 1 0 auto; }
.pdfpage-title { padding-top: 1mm; }
.pdfpage-title h1 { font-size: 1.7rem; margin: 0 0 6px; }
.pdfpage-title p { font-size: var(--fs-md); color: var(--ink-soft); line-height: 1.5; }
.pdfpage-foot {
  margin-top: auto; padding-top: 4mm; border-top: 1px solid #999;
  font-size: 8pt; color: #555; letter-spacing: 0.01em;
  display: flex; justify-content: space-between; align-items: baseline; gap: 8mm; width: 100%;
}
.pdfpage-foot-r { white-space: nowrap; }

@media print {
  .sidebar, .mobile-topbar, .bottomnav, .footer, .filterbar, .cta-row, .modal, .tp-nav, .tp-tiles { display: none !important; }
  @page { size: A4; margin: 6mm 14mm 13mm 14mm; }
  /* Semester-Archiv: nur dieses drucken, Rest ausblenden */
  body.printing-archiv { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.printing-archiv > .print-archiv { display: block !important; position: absolute; inset: 0; width: 100%; padding: 0; }
  body.printing-archiv > *:not(.print-archiv) { display: none !important; }
  .print-archiv .lz-btn, .print-archiv .lz-btn-inline { display: none !important; }
  .print-archiv .lz-panel { display: block !important; }
  .print-archiv .tp-daycard, .print-archiv .lektion-block.has-blk { box-shadow: none !important; }
}

/* ==========================================================================
   Design-Polish v59 – moderner Feinschliff über alle Seiten
   (Look bleibt Ink+Lime; nur Tiefe, Bewegung und Konsistenz kommen dazu)
   ========================================================================== */
:root {
  --shadow-soft: 0 1px 2px rgba(10, 20, 25, 0.05), 0 4px 14px rgba(10, 20, 25, 0.06);
  --shadow-lift: 0 2px 4px rgba(10, 20, 25, 0.06), 0 12px 28px rgba(10, 20, 25, 0.10);
}

/* Markieren/Auswahl in Markenfarbe */
::selection { background: var(--brand); color: var(--ink); }

/* Sichtbarer, einheitlicher Tastatur-Fokus (Accessibility + wirkt hochwertig) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Dezente, schlanke Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #c6cbcd transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #c6cbcd; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background-color: #a9b0b3; }
*::-webkit-scrollbar-track { background: transparent; }

/* Sanfter Seiteneinstieg bei jedem Routenwechsel */
@media (prefers-reduced-motion: no-preference) {
  .view > * { animation: viewIn 0.3s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
  @keyframes viewIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}

/* Einheitliches Hover-Verhalten aller Karten/Kacheln: leichtes Anheben + weicher Schatten */
.sem-card, .hit, .tp-tile, .norm-card, .hk-row, .auf-card, .pfadnode, .tp-link-chip {
  transition: border-color 0.15s ease, box-shadow 0.18s ease, transform 0.12s ease, background 0.15s ease;
}
.sem-card:hover, .hit:hover, .norm-card:hover, .hk-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.tp-tile:hover { border-color: var(--brand-dark); box-shadow: var(--shadow-lift); }
.tp-tile.is-current { box-shadow: inset 0 0 0 1px var(--brand-dark), var(--shadow-soft); }
.tp-link-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); border-color: var(--ink-quiet); }

/* Lektionszeilen: feines Hover-Highlight (führt das Auge, wirkt interaktiv) */
.lektion-row { border-radius: 4px; transition: background 0.12s ease; }
.lektion-row:hover { background: rgba(10, 20, 25, 0.035); }
.lektion-row.is-pruef:hover { background: rgba(119, 147, 60, 0.12); }

/* Buttons: fühlbares Drücken + konsistente Übergänge */
.btn, .tp-navbtn, .tp-weitere-head, .lz-btn {
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.06s ease;
}
.btn:active, .tp-navbtn:active, .tp-weitere-head:active, .lz-btn:active { transform: translateY(1px); }
.tp-weitere-head:hover { box-shadow: var(--shadow-soft); }

/* Akkordeons (Handlungsfelder): ruhigere Hover-Fläche */
.hf-header-btn { transition: background 0.15s ease; }
.hf-header-btn:hover { background: var(--bg-soft); }

/* Modal: Hintergrund leicht weichgezeichnet – lenkt den Blick aufs PDF */
.modal-backdrop { backdrop-filter: blur(3px) saturate(1.05); }

/* Lange Einleitungstexte auf angenehme Lesebreite begrenzen */
.page-lead { max-width: 72ch; }

/* Bilder/Iframes nie über den Rand */
img, iframe, canvas { max-width: 100%; }
.tp-qr-box img, .plakat-frame canvas { max-width: 100%; }

/* Tabellen-/Datenzeilen in Editor & Listen: Zebra light beim Hover */
.ed-link-row { transition: background 0.12s ease; }
.ed-link-row:hover { background: var(--bg-soft); }

/* Im Teams-Embed keine Einstiegs-Animation (fitEmbed misst die Höhe sofort) */
body.is-embed .view > * { animation: none; }

/* ==========================================================================
   v60 – gbssg.ch-Stil für alle Unterseiten: Eyebrows, Marker, Suche, Info, Editor
   ========================================================================== */
/* Schwarze Kopfbalken: auf allen Unterseiten exakt gleich hoch, schlank (nur der Titel drin) */
@media (min-width: 861px) {
  body .home-hero, body .la-head, body .section-head {
    display: flex; flex-direction: column; justify-content: center;
    align-items: flex-start;   /* Titel LINKS (überschreibt align-items:end der .section-head-Basis) */
    min-height: 96px;
    padding-top: var(--space-4); padding-bottom: var(--space-4);
    box-sizing: border-box;
  }
  /* Grünes Quadrat vertikal mittig zum schlankeren Balken */
  body .home-hero::before, body .la-head::before, body .section-head::before {
    top: calc(50% - 28px);
  }
}

/* Sektionstitel mit Lime-Quadrat davor – durchgängiges Brand-Element */
.hit-section-head h2::before,
.norm-group-title::before,
.hf-section-head h2::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--brand);
  margin-right: 9px;
  vertical-align: 6%;
}
.norm-group-title { border-bottom: none; color: var(--ink); text-transform: none; letter-spacing: -0.01em; font-size: var(--fs-base); }

/* Suche: grosse, runde Box mit Lime-Fokusring – zentrales Element der Seite */
/* Suchfeld trägt die Seite allein (der erklärende Fliesstext ist entfernt) →
   bewusst gross und dominant. */
.la-search { margin-top: var(--space-4); margin-bottom: var(--space-5); }
.la-search-box {
  border-radius: 999px;
  padding: 9px 9px 9px 24px;
  box-shadow: var(--shadow-2);
  border-color: var(--sand-strong);
}
.la-search-box:focus-within {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 4px var(--brand-light), var(--shadow-2);
}
.la-search-ic { width: 24px; height: 24px; }
.la-search-box input { height: 54px; font-size: var(--fs-lg); font-weight: 500; }
.la-search-btn { border-radius: 999px; padding-left: var(--space-5); padding-right: var(--space-5); }
@media (max-width: 640px) {
  .la-search-box { padding: 6px 20px 6px var(--space-3); }
  .la-search-box input { height: 46px; font-size: var(--fs-base); }
  .la-search-ic { width: 20px; height: 20px; }
  /* Auf dem Handy blendet .btn-label den Text aus – der Knopf wäre ein leerer
     Kreis. Getippt wird ohnehin live, darum entfällt er hier ganz. */
  .la-search-btn { display: none; }
}
/* Filterzeile: Auswahlfelder dürfen nie über den Rand hinauslaufen */
.filterbar .filter-group { min-width: 0; flex: 1 1 auto; }
.filterbar .filter-group select { min-width: 0; max-width: 100%; flex: 1 1 auto; }
.search-summary { font-size: var(--fs-sm); color: var(--ink-quiet); }
.search-summary strong { color: var(--ink); font-size: var(--fs-base); }


/* Info-Seite: QR-Code je Klasse («Als App aufs Handy») */
.info-qr {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-5);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-4); margin: var(--space-3) 0 var(--space-2); max-width: 72ch;
}
.info-qr-pick { flex: 1 1 220px; min-width: 0; }
.info-qr-label {
  display: block; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-quiet);
}
.info-qr-pick .select-wrap { margin-top: 4px; }
.info-qr-pick .select-wrap select { width: 100%; }
.info-qr-url { margin: var(--space-3) 0 var(--space-2); }
.info-qr-url a { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--ink-soft); word-break: break-all; }
.info-qr-card {
  flex: 0 0 auto; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-3);
}
.info-qr-box { position: relative; display: grid; place-items: center; width: 168px; height: 168px; line-height: 0; }
.info-qr-box img { display: block; width: 168px; height: 168px; image-rendering: pixelated; max-width: 100%; }
.info-qr-box .tp-qr-logo img { width: 30px; height: 30px; }
.info-qr-klasse { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
@media (max-width: 560px) {
  .info-qr { gap: var(--space-4); }
  .info-qr-card { margin: 0 auto; }
}

/* Nutzungshinweis in der Info-Liste (Normen, Lernaufträge) */
.info-hinweis {
  display: block; margin-top: 4px;
  padding-left: var(--space-3); border-left: 3px solid var(--brand);
  font-size: var(--fs-sm); color: var(--ink-soft);
}

/* Info-Seite: Einleitung + Brandline unten */
.info-intro { font-size: var(--fs-md); line-height: 1.6; max-width: 72ch; }
/* Brandline: Logo klein links, daneben Fachbereich + Namen in derselben Schrift – eine ruhige Zeile */
.info-brandline {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.info-brandline img { height: 26px; width: auto; flex: none; opacity: 0.9; }
.info-brand-txt, .info-brand-copy {
  color: var(--ink-quiet); font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.01em;
}
.info-brand-copy::before { content: "·"; margin-right: var(--space-3); color: var(--border); }
@media (max-width: 560px) {
  .info-brand-copy { width: 100%; }
  .info-brand-copy::before { content: none; }
}

/* Editor: aufgeräumter – klare Karten-Sektionen, ruhigere Kopfzeile */
.editor2-head { border-radius: var(--radius); }
.editor2-pick {
  background: var(--paper); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: var(--space-3) var(--space-4);
}
.ed-steps { background: var(--bg-soft); border-radius: var(--radius); padding: var(--space-3) var(--space-4); }
.ed-teamslinks {
  background: var(--paper); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-2) var(--space-4);
}
.ed-teamslinks summary { cursor: pointer; font-weight: 600; }
.ed-footer {
  background: var(--bg-soft); border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}

/* Foto-Lightbox: vergrössertes Hausaufgaben-/Ausfall-Foto als Overlay */
.foto-lightbox {
  position: fixed; inset: 0; z-index: 1300;
  background: rgba(10, 20, 25, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
  cursor: zoom-out;
}
.foto-lightbox img {
  max-width: 94vw; max-height: 92vh;
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
  background: #fff;
}
.foto-lightbox-close {
  position: fixed; top: var(--space-4); right: var(--space-4);
  font: inherit; font-size: var(--fs-md); font-weight: 600;
  color: var(--ink); background: #fff;
  border: none; border-radius: var(--radius);
  padding: 8px 13px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.ha-foto { cursor: zoom-in; }
.ed-foto img { cursor: zoom-in; }

/* ==========================================================================
   Foto-Seite (#/foto) – am Handy per QR geöffnet, öffnet direkt die Kamera
   ========================================================================== */
.foto-capture { display: grid; place-items: center; min-height: 60vh; padding: var(--space-4); }
.foto-capture-card {
  width: 100%; max-width: 420px;
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-5) var(--space-4) var(--space-4);
  text-align: center;
}
.foto-capture-klasse {
  display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-sm);
  color: var(--brand-darker); background: var(--brand-light);
  padding: 2px 10px; border-radius: 999px; margin-bottom: var(--space-2);
}
.foto-capture-card h1 { margin: 0 0 4px; font-size: var(--fs-xl); }
.foto-capture-sub { color: var(--ink-quiet); font-size: var(--fs-sm); line-height: 1.5; margin: 0 0 var(--space-4); }
.foto-capture-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
  padding: var(--space-5) var(--space-4);
  border: 2px dashed var(--brand-dark); border-radius: var(--radius-lg);
  background: var(--brand-light); color: var(--brand-darker);
  font-weight: 700; font-size: var(--fs-md);
  transition: background .12s, transform .08s;
}
.foto-capture-btn:active { transform: scale(0.98); }
.foto-capture-btn:hover { background: #e6ec9a; }
.foto-capture-status { margin: var(--space-3) 0 0; font-size: var(--fs-sm); font-weight: 600; min-height: 1.2em; color: var(--brand-darker); }
.foto-capture-status.is-err { color: #a15c00; }
.foto-capture-strip { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: var(--space-3); }
.foto-capture-thumb { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }

/* ==========================================================================
   Klassen-App-Modus (?app=<KLASSE>) – fokussierte WebApp einer Klasse
   ========================================================================== */
body.is-appmode .sidebar { display: none !important; }
body.is-appmode .mobile-topbar { display: flex !important; align-items: center; justify-content: space-between; gap: var(--space-3); }
/* Der weisse Kopfbalken (GBS-Logo · Spengler Sanitär · Klasse) ist reine
   Begrüssung: Er zeigt sich beim Start der App kurz und klappt danach für die
   ganze Sitzung weg – der Platz gehört dem Schultag.
   Umgesetzt als Accordion: STANDARD = eingeklappt (max-height 0), die Klasse
   `is-topbar-intro` zeigt ihn beim Aufstarten kurz. So bleibt er nach der
   Begrüssung zuverlässig zu, egal wie oft route() neu läuft.
   WICHTIG: Die max-height-Animation läuft auf dem ÄUSSEREN Wrapper
   `.topbar-collapse` (ein simpler Block). Der innere Kopf ist ein Flex-Container
   und lässt sich per max-height NICHT zuverlässig schrumpfen – der Block-Wrapper
   dagegen klippt seinen Inhalt sauber. `position:static` am Kopf verhindert,
   dass ein sonst stickyer Kopf eine Phantomhöhe hinterlässt. */
body.is-appmode .topbar-collapse {
  overflow: hidden;
  max-height: 0;
  transition: max-height .42s ease;
}
body.is-appmode.is-topbar-intro .topbar-collapse { max-height: 120px; }
body.is-appmode .topbar-collapse > .mobile-topbar { position: static; }
body.is-appmode .bottomnav { display: flex !important; }
body.is-appmode .footer { display: none; }
body.is-appmode .mobile-klasse { display: none; }
body.is-appmode .content { padding-bottom: 76px; }        /* Platz für die fixe Bottom-Nav */
body.is-appmode .view { width: auto; max-width: 780px; margin: var(--space-4) auto var(--space-5); padding: 0 var(--space-3); }
/* Schultag klar im Fokus: randlose Tageskachel wie gehabt, aber ohne Desktop-Sidebar-Versatz */
@media (min-width: 861px) {
  body.is-appmode.page-tagesprogramm .view { margin-top: var(--space-3) !important; }
}
/* Klassen-Chip im Kopf (statt Klassenauswahl) */
.mobile-appklasse {
  margin-left: auto;
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-sm);
  color: var(--brand-darker); background: var(--brand-light);
  padding: 4px 13px; border-radius: 999px; letter-spacing: -0.01em;
}
body:not(.is-appmode) .mobile-appklasse { display: none; }

/* «App»-Knopf im App-Kopf: öffnet die Install-Karte jederzeit wieder
   (verschwindet, wenn die Seite bereits als installierte App läuft) */
.mobile-appinstall {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: var(--space-2);
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-family: inherit; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.01em;
  cursor: pointer;
}
.mobile-appinstall:active { transform: translateY(1px); }
body:not(.is-appmode) .mobile-appinstall { display: none; }

/* Installations-Aufforderung */
.appinstall { position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center; padding: var(--space-4); }
.appinstall-backdrop { position: absolute; inset: 0; background: rgba(10, 20, 25, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.appinstall-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px; text-align: center;
  background: var(--paper); border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  padding: var(--space-5) var(--space-4) var(--space-4);
  /* Auf kleinen/kurzen Handys darf die Karte selbst scrollen, statt oben und
     unten aus dem Bild zu laufen (dvh = ohne Browserleisten gerechnet). */
  max-height: calc(100vh - 2 * var(--space-4));
  max-height: calc(100dvh - 2 * var(--space-4));
  overflow-y: auto;
}
/* Fingerfreundliche Grössen auf dem Handy */
@media (max-width: 560px) {
  .appinstall { padding: var(--space-3); }
  .appinstall-card { padding: var(--space-4) var(--space-3) var(--space-3); }
  .appinstall-tx, .appinstall-ios { font-size: var(--fs-md); }
  .appinstall-go { height: 50px; font-size: var(--fs-md); }
  .appinstall-later { padding: 10px; }
  .appinstall-x { top: 6px; right: 8px; padding: 8px; }
}
.appinstall-x { position: absolute; top: 8px; right: 10px; border: none; background: transparent; font-size: 1.1rem; color: var(--ink-quiet); cursor: pointer; line-height: 1; padding: 4px; }
/* Rundes App-Icon (das Icon-PNG ist selbst ein Lime-Kreis mit weissem gbs-Logo) */
.appinstall-icon { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; box-shadow: var(--shadow-soft); }
.appinstall-icon img { width: 84px; height: 84px; object-fit: contain; display: block; }
.appinstall-klasse { display: block; margin-top: var(--space-2); font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-lg); color: var(--ink); letter-spacing: -0.01em; }
.appinstall-tx { color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.5; margin: var(--space-2) 0 var(--space-3); }
.appinstall-ios { color: var(--ink); font-size: var(--fs-sm); line-height: 1.6; background: var(--bg-soft); border-radius: var(--radius); padding: var(--space-3); margin: 0 0 var(--space-2); }
.appinstall-go { width: 100%; justify-content: center; margin-bottom: 6px; }
.appinstall-hint { color: var(--ink-quiet); font-size: var(--fs-xs); line-height: 1.45; margin: 0 0 var(--space-2); }
.appinstall-hint a { color: var(--ink-soft); text-decoration: underline; }
/* .btn setzt display:inline-flex und würde das hidden-Attribut sonst überstimmen */
.appinstall [hidden] { display: none !important; }
.appinstall-later { border: none; background: transparent; color: var(--ink-quiet); font: inherit; font-size: var(--fs-sm); cursor: pointer; padding: 6px; text-decoration: underline; }

/* Kurze Bestätigung am unteren Rand (z. B. «App installiert») */
.app-toast {
  position: fixed; z-index: 1500;
  left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
  transform: translateX(-50%);
  max-width: min(92vw, 420px);
  background: var(--ink); color: #fff;
  font-size: var(--fs-sm); line-height: 1.45; text-align: center;
  padding: 10px var(--space-4); border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* App-Check (#/appcheck) */
.check-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; gap: var(--space-2); }
.check-row {
  display: flex; gap: var(--space-3); align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-3);
}
.check-row .check-mark {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: var(--fs-xs); color: #fff;
  background: var(--ink-quiet);
}
.check-row.is-ok  .check-mark { background: #2E7D32; }
.check-row.is-bad .check-mark { background: #C62828; }
.check-row.is-warn .check-mark { background: #B58900; }
.check-row .check-txt { min-width: 0; font-size: var(--fs-sm); line-height: 1.45; }
.check-row .check-txt small { color: var(--ink-soft); font-size: var(--fs-xs); word-break: break-word; }
.check-row code { font-family: var(--font-mono); font-size: var(--fs-2xs); word-break: break-all; }

/* Klassen-App: Schultag kompakt (wie Teams-Embed), damit alles auf den Bildschirm passt */
/* --- Klassen-App: kompakter grüner Kopf + Navigation an den Bildschirmrand ---
   Ziel: Der Schultag soll ohne Scrollen auf den Handybildschirm passen. Der
   Kopfbalken wird flacher, und die Blätter-Navigation verlässt den Kopf:
   ‹ und › schweben mittig am linken/rechten Rand, «Aktuell» wird zur kleinen
   Pille und erscheint nur, wenn man NICHT auf dem aktuellen Schultag steht.
   «Alle Schultage» entfällt – dafür gibt es unten den Reiter «Semester». */
/* Der hellgrüne Schultag-Kopf bleibt beim Scrollen oben kleben – damit immer
   sichtbar ist, welcher Schultag gerade offen ist.
   `overflow: hidden` der Tageskachel muss dafür weg: In einem Vorfahren mit
   overflow:hidden funktioniert `position: sticky` nicht. Die runden Ecken
   übernimmt darum der Kopf (oben) bzw. die Karte selbst (unten). */
body.is-appmode .tp-daycard { overflow: visible; }
body.is-appmode .tp-dc-head {
  position: sticky; top: 0; z-index: 40;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-2) var(--space-3); gap: var(--space-2);
}
body.is-appmode .tp-dc-when { gap: 2px; min-width: 0; }
body.is-appmode .tp-dc-eyebrow { font-size: 0.58rem; letter-spacing: 0.05em; opacity: .75; }
body.is-appmode .tp-dc-idrow { gap: var(--space-2); }
body.is-appmode .tp-dc-daybox { padding: 3px 12px; gap: var(--space-2); border-radius: 8px; }
body.is-appmode .tp-dc-daynr { font-size: 1.25rem; }
body.is-appmode .tp-dc-wd { font-size: 1.1rem; }
body.is-appmode .tp-dc-date { font-size: var(--fs-sm); }
body.is-appmode .tp-dc-klasse { font-size: var(--fs-md); }
body.is-appmode .tp-dc-sem { font-size: var(--fs-2xs); padding: 1px 9px; border-width: 1px; }

/* Navigation aus dem Kopf lösen (der Wrapper verschwindet, die Knöpfe bleiben) */
body.is-appmode .tp-dc-head .tp-nav,
body.is-appmode .tp-dc-head .tp-nav-group { display: contents; }
body.is-appmode #tp-sem { display: none; }

/* Blätter-Pfeile: dezent (kein Rahmen/Schatten, halbtransparent) und blenden
   sich nach kurzer Inaktivität ganz aus – wie die Steuerung eines Videoplayers.
   Jede Berührung/jeder Scroll zeigt sie sofort wieder (siehe initAppChrome). */
body.is-appmode #tp-prev,
body.is-appmode #tp-next {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 60;
  width: 32px; height: 48px; min-width: 0; padding: 0;
  display: grid; place-items: center;
  font-size: 1.25rem; line-height: 1; color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border: none; border-radius: 999px; box-shadow: none;
  opacity: .4;
  transition: opacity .45s ease, background .15s ease, color .15s ease;
}
body.is-appmode #tp-prev { left: 3px; }
body.is-appmode #tp-next { right: 3px; }
body.is-appmode #tp-prev:active, body.is-appmode #tp-next:active { background: var(--brand-light); color: var(--ink); opacity: 1; }
/* Am Semesteranfang/-ende den nutzlosen Pfeil ganz ausblenden */
body.is-appmode #tp-prev[disabled], body.is-appmode #tp-next[disabled] { display: none; }
body.is-appmode.is-nav-idle #tp-prev,
body.is-appmode.is-nav-idle #tp-next { opacity: 0; pointer-events: none; }

/* «Aktuell» klein und dezent oben rechts – nur wenn man weggeblättert hat */
body.is-appmode .tp-dc-head { flex-wrap: nowrap; }
body.is-appmode .tp-dc-when { flex: 1 1 auto; }
body.is-appmode #tp-today {
  flex: 0 0 auto; margin-left: auto; align-self: center;
  height: 26px; min-width: 0; padding: 0 11px;
  border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 999px;
  background: rgba(0, 0, 0, 0.06); color: var(--ink);
  font-size: var(--fs-2xs); font-weight: 700;
}
body.is-appmode.is-heute #tp-today { display: none; }

/* Platz sparen, damit möglichst der ganze Schultag auf den Bildschirm passt:
   Die Fusszeile jedes Blocks (LZ-Knopf + Auftragsnummer) bleibt in EINER Zeile
   statt umzubrechen – das spart je Block rund 35 px. */
body.is-appmode .blk-foot { flex-wrap: nowrap; gap: var(--space-2); margin-top: 4px; }
body.is-appmode .blk-foot .lz-btn-inline { padding: 4px 10px; font-size: var(--fs-2xs); white-space: nowrap; }
body.is-appmode .blk-auf { font-size: var(--fs-sm); padding: 2px 9px; }
body.is-appmode .blk-auf-label { font-size: 0.58rem; }
body.is-appmode .tp-dc-label { display: none; }   /* «Schultag-Ablauf» ist im App-Kopf klar */
body.is-appmode .lektion-pause { margin: 4px 0; }

/* Wischen: waagrechte Gesten gehören der App, senkrechtes Scrollen dem Browser */
body.is-appmode .tp-daycard { touch-action: pan-y; will-change: transform; }

/* Datum des Tages, der beim Wischen kommt – erscheint am Rand, in den man zieht */
.tp-swipe-hint {
  position: fixed; top: 50%; transform: translateY(-50%);
  z-index: 70; pointer-events: none; opacity: 0;
  display: none; align-items: center;
  padding: 8px 14px; border-radius: 999px;
  background: var(--ink); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm);
  white-space: nowrap; box-shadow: var(--shadow-2);
}
.tp-swipe-hint.is-on { display: flex; }
.tp-swipe-hint.is-left { left: 12px; }
.tp-swipe-hint.is-right { right: 12px; }

/* --- Einmalige Wisch-Anleitung beim Start der Klassen-App ------------------
   Eine Fingerkuppe wandert zweimal von rechts nach links, die ganze Pille
   blendet danach weg. Reines CSS, `pointer-events: none` – die Anleitung liegt
   also nur obenauf und fängt keine Berührung ab. */
.swipe-intro {
  position: fixed; left: 50%; top: 50%; z-index: 75;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: rgba(10, 20, 25, 0.86);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; box-shadow: var(--shadow-2);
  animation: swipeIntroFade 3.4s ease forwards;
}
.swipe-intro-txt { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); white-space: nowrap; }
.swipe-intro-sub { font-size: var(--fs-2xs); color: rgba(255, 255, 255, 0.7); }
/* Bahn, auf der die Fingerkuppe läuft, mit Pfeilspitzen an beiden Enden */
.swipe-intro-track { position: relative; width: 132px; height: 34px; display: flex; align-items: center; justify-content: space-between; color: rgba(255, 255, 255, 0.35); }
.swipe-intro-hand {
  position: absolute; left: 50%; top: 50%; margin: -14px 0 0 -14px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: var(--ink);
  display: grid; place-items: center;
  animation: swipeIntroHand 1.5s ease-in-out 2;
}
@keyframes swipeIntroHand {
  0%   { transform: translateX(42px) scale(.85); opacity: 0; }
  18%  { transform: translateX(42px) scale(1);   opacity: 1; }
  70%  { transform: translateX(-42px) scale(1);  opacity: 1; }
  88%, 100% { transform: translateX(-42px) scale(.85); opacity: 0; }
}
@keyframes swipeIntroFade {
  0%, 8%   { opacity: 0; transform: translate(-50%, -46%); }
  14%, 82% { opacity: 1; transform: translate(-50%, -50%); }
  100%     { opacity: 0; transform: translate(-50%, -52%); }
}
/* Wer Bewegung reduziert haben möchte, sieht nur den Text – ohne Wandern */
@media (prefers-reduced-motion: reduce) {
  .swipe-intro { animation: swipeIntroFade 3.4s ease forwards; }
  .swipe-intro-hand { animation: none; opacity: 1; transform: none; }
}

body.is-appmode .tp-daycard { padding: 0; }
/* (Die Polsterung des grünen Kopfs steht weiter oben bei der sticky-Regel –
   hier stand früher ein Duplikat, das die kompakte Fassung wieder aufhob.) */
body.is-appmode .tp-dc-body { padding: var(--space-3) var(--space-4); }
body.is-appmode .tp-daycard .tp-dc-label { margin: var(--space-3) 0 var(--space-2); }
body.is-appmode .tp-daycard .tp-section-label { margin: var(--space-3) 0 var(--space-2); }
body.is-appmode .lektion-row { padding: 5px 0; }
body.is-appmode .lektion-block-head { padding-bottom: 3px; }
body.is-appmode .blk-foot { margin-top: 6px; }
body.is-appmode .blk-foot .lz-btn-inline { margin-top: 0; }
body.is-appmode.page-tagesprogramm .view { margin-top: var(--space-2) !important; margin-bottom: var(--space-3); }

/* Foto-Seite: Lösch-Kreuz auf den Thumbnails + Fertig-Button + Bestätigung */
.foto-thumb-wrap { position: relative; display: inline-block; }
.foto-thumb-del {
  position: absolute; top: -7px; right: -7px;
  width: 24px; height: 24px; line-height: 1;
  border: none; border-radius: 50%; cursor: pointer;
  background: var(--ink); color: #fff; font-size: 0.8rem; font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.foto-thumb-del:active { transform: scale(0.92); }
.foto-thumb-wrap.is-pending .foto-capture-thumb { border-color: var(--brand-dark); }
.foto-done { width: 100%; justify-content: center; margin-top: var(--space-3); }
.foto-capture-done { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.foto-done-check {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--brand); color: var(--ink);
  font-size: 2rem; font-weight: 800;
  margin-bottom: var(--space-3);
}

/* Editor: Hinweis-Karte solange Klasse/Schultag noch nicht gewählt sind */
.ed-pick-hint {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; color: var(--ink-quiet);
  background: var(--bg-soft); border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-4);
  margin-top: var(--space-3);
}
.ed-pick-hint h3 { margin: 4px 0 0; color: var(--ink); font-size: var(--fs-lg); }
.ed-pick-hint p { margin: 0; max-width: 46ch; line-height: 1.5; }
.ed-pick-hint svg { color: var(--brand-dark); }

/* ===========================================================================
   Redesign v96: Typografie und Farbrollen
   Kein Klassenumbau: Diese Tokens wirken in Website, Teams und Klassen-App.
   =========================================================================== */
:root {
  --bg-warm: #F7F8F4;
  --bg-soft: #EEF1EC;
  --paper: #FFFFFF;
  --sand: #E3E7DF;
  --sand-strong: #C7CEC2;

  --ink: #142126;
  --ink-soft: #3B4A4F;
  --ink-quiet: #5B686C;

  --brand: #C7D300;
  --brand-dark: #667400;
  --brand-darker: #2D3900;
  --brand-light: #EEF3B9;
  --brand-soft: #F6F8E8;
  --water: #26383C;
  --water-deep: #142126;
  --water-soft: #EDF1DE;

  --border: #D9DFD9;
  --border-soft: #E9EDE8;
  --line: rgba(20, 33, 38, 0.10);
  --accent: #A25D44;

  --shadow-1: 0 1px 2px rgba(20, 33, 38, 0.04), 0 0 0 1px var(--line);
  --shadow-2: 0 2px 8px rgba(20, 33, 38, 0.06), 0 0 0 1px var(--line);
  --shadow-3: 0 24px 60px rgba(20, 33, 38, 0.16);
  --shadow-soft: 0 1px 2px rgba(20, 33, 38, 0.05), 0 4px 14px rgba(20, 33, 38, 0.06);
  --shadow-lift: 0 2px 4px rgba(20, 33, 38, 0.06), 0 12px 28px rgba(20, 33, 38, 0.10);

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Manrope', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --fs-2xs: 0.75rem;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-md: 0.9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
}

body { line-height: 1.55; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
h1 { font-size: 2.5rem; line-height: 1.06; font-weight: 800; letter-spacing: 0; }
h2 { font-size: 1.75rem; line-height: 1.16; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 700; letter-spacing: 0; }

@media (min-width: 860px) {
  h1 { font-size: 3.25rem; }
  h2 { font-size: 2.125rem; }
}

/* ===========================================================================
   Redesign v97: Tagesprogramm und Teams
   Der Schultag ist die zentrale Arbeitsflaeche. Ein dunkler Kopf gibt ihm
   Orientierung; Lime bleibt ein praeziser Akzent statt eines grossen Rahmens.
   =========================================================================== */
.tp-daycard {
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.tp-dc-head {
  background: var(--ink);
  color: #fff;
  border-top: 4px solid var(--brand);
  padding: var(--space-4) var(--space-5);
}

.tp-dc-body {
  margin: 0;
  padding: var(--space-5);
  background: var(--paper);
}

.tp-dc-eyebrow {
  color: var(--brand);
  letter-spacing: 0.05em;
}

.tp-dc-daybox {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 7px 15px;
}

.tp-dc-klasse { color: #fff; letter-spacing: 0; }
.tp-dc-sem {
  color: var(--brand-light);
  border-color: rgba(199, 211, 0, 0.8);
  letter-spacing: 0;
}
.tp-dc-thema { color: rgba(255, 255, 255, 0.78); }

.tp-dc-head .tp-nav-group {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}
.tp-dc-head .tp-navbtn,
.tp-dc-head .tp-navbtn-mid { color: #fff; }
.tp-dc-head .tp-navbtn + .tp-navbtn { border-left-color: rgba(255, 255, 255, 0.18); }
.tp-dc-head .tp-navbtn:hover:not([disabled]) { background: rgba(255, 255, 255, 0.14); color: #fff; }
.tp-dc-head .tp-navlink {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
}
.tp-dc-head .tp-navlink:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.54);
}

.tp-dc-label {
  margin-bottom: var(--space-3);
  letter-spacing: 0.05em;
}

.lektion-blocks { gap: var(--space-4); }
.lektion-block {
  padding: var(--space-4) var(--space-4) var(--space-3);
  border-radius: var(--radius-lg);
}
.lektion-block.has-blk {
  box-shadow: 0 1px 0 rgba(20, 33, 38, 0.03);
}
.lektion-block-head {
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(20, 33, 38, 0.10);
}
.blk-titel { letter-spacing: 0; }
.lektion-row { padding: 9px 2px; gap: var(--space-4); }
.lektion-row.is-free { padding: 6px 2px; }
.lektion-row.is-solo { padding: var(--space-3) 2px; }
.lektion-zeit {
  width: 78px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0;
}
.lektion-thema { letter-spacing: 0; }
.lektion-row:focus-within,
.lektion-row:hover { background: rgba(20, 33, 38, 0.045); }
.blk-foot { margin-top: var(--space-3); }
.blk-auf { border-radius: var(--radius); }
.lz-btn-inline { border-radius: var(--radius); }

.ha-box {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
}
.ha-faellig { background: var(--bg-soft); }
.ha-naechste { background: var(--brand-soft); }
.ha-foto { width: 80px; height: 80px; border-radius: var(--radius); }

@media (min-width: 861px) {
  body.page-tagesprogramm .tp-daycard {
    left: 0;
    width: 100%;
    margin: 0 0 var(--space-5);
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
  }

  body.page-tagesprogramm .tp-dc-body {
    margin: 0;
    background: var(--paper);
  }
}

/* Die Klassen-App bleibt maximal kompakt, erhaelt aber dieselbe klare
   Tagesidentitaet. Sticky funktioniert, weil die Karte weiterhin sichtbar
   ueber den Kopf hinausragen darf. */
body.is-appmode .tp-daycard {
  background: transparent;
  border: 0;
  box-shadow: none;
}
body.is-appmode .tp-dc-head {
  background: var(--ink);
  color: #fff;
  border-top: 3px solid var(--brand);
  box-shadow: var(--shadow-1);
}
body.is-appmode .tp-dc-body { background: transparent; }
body.is-appmode .tp-dc-eyebrow { color: var(--brand); }
body.is-appmode .tp-dc-daybox {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}
body.is-appmode .tp-dc-klasse { color: #fff; }
body.is-appmode .tp-dc-sem { color: var(--brand-light); border-color: rgba(199, 211, 0, 0.78); }
body.is-appmode #tp-today {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
}
body.is-appmode #tp-prev,
body.is-appmode #tp-next {
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
body.is-appmode #tp-prev:active,
body.is-appmode #tp-next:active { background: var(--brand-light); color: var(--ink); }
body.is-appmode .lektion-block { padding: var(--space-3); }
body.is-appmode .lektion-row { padding: 6px 2px; gap: var(--space-3); }

/* Im Teams-Reiter verschwindet die aeussere Karte. Der Tageskopf bleibt als
   klarer, kompakter Einstieg bestehen und fitEmbed() kann weiter skalieren. */
body.is-embed .tp-daycard {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body.is-embed .tp-dc-head { border-radius: 0; }
body.is-embed .tp-dc-body { margin: 0; }
body.is-embed .lektion-block { padding: var(--space-3); }
body.is-embed .lektion-row { padding: 5px 2px; }

@media (max-width: 560px) {
  .tp-dc-head { padding: var(--space-3); }
  .tp-dc-body { padding: var(--space-3); }
  .tp-dc-daybox { padding: 6px 10px; gap: var(--space-2); }
  .tp-dc-klasse { font-size: var(--fs-md); }
  .tp-dc-sem { font-size: var(--fs-2xs); padding: 2px 8px; }
  .lektion-block { padding: var(--space-3); }
  .lektion-row { gap: var(--space-2); }
  .lektion-zeit { width: 62px; }
  .ha-foto { width: 72px; height: 72px; }
}

/* ===========================================================================
   Redesign v98: Unterseiten und Lernauftrags-Suche
   Die linke Sidebar bleibt der feste Anker. Unterseiten erhalten eine ruhige,
   praezise Markenlinie; die Suche wirkt wieder wie ein Arbeitswerkzeug.
   =========================================================================== */
@media (min-width: 861px) {
  body .home-hero,
  body .la-head,
  body .section-head {
    min-height: 104px;
    padding: var(--space-5) var(--space-6);
  }

  body .home-hero::before,
  body .la-head::before,
  body .section-head::before {
    left: var(--space-6);
    top: 50%;
    width: 4px;
    height: 36px;
    transform: translateY(-50%);
  }

  body .home-hero h1,
  body .la-head h1,
  body .section-head h1 {
    margin-left: 18px;
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: 0;
  }

  body .section-head p,
  body .home-hero p,
  body .la-head p { margin-left: 18px; }
}

.la-search { margin-top: var(--space-4); margin-bottom: var(--space-4); }
.la-search-box {
  border-radius: var(--radius-lg);
  padding: 5px 5px 5px var(--space-4);
  border-color: var(--border);
  box-shadow: var(--shadow-1);
}
.la-search-box:focus-within {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px var(--brand-light), var(--shadow-1);
}
.la-search-ic { width: 20px; height: 20px; }
.la-search-box input { height: 44px; font-size: var(--fs-base); font-weight: 500; }
.la-search-btn {
  min-height: 40px;
  border-radius: var(--radius);
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
.filterbar {
  border-radius: var(--radius);
  border-color: var(--border-soft);
  box-shadow: none;
}
.hit-section-head { margin-top: var(--space-6); }
.hit-section-head h2 { letter-spacing: 0; }

@media (max-width: 640px) {
  .la-search-box { padding: 4px 4px 4px var(--space-3); }
  .la-search-box input { height: 42px; font-size: var(--fs-md); }
  .la-search-ic { width: 18px; height: 18px; }
  .la-search-btn { display: none; }
}

/* ===========================================================================
   Redesign v99: Lime-Tageskopf und kompakte Teams-Navigation
   =========================================================================== */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Der Lime-Kopf bleibt als klarer GBS-Absender sichtbar. Die dunkle Tagesbox
   und die schwarzen Beschriftungen schaffen dabei ausreichend Kontrast. */
.tp-dc-head {
  background: var(--brand);
  color: var(--ink);
  border-top: 3px solid var(--ink);
  padding: var(--space-2) var(--space-4);
  gap: var(--space-2) var(--space-4);
  font-synthesis: none;
}
.tp-dc-eyebrow { color: var(--brand-darker); }
.tp-dc-daybox {
  background: var(--ink);
  border-color: rgba(20, 33, 38, 0.82);
  box-shadow: 0 1px 1px rgba(20, 33, 38, 0.12);
}
.tp-dc-daynr,
.tp-dc-wd { font-weight: 700; letter-spacing: 0; }
.tp-dc-date { font-weight: 600; }
.tp-dc-klasse { color: var(--ink); font-weight: 700; }
.tp-dc-sem {
  color: var(--ink);
  border-color: rgba(20, 33, 38, 0.74);
  font-weight: 700;
}
.tp-dc-thema { color: var(--ink-soft); }
.tp-dc-head .tp-nav-group {
  background: rgba(20, 33, 38, 0.06);
  border-color: rgba(20, 33, 38, 0.34);
}
.tp-dc-head .tp-navbtn,
.tp-dc-head .tp-navbtn-mid { color: var(--ink); font-weight: 600; }
.tp-dc-head .tp-navbtn + .tp-navbtn { border-left-color: rgba(20, 33, 38, 0.22); }
.tp-dc-head .tp-navbtn:hover:not([disabled]) { background: rgba(20, 33, 38, 0.10); color: var(--ink); }
.tp-dc-head .tp-navlink {
  color: var(--ink);
  border-color: rgba(20, 33, 38, 0.48);
  font-weight: 600;
}
.tp-dc-head .tp-navlink:hover {
  background: rgba(20, 33, 38, 0.09);
  color: var(--ink);
  border-color: var(--ink);
}

body.is-appmode .tp-dc-head {
  background: var(--brand);
  color: var(--ink);
  border-top-color: var(--ink);
  padding: var(--space-2) var(--space-3);
}
body.is-appmode .tp-dc-eyebrow { color: var(--brand-darker); }
body.is-appmode .tp-dc-daybox {
  background: var(--ink);
  border-color: rgba(20, 33, 38, 0.82);
}
body.is-appmode .tp-dc-klasse { color: var(--ink); }
body.is-appmode .tp-dc-sem { color: var(--ink); border-color: rgba(20, 33, 38, 0.74); }
body.is-appmode #tp-today {
  color: var(--ink);
  border-color: rgba(20, 33, 38, 0.5);
  background: rgba(20, 33, 38, 0.06);
}

/* Teams startet als schlanke Icon-Leiste. Beim Darueberfahren oder mit dem
   Keyboard klappt sie auf, ohne einen zweiten Navigationstyp einzufuehren. */
@media (min-width: 861px) {
  body.is-embed .tp-dc-head { padding: var(--space-2) var(--space-4); }
  body.is-embed .sidebar {
    width: 56px;
    padding-left: 8px;
    padding-right: 8px;
    z-index: 30;
  }
  body.is-embed .sidebar-top {
    flex-direction: column;
    gap: var(--space-3);
    padding: 0 0 var(--space-2);
  }
  body.is-embed .sidebar .brand-text,
  body.is-embed .sidebar-klasse,
  body.is-embed .sidebar-foot,
  body.is-embed .sidenav a span { display: none; }
  body.is-embed .sidebar .brand { justify-content: center; }
  body.is-embed .sidenav a { justify-content: center; padding: 11px 0; }
  body.is-embed .sidebar-toggle { transform: rotate(180deg); }

  body.is-embed .sidebar:hover,
  body.is-embed .sidebar:focus-within {
    width: var(--sidebar-w);
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  body.is-embed .sidebar:hover .sidebar-top,
  body.is-embed .sidebar:focus-within .sidebar-top {
    flex-direction: row;
    gap: var(--space-2);
    padding: 0 var(--space-2) var(--space-2);
  }
  body.is-embed .sidebar:hover .brand-text,
  body.is-embed .sidebar:focus-within .brand-text { display: flex; }
  body.is-embed .sidebar:hover .sidebar-klasse,
  body.is-embed .sidebar:focus-within .sidebar-klasse,
  body.is-embed .sidebar:hover .sidebar-foot,
  body.is-embed .sidebar:focus-within .sidebar-foot { display: flex; }
  body.is-embed .sidebar:hover .sidenav a,
  body.is-embed .sidebar:focus-within .sidenav a {
    justify-content: flex-start;
    padding: 11px var(--space-3);
  }
  body.is-embed .sidebar:hover .sidenav a span,
  body.is-embed .sidebar:focus-within .sidenav a span { display: inline; }
  body.is-embed .sidebar:hover .sidebar-toggle,
  body.is-embed .sidebar:focus-within .sidebar-toggle { transform: none; }
}

/* Lehrerbereich: konzentrierte Arbeitsflaeche ohne globale Navigation. */
@media (min-width: 861px) {
  body.page-lehrer .sidebar { display: none; }
  body.page-lehrer .view { padding-left: var(--space-6); padding-right: var(--space-6); }
  body.page-lehrer .editor2 { max-width: 1440px; margin-left: auto; margin-right: auto; }
}
.ed-program-link {
  color: var(--brand-darker);
  border-color: var(--brand-dark);
  background: var(--brand-soft);
}
.ed-program-link:hover {
  color: var(--ink);
  border-color: var(--brand-dark);
  background: var(--brand-light);
}
.editor2-back {
  display: inline-flex;
  margin: 0 0 var(--space-2);
  border-color: rgba(255, 255, 255, 0.38) !important;
  color: #fff !important;
}
.editor2-back:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.66) !important;
}

/* Teams-Kopf: auf breiten Ansichten eine einzige, ruhige Informationszeile. */
@media (min-width: 861px) {
  .tp-dc-head .tp-dc-when { display: contents; }
  .tp-dc-head .tp-dc-eyebrow { flex: 0 0 auto; white-space: nowrap; }
  .tp-dc-head .tp-dc-idrow { flex: 0 1 auto; }
  .tp-dc-head .tp-nav { flex: 0 0 auto; margin-left: auto; }

  /* Im Ruhezustand ist die Teams-Navigation nur eine dezente Icon-Leiste. */
  body.is-embed .sidebar {
    width: 48px;
    padding-left: 6px;
    padding-right: 6px;
    background: #1a2a2f;
    border-right-color: rgba(20, 33, 38, 0.16);
  }
  body.is-embed .sidebar-top { gap: var(--space-4); }
  body.is-embed .sidenav { gap: 2px; }
  body.is-embed .sidenav a { padding: 10px 0; color: rgba(255, 255, 255, 0.58); }
  body.is-embed .sidenav a svg { color: rgba(255, 255, 255, 0.54); }
  body.is-embed .sidenav a.is-active svg { color: var(--brand); }
  body.is-embed .sidebar-toggle {
    width: 30px;
    height: 30px;
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.58);
  }
  body.is-embed .sidebar:hover,
  body.is-embed .sidebar:focus-within {
    background: var(--ink);
  }
}

@media (min-width: 1100px) {
  .tp-dc-head { gap: 8px; flex-wrap: nowrap; }
  .tp-dc-head .tp-dc-eyebrow { font-size: 0.6rem; letter-spacing: 0.045em; }
  .tp-dc-head .tp-dc-idrow { gap: 10px; flex-wrap: nowrap; }
  .tp-dc-head .tp-dc-daybox { gap: 10px; padding: 5px 12px; }
  .tp-dc-head .tp-dc-daynr { font-size: 1.45rem; }
  .tp-dc-head .tp-dc-wd { font-size: 1.25rem; }
  .tp-dc-head .tp-dc-date { font-size: var(--fs-sm); }
  .tp-dc-head .tp-dc-klasse { font-size: var(--fs-md); }
  .tp-dc-head .tp-dc-sem { font-size: var(--fs-sm); padding: 2px 10px; }
  .tp-dc-head .tp-nav { gap: 6px; white-space: nowrap; }
  .tp-dc-head .tp-navbtn { min-width: 34px; padding: 0 10px; }
  .tp-dc-head .tp-navlink { padding: 0 10px; }
}

/* Vergangene Tage bleiben waehlbar, treten in der Semesteruebersicht aber zurueck. */
.tp-tile.is-past {
  background: #f5f6f3;
  border-color: #d9ddd4;
}
.tp-tile.is-past .tp-tile-head { background: #e1e5dd; color: #667066; }
.tp-tile.is-past .tp-tile-nr,
.tp-tile.is-past .tp-tile-date,
.tp-tile.is-past .tp-tile-thema { color: #667066; }
.tp-tile.is-past .tp-tile-auf {
  color: #667066 !important;
  border-color: #cbd1c7 !important;
  background: #eef0eb;
}
.tp-tile.is-past:hover {
  border-color: #aeb6a9;
  box-shadow: var(--shadow-soft);
}

/* Klassen-App: Der Schultag gehoert auf dem Handy der ganzen Arbeitsflaeche. */
body.is-appmode.page-tagesprogramm .view {
  width: 100%;
  max-width: none;
  margin: 0 0 calc(env(safe-area-inset-bottom, 0px) + 76px) !important;
  padding: 0;
}
body.is-appmode .content,
body.is-appmode .view { touch-action: pan-y; }
/* Tageswechsel erfolgt in der App ausschliesslich per Wischgeste. */
body.is-appmode #tp-prev,
body.is-appmode #tp-next { display: none !important; }

/* Ein Teams-Reiter ist immer an genau eine Klasse gebunden. */
body.is-embed .sidebar-klasse,
body.is-embed .sidebar:hover .sidebar-klasse,
body.is-embed .sidebar:focus-within .sidebar-klasse,
body.is-embed .mobile-klasse { display: none !important; }

/* Tageskopf: Absender ueber dem Tag, Klasse und Semester unmittelbar daneben. */
.tp-dc-head .tp-dc-when {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tp-dc-head .tp-dc-eyebrow { display: block; }
.tp-dc-head .tp-dc-idrow { align-items: center; }
body.is-embed .tp-dc-head .tp-nav {
  display: flex;
  flex: 1 0 100%;
  margin-left: 0;
  padding-top: 2px;
}
body.is-embed .tp-dc-head { flex-wrap: wrap; }
@media (min-width: 861px) {
  .tp-dc-head { align-items: flex-end; }
  .tp-dc-head .tp-dc-when { display: flex; }
  .tp-dc-head .tp-nav { margin-left: auto; align-self: flex-end; }
  /* Der Schultag beginnt direkt an der linken Seitenleiste. */
  body.page-tagesprogramm:not(.is-appmode) .tp-daycard {
    left: calc(-1 * var(--space-6));
    width: calc(100% + 2 * var(--space-6));
    margin-bottom: var(--space-5);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

/* In der Klassen-App reichen die beiden Lektionsbloecke bis an die Displaykante. */
body.is-appmode .tp-dc-body .lektion-blocks {
  max-width: none;
  margin-left: calc(-1 * var(--space-4));
  margin-right: calc(-1 * var(--space-4));
}
body.is-appmode .lektion-block { border-radius: 0; }

/* Lernauftraege: echte Titelseite ohne sichtbare PDF-Scrollleiste. */
.auf-titlepage-link { display: block; color: inherit; }
.auf-titlepage-link:hover { text-decoration: none; }
.auf-preview-frame {
  top: 0;
  right: auto;
  bottom: 0;
  left: 0;
  width: calc(100% + 18px);
  max-width: none;
}

/* Der Inhalt startet direkt unter dem Tageskopf und bleibt als Einheit lesbar. */
body.page-tagesprogramm .tp-dc-body {
  padding-top: var(--space-3);
  border-top: 1px solid rgba(20, 33, 38, 0.13);
}
body.page-tagesprogramm .tp-daycard {
  border: 1px solid rgba(20, 33, 38, 0.16);
  box-shadow: 0 1px 3px rgba(20, 33, 38, 0.08);
}
@media (min-width: 861px) {
  body.page-tagesprogramm:not(.is-appmode) .tp-daycard {
    border: 1px solid rgba(20, 33, 38, 0.16);
    box-shadow: 0 1px 3px rgba(20, 33, 38, 0.08);
  }
}

/* Der gesamte Schultag bleibt als eine ruhige Arbeitsflaeche zusammen.
   Die Lektionsbloecke behalten darin ihren eigenen, leichten Kontrast. */
body.page-tagesprogramm:not(.is-appmode) .tp {
  background: #f5f8f3;
  border: 1px solid rgba(20, 33, 38, 0.16);
  box-shadow: 0 1px 4px rgba(20, 33, 38, 0.08);
}
body.page-tagesprogramm:not(.is-appmode) .tp-daycard {
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body.page-tagesprogramm:not(.is-appmode) #tp-weitere:not(:empty) {
  position: static;
  left: auto;
  padding: 0 var(--space-4) var(--space-5);
}
body.page-tagesprogramm:not(.is-appmode) #tp-weitere:empty { display: none; }

/* Die Navigation folgt auf Website und Teams derselben klaren Kopf-Logik. */
.tp-dc-head { flex-wrap: wrap; }
.tp-dc-head .tp-nav {
  display: flex;
  flex: 1 0 100%;
  margin-left: 0;
  padding-top: 2px;
}

@media (min-width: 861px) {
  body.page-tagesprogramm:not(.is-appmode) .tp {
    position: relative;
    left: calc(-1 * var(--space-6));
    width: calc(100% + 2 * var(--space-6));
    margin-bottom: var(--space-5);
  }
  body.page-tagesprogramm:not(.is-appmode) .tp-daycard {
    left: auto;
    width: auto;
  }
  body.page-tagesprogramm:not(.is-appmode) #tp-weitere:not(:empty) {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
  .tp-dc-head .tp-nav {
    align-self: auto;
    margin-left: 0;
  }
}

/* Bei grossen Ansichten endet die Schultagsflaeche direkt nach der lesbaren
   Lektionsspalte statt bis an den rechten Bildschirmrand zu laufen. */
@media (min-width: 1100px) {
  body.page-tagesprogramm:not(.is-appmode) .tp { max-width: 960px; }
}

/* Die Semesteruebersicht steht bewusst unterhalb und ausserhalb des Schultags,
   aber mit derselben linken Kante wie die Lektionsbloecke. */
body.page-tagesprogramm:not(.is-appmode) #tp-weitere:not(:empty) {
  position: relative;
  left: auto;
  margin: 0 0 var(--space-5);
  padding: 0;
}
@media (min-width: 861px) {
  body.page-tagesprogramm:not(.is-appmode) #tp-weitere:not(:empty) {
    max-width: 920px;
    margin-left: calc(-1 * var(--space-4));
  }
  body.page-tagesprogramm.is-embed:not(.is-appmode) #tp-weitere:not(:empty) {
    margin-left: calc(-1 * var(--space-5));
  }
}

/* QR-Einstieg nur am ersten Schultag: kompakt im Kopf, gross im Dialog. */
.tp-header-qr {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 4px 6px 4px 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(20, 33, 38, 0.45);
  border-radius: var(--radius);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tp-header-qr:hover {
  background: rgba(255, 255, 255, 0.52);
  border-color: var(--ink);
}
.tp-header-qr-copy {
  font-size: var(--fs-2xs);
  font-weight: 700;
  line-height: 1.25;
}
.tp-header-qr-box { display: block; width: 42px; height: 42px; line-height: 0; }
.tp-header-qr-box img { display: block; width: 42px; height: 42px; image-rendering: pixelated; }
.tp-appqr-panel { text-align: center; }
.tp-appqr-box { display: grid; place-items: center; min-height: 196px; margin: var(--space-4) auto; }
.tp-appqr-box svg { display: block; width: 196px; height: 196px; max-width: 100%; }
.tp-appqr-link { text-decoration: none; }

@media (max-width: 560px) {
  .tp-header-qr { margin-left: 0; }
  .tp-header-qr-box, .tp-header-qr-box img { width: 38px; height: 38px; }
}

/* In der Klassen-App folgen Hausaufgaben und Zusatzbereiche derselben
   Vollbreitenlogik wie die Lektionsbloecke. */
body.is-appmode .tp-dc-body .ha-box,
body.is-appmode .tp-dc-body .tp-section-label,
body.is-appmode .tp-dc-body > .tp-chiprow,
body.is-appmode .tp-dc-body > .tp-zusatz {
  max-width: none;
  margin-left: calc(-1 * var(--space-4));
  margin-right: calc(-1 * var(--space-4));
}
body.is-appmode .tp-dc-body .ha-box,
body.is-appmode .tp-dc-body > .tp-zusatz { border-radius: 0; }

.ed-block-add { margin-top: var(--space-2); }
.ed-block-add-btn {
  padding: 6px 10px;
  color: var(--ink-quiet);
  background: transparent;
  border: 1px dashed rgba(20, 33, 38, 0.28);
  border-radius: var(--radius);
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.ed-block-add-btn:hover {
  color: var(--ink);
  background: var(--bg-soft);
  border-color: var(--brand-dark);
}

/* Praxisauftraege auf der Kompetenzen-Seite */
.pa-entry { margin: 0 0 var(--space-5); }
.pa-teaser {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  text-align: left;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--paper);
  color: inherit;
  cursor: pointer;
}
.pa-teaser:hover { border-color: var(--brand-dark); box-shadow: var(--shadow-1); }
.pa-teaser-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--ink);
}
.pa-teaser strong { display: block; font-size: var(--fs-lg); }
.pa-teaser small { display: block; color: var(--ink-quiet); font-size: var(--fs-sm); margin-top: 2px; }
.pa-teaser-count {
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
}
.pa-panel {
  margin-top: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.pa-panel[hidden] { display: none; }
.pa-resources,
.pa-result-list,
.pa-hkb-list,
.hk-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.pa-resource,
.pa-chip,
.pa-result,
.pa-mini,
.la-mini {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}
.pa-resource:hover,
.pa-chip:hover,
.pa-result:hover,
.pa-mini:hover,
.la-mini:hover {
  border-color: var(--brand-dark);
  text-decoration: none;
}
.pa-resource span,
.pa-chip span,
.pa-result span,
.pa-mini span {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--brand-dark);
}
.pa-resource-zip { border-color: var(--brand-dark); }
.pa-tools {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(240px, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.pa-tools label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--ink-quiet);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pa-tools select,
.pa-tools input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
}
.pa-result-note { color: var(--ink-soft); font-size: var(--fs-sm); margin: 0 0 var(--space-2); }
.pa-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: var(--space-4);
  align-items: start;
  margin-top: var(--space-4);
}
.pa-content-grid h2 { font-size: var(--fs-lg); margin: 0 0 var(--space-3); }
.pa-hkb {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  margin-bottom: var(--space-2);
}
.pa-hkb summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-3);
  cursor: pointer;
  font-weight: 700;
}
.pa-hkb summary span { font-family: var(--font-mono); color: var(--brand-dark); }
.pa-hkb summary em { margin-left: auto; font-style: normal; color: var(--ink-quiet); font-size: var(--fs-xs); }
.pa-hkb-list { padding: 0 var(--space-3) var(--space-3); }
.pa-empty {
  padding: var(--space-3);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-quiet);
}
.pa-matrix-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
.pa-matrix {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: var(--fs-xs);
}
.pa-matrix th,
.pa-matrix td {
  border-bottom: 1px solid var(--border-soft);
  padding: 7px 8px;
  vertical-align: middle;
}
.pa-matrix thead th {
  position: sticky;
  top: 0;
  background: var(--bg-soft);
  z-index: 1;
  color: var(--ink-soft);
  font-weight: 800;
}
.pa-matrix tbody th {
  text-align: left;
  width: 250px;
  background: var(--paper);
}
.pa-matrix tbody th a { color: inherit; text-decoration: none; }
.pa-matrix tbody th strong { display: block; font-family: var(--font-mono); color: var(--brand-dark); }
.pa-matrix tbody th span { display: block; font-weight: 500; color: var(--ink-soft); line-height: 1.25; }
.pa-matrix td { text-align: center; }
.pa-phase {
  display: inline-flex;
  justify-content: center;
  min-width: 70px;
  padding: 4px 7px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}
.pa-phase-practice { background: rgba(76, 122, 138, 0.14); color: #235a6b; }
.pa-phase-independent { background: rgba(86, 125, 54, 0.16); color: #355b24; }
.pa-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}
.pa-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pa-legend i { width: 12px; height: 12px; border-radius: 50%; }
.pa-leg-practice { background: rgba(76, 122, 138, 0.35); }
.pa-leg-independent { background: rgba(86, 125, 54, 0.35); }
.hk-row-paired {
  grid-template-columns: 40px minmax(180px, 0.8fr) minmax(260px, 1.6fr);
  cursor: default;
}
.hk-row-paired:hover { text-decoration: none; }
.hk-pair-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.hk-pair-label {
  display: block;
  margin-bottom: 5px;
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-quiet);
}
.hk-empty-mini { color: var(--ink-quiet); font-size: var(--fs-sm); }
.pa-mini,
.la-mini {
  font-size: var(--fs-xs);
  padding: 6px 8px;
}
.hk-overlay-pa { border-left: 3px solid currentColor; }
@media (max-width: 900px) {
  .pa-content-grid,
  .hk-row-paired,
  .hk-pair-cols,
  .pa-tools {
    grid-template-columns: 1fr;
  }
}

/* Praxisauftraege: uebersichtliche Lernweg-Optik */
.pa-teaser {
  grid-template-columns: auto 1fr auto;
  border-left-color: var(--ink);
  box-shadow: var(--shadow-1);
}
.pa-teaser-icon {
  border-radius: 50%;
  background: var(--ink);
  color: var(--brand);
}
.pa-panel {
  padding: var(--space-5);
  background: linear-gradient(180deg, var(--paper) 0%, var(--bg-soft) 100%);
}
.pa-panel-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-4);
}
.pa-orbit {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  box-shadow: 0 0 0 8px var(--brand-light);
}
.pa-orbit span { font-family: var(--font-mono); font-weight: 800; }
.pa-panel-head h2 { margin: 0 0 2px; font-size: var(--fs-xl); }
.pa-panel-head p { margin: 0; color: var(--ink-soft); }
.pa-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.pa-resource-card {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 62px;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.pa-resource-card:hover {
  border-color: var(--brand-dark);
  box-shadow: var(--shadow-1);
  text-decoration: none;
}
.pa-resource-ico {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--brand-dark);
  flex-shrink: 0;
}
.pa-resource-copy { display: flex; flex-direction: column; min-width: 0; }
.pa-resource-copy small {
  color: var(--ink-quiet);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pa-resource-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-sm);
}
.pa-resource-zip .pa-resource-ico { background: var(--brand-light); color: var(--brand-darker); }
.pa-control-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: var(--space-3);
  align-items: end;
  margin-bottom: var(--space-4);
}
.pa-variant-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--ink-quiet);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pa-variant-field select {
  height: 58px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 0 var(--space-3);
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-1);
}
.pa-search-form { margin: 0; }
.pa-search-box { box-shadow: var(--shadow-1); }
.pa-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.pa-stat {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
.pa-stat strong {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  flex-shrink: 0;
}
.pa-stat span { color: var(--ink-soft); font-weight: 700; }
.pa-content-stack { display: grid; gap: var(--space-4); }
.pa-hkb-card,
.pa-matrix-card { border-radius: var(--radius); }
.pa-station {
  position: relative;
  padding-left: 72px;
  padding-bottom: var(--space-4);
}
.pa-station::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 58px;
  bottom: -4px;
  border-left: 2px dashed var(--border);
}
.pa-station:last-child::before { display: none; }
.pa-node {
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--brand-dark);
  background: var(--paper);
  color: var(--brand-darker);
  box-shadow: 0 0 0 5px var(--bg-soft);
}
.pa-node span { font-family: var(--font-mono); font-weight: 800; font-size: var(--fs-lg); }
.pa-station-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 52px;
  margin-bottom: var(--space-2);
}
.pa-station-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pa-station-title small {
  color: var(--ink-quiet);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pa-station-title strong { color: var(--ink); font-size: var(--fs-base); }
.pa-station-count {
  margin-left: auto;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 3px 10px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 800;
}
.pa-card-grid,
#pa-results .pa-result-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-2);
}
.pa-card,
.pa-result-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px var(--space-2);
  align-items: start;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.pa-card:hover,
.pa-result-card:hover {
  transform: translateY(-1px);
  border-color: var(--brand-dark);
  box-shadow: var(--shadow-1);
  text-decoration: none;
}
.pa-card-num {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-darker);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: var(--fs-xs);
}
.pa-card-title { font-weight: 750; line-height: 1.25; }
.pa-card-phases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--ink-quiet);
  font-size: var(--fs-xs);
}
.pa-card-phases span { display: inline-flex; align-items: center; gap: 5px; }
.pa-card-phases i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pa-result-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 var(--space-2);
}
.pa-result-head strong { color: var(--ink); }
.pa-result-head span { color: var(--ink-soft); }
.hk-overlay-section {
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--paper);
}
.hk-overlay-section + .hk-overlay-section { margin-top: var(--space-3); }
.hk-overlay-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--space-3);
  font-size: var(--fs-md);
}
.hk-overlay-section-dot {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 800;
}
.hk-overlay-empty { margin: 0; color: var(--ink-quiet); font-size: var(--fs-sm); }
@media (max-width: 760px) {
  .pa-panel { padding: var(--space-3); }
  .pa-panel-head { grid-template-columns: 1fr; }
  .pa-orbit { width: 52px; height: 52px; }
  .pa-control-row,
  .pa-stats { grid-template-columns: 1fr; }
  .pa-station { padding-left: 56px; }
  .pa-node { width: 42px; height: 42px; }
  .pa-station::before { left: 20px; top: 48px; }
  .pa-card-grid,
  #pa-results .pa-result-list { grid-template-columns: 1fr; }
  .pa-card,
  .pa-result-card { grid-template-columns: 1fr; }
  .pa-card-num { grid-row: auto; width: fit-content; }
  .hk-overlay-auftrag { grid-template-columns: 1fr; }
  .hk-oa-sem { white-space: normal; }
}

/* Praxisauftraege: reduzierte Listenansicht */
.pa-panel {
  padding: var(--space-4);
  background: var(--paper);
}
.pa-panel-head {
  display: block;
  margin-bottom: var(--space-3);
}
.pa-panel-head h2 {
  margin: 0 0 3px;
  font-size: var(--fs-xl);
}
.pa-panel-head p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 70ch;
}
.pa-resource-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 var(--space-4);
  padding: 0 0 var(--space-3);
  border-bottom: 1px solid var(--border-soft);
}
.pa-resource-list a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
}
.pa-resource-list a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pa-control-row {
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.pa-variant-field select {
  height: 46px;
  border-radius: var(--radius);
  box-shadow: none;
}
.pa-result-head {
  margin: 0 0 var(--space-3);
  color: var(--ink-soft);
}
.pa-result-head strong {
  color: var(--ink);
  margin-right: 5px;
}
.pa-list-group {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-soft);
}
.pa-list-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--ink);
}
.pa-list-group h3 span {
  font-family: var(--font-mono);
  color: var(--brand-darker);
}
.pa-list-group h3 em {
  margin-left: auto;
  font-style: normal;
  color: var(--ink-quiet);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.pa-list-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pa-list-group li + li { border-top: 1px solid var(--border-soft); }
.pa-text-link {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  color: var(--ink);
  text-decoration: none;
}
.pa-text-link strong {
  min-width: 54px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--brand-darker);
}
.pa-text-link span {
  min-width: 0;
  line-height: 1.25;
}
.pa-text-link:hover span {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pa-matrix-details {
  margin-top: var(--space-3);
  border-top: 1px solid var(--border-soft);
}
.pa-matrix-details > summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-weight: 800;
  list-style-position: inside;
}
.pa-matrix-details > summary small {
  color: var(--ink-quiet);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.pa-matrix-wrap {
  overflow: auto;
  border: 2px solid #1d211f;
  border-radius: 0;
  background: #fff;
  box-shadow: var(--shadow-1);
}
.pa-matrix {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--fs-xs);
  line-height: 1.16;
}
.pa-matrix th,
.pa-matrix td {
  height: 26px;
  padding: 0;
  border: 1px solid #1d211f;
  vertical-align: middle;
}
.pa-matrix thead th {
  position: static;
  z-index: 4;
  background: #d4d7d9;
  color: #111817;
  text-align: center;
  font-weight: 850;
}
.pa-matrix thead tr:first-child th:first-child {
  width: 390px;
  min-width: 390px;
  background: #fff;
}
.pa-matrix thead tr:first-child th:last-child {
  height: 22px;
  font-size: var(--fs-sm);
}
.pa-matrix tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 390px;
  min-width: 390px;
  padding: 3px 7px;
  border-right-width: 2px;
  background: #fff;
  text-align: left;
}
.pa-matrix tbody tr:not(.pa-matrix-hkb-row):nth-child(odd) th,
.pa-matrix tbody tr:not(.pa-matrix-hkb-row):nth-child(odd) td {
  background: #f8fafb;
}
.pa-matrix tbody td {
  min-width: 68px;
  background: #fff;
  text-align: center;
}
.pa-matrix tbody td.has-phase { padding: 0; }
.pa-matrix tbody th strong {
  display: inline;
  margin-right: 5px;
  font-family: var(--font-mono);
  color: #005d86;
}
.pa-matrix tbody th span {
  display: inline;
  font-size: var(--fs-2xs);
  color: #172033;
  font-weight: 650;
}
.pa-matrix-hkb-row th {
  position: static;
  z-index: 3;
  height: 27px;
  padding: 4px 7px;
  background: #1f261f !important;
  color: #fff;
  text-align: left;
  border-color: #1d211f;
}
.pa-matrix-hkb-row th span {
  margin-right: 7px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 900;
}
.pa-matrix-hkb-row th strong {
  color: #fff;
  font-weight: 850;
}
.pa-matrix tbody .pa-matrix-hkb-row th {
  background: #111817 !important;
  color: #fff !important;
}
.pa-matrix tbody .pa-matrix-hkb-row th span,
.pa-matrix tbody .pa-matrix-hkb-row th strong {
  color: #fff !important;
}
.pa-matrix tbody .pa-matrix-hkb-row th span {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .42);
  font-size: var(--fs-xs);
}
.pa-matrix tbody .pa-matrix-hkb-row th strong { font-size: var(--fs-sm); }
.pa-matrix .pa-matrix-hkb-code,
.pa-matrix .pa-matrix-hkb-title {
  color: #fff !important;
}
.pa-matrix .pa-matrix-hkb-code {
  font-family: var(--font-mono);
  font-weight: 900;
}
.pa-matrix .pa-matrix-hkb-title {
  font-family: var(--font-body);
  font-weight: 850;
}
.pa-phase-stack {
  min-height: 26px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.pa-phase {
  min-width: 0;
  width: 100%;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: 0 4px;
  font-size: var(--fs-xs);
  font-weight: 900;
  text-decoration: none;
}
.pa-phase-stack .pa-phase + .pa-phase {
  border-left: 1px solid #1d211f;
}
.pa-phase-practice { background: #cdefff; color: #044766; }
.pa-phase-independent { background: #0079b8; color: #fff; }
.pa-legend {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-xs);
}
.pa-leg-practice { background: #cdefff; border: 1px solid #93d7f4; }
.pa-leg-independent { background: #0079b8; border: 1px solid #005d86; }
.pa-hkb-acc {
  padding: 0;
  background: var(--paper);
}
.pa-hkb-acc > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  cursor: pointer;
  list-style: none;
}
.pa-hkb-acc > summary::-webkit-details-marker { display: none; }
.pa-hkb-acc > summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--brand-darker);
  border-bottom: 2px solid var(--brand-darker);
  transform: rotate(-45deg);
  transition: transform .15s ease;
  margin-left: 2px;
  flex-shrink: 0;
}
.pa-hkb-acc[open] > summary::before { transform: rotate(45deg); }
.pa-hkb-acc > summary span { font-family: var(--font-mono); color: var(--brand-darker); font-weight: 800; }
.pa-hkb-acc > summary strong { min-width: 0; flex: 1; font-size: var(--fs-sm); color: var(--ink); }
.pa-hkb-acc > summary em {
  min-width: 28px;
  text-align: center;
  font-style: normal;
  color: var(--ink-quiet);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}
.pa-hkb-acc > ul { padding: 0 0 var(--space-3) 24px; }
.pa-hkb-path {
  --bg-warm: var(--paper);
  margin: 4px 0 var(--space-4) 24px;
  padding-right: var(--space-3);
}
.pa-hkb-path::before,
.hk-pa-flow::before {
  border-left-color: var(--st-deep, var(--brand-dark));
  opacity: .45;
}
.pa-path-node {
  padding: 6px 0;
  opacity: 0;
  animation: tile-in .35s ease-out forwards;
  animation-delay: var(--node-delay, 0ms);
}
.pa-path-node .pa-pfad-circle {
  width: 44px;
  height: 44px;
  background: var(--paper);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.pa-path-node:hover .pa-pfad-circle {
  background: var(--st-color, var(--water-soft));
}
.pa-path-node .pfadnode-title {
  font-size: var(--fs-md);
  font-weight: 600;
}
.pa-path-node .pfadnode-thema {
  color: #235a6b;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.pa-node-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  color: #235a6b;
}
.pa-matrix-shell { margin-top: var(--space-4); }
.pa-matrix-teaser {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  text-align: left;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-left: 4px solid #4c7a8a;
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--ink);
  cursor: pointer;
}
.pa-matrix-teaser[hidden] { display: none; }
.pa-matrix-teaser:hover { border-color: #4c7a8a; box-shadow: var(--shadow-1); }
.pa-matrix-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(76, 122, 138, .12);
  color: #235a6b;
}
.pa-matrix-teaser strong { display: block; font-size: var(--fs-md); }
.pa-matrix-teaser small { display: block; margin-top: 2px; color: var(--ink-quiet); font-size: var(--fs-xs); line-height: 1.3; }
.pa-matrix-count {
  font-family: var(--font-mono);
  font-weight: 800;
  color: #235a6b;
  background: rgba(76, 122, 138, .12);
  border-radius: 999px;
  padding: 5px 9px;
}
.pa-matrix-full[hidden] { display: none; }
.pa-panel.is-pa-matrix-open .pa-panel-head,
.pa-panel.is-pa-matrix-open #pa-resources,
.pa-panel.is-pa-matrix-open .pa-control-row,
.pa-panel.is-pa-matrix-open #pa-results,
.pa-panel.is-pa-matrix-open #pa-hkb { display: none; }
.pa-back {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-bottom: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
}
.pa-back:hover { border-color: var(--ink-soft); color: var(--ink); }
.pa-matrix-hero {
  margin-bottom: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}
.pa-matrix-hero h2 { margin: 0 0 3px; color: #fff; font-size: var(--fs-2xl); }
.pa-matrix-hero p { margin: 0; color: rgba(255, 255, 255, .72); }
.pa-sem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.pa-sem-card {
  padding: var(--space-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--paper);
}
.pa-sem-num {
  display: inline-flex;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--ink);
}
.pa-sem-card p {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 0;
}
.pa-sem-card a {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pa-sem-empty { color: var(--ink-quiet); }
.pa-phase-dot {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
}
.pa-phase-dot-practice { background: rgba(76, 122, 138, .14); color: #235a6b; }
.pa-phase-dot-independent { background: rgba(86, 125, 54, .16); color: #355b24; }
@media (max-width: 620px) {
  .pa-matrix-teaser {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .pa-matrix-count {
    grid-column: 2;
    justify-self: flex-start;
  }
  .pa-matrix-hero h2 {
    font-size: var(--fs-xl);
  }
}
.hk-row-simple {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.hk-row-simple:hover {
  background: transparent;
  border-color: transparent;
}
.hk-row-mainline {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  color: inherit;
  text-decoration: none;
}
.hk-pa-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 0 var(--space-4) var(--space-2) calc(var(--space-4) + 56px);
}
.hk-pa-strip + .hk-pa-strip { padding-bottom: var(--space-3); }
.hk-pa-strip > span {
  color: var(--ink-quiet);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 800;
}
.hk-pa-strip em {
  color: var(--ink-quiet);
  font-size: var(--fs-sm);
  font-style: normal;
}
.hk-pa-link,
.hk-la-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  text-decoration: none;
}
.hk-pa-link strong,
.hk-la-link strong {
  font-family: var(--font-mono);
  color: var(--brand-darker);
  font-size: var(--fs-xs);
}
.hk-la-link strong { color: var(--ink-soft); }
.hk-pa-link:hover span,
.hk-la-link:hover span {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hk-link-columns,
.hk-weg-expand {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
  padding: 0 var(--space-4) var(--space-4) calc(var(--space-4) + 56px);
}
.hk-weg-expand {
  --bg-warm: var(--paper);
}
.hk-path-col {
  min-width: 0;
}
.hk-path-col > .hk-link-heading,
.hk-pa-side > .hk-link-heading {
  display: none;
}
.hk-link-col {
  min-width: 0;
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-2);
}
.hk-link-heading {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-quiet);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hk-link-list {
  display: flex;
  flex-direction: column;
}
.hk-link-list em {
  color: var(--ink-quiet);
  font-size: var(--fs-sm);
  font-style: normal;
  min-height: 34px;
  display: flex;
  align-items: center;
}
.hk-auf-flow { --bg-warm: var(--paper); }
.hk-auf-flow:has(em)::before { display: none; }
.hk-auf-flow em {
  color: var(--ink-quiet);
  font-size: var(--fs-sm);
  font-style: normal;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.hk-pa-flow {
  --bg-warm: var(--paper);
}
.hk-pa-flow .pa-pfad-circle {
  width: 44px;
  height: 44px;
}
.hk-pa-flow .pfadnode-thema {
  color: var(--brand-darker);
}
.hk-auf-node {
  padding: 6px 0;
  opacity: 0;
  animation: tile-in .35s ease-out forwards;
  animation-delay: var(--node-delay, 0ms);
}
.hk-auf-node .pfadnode-circle {
  width: 44px;
  height: 44px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.hk-auf-node .pfadnode-title {
  font-size: var(--fs-md);
  font-weight: 600;
}
.hk-auf-node .pfadnode-thema {
  font-size: var(--fs-xs);
  font-weight: 400;
}
.hk-auf-path {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hk-auf-path::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 21px;
  bottom: 21px;
  border-left: 2px dashed color-mix(in srgb, var(--st-deep, var(--brand-dark)) 46%, transparent);
}
.hk-auf-path:has(em)::before { display: none; }
.hk-auf-path em {
  color: var(--ink-quiet);
  font-size: var(--fs-sm);
  font-style: normal;
  min-height: 34px;
  display: flex;
  align-items: center;
}
.hk-pfadnode {
  position: relative;
  z-index: 1;
  min-height: 44px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.hk-pfadnode:hover { text-decoration: none; }
.hk-pfad-circle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--st-deep, var(--brand-dark));
  background: var(--paper);
  color: var(--st-deep, var(--brand-dark));
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 800;
  box-shadow: 0 0 0 4px var(--bg-soft);
  transition: background .15s, color .15s, transform .12s;
}
.hk-pfadnode:hover .hk-pfad-circle {
  background: var(--st-deep, var(--brand-dark));
  color: #fff;
  transform: scale(1.04);
}
.hk-pfad-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.hk-pfad-copy strong {
  color: var(--ink);
  font-size: var(--fs-sm);
  line-height: 1.25;
}
.hk-pfad-copy small {
  color: var(--ink-quiet);
  font-size: var(--fs-2xs);
  font-weight: 700;
}
.hk-link-col:last-child {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.hk-link-col:last-child .hk-link-heading { margin-bottom: 6px; }
.hk-link-col:last-child .pa-text-link {
  min-height: 38px;
  padding: 6px 0;
}
.hk-link-col:has(.hk-pa-card) {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.hk-link-col:has(.hk-pa-card) > .hk-link-heading {
  display: none;
}
.hk-pa-card {
  border-top-color: var(--brand);
}
.hk-pa-card .weg-card-head svg {
  color: var(--brand-dark);
}
.hk-pa-card-list .pruef-link {
  min-height: 40px;
}
.hk-pa-card-list .pruef-lz {
  color: var(--ink-quiet);
}
@media (max-width: 760px) {
  .pa-control-row { grid-template-columns: 1fr; }
  .pa-resource-list a,
  .pa-text-link { min-height: 44px; }
  .pa-text-link { align-items: flex-start; flex-direction: column; gap: 2px; }
  .pa-matrix-details > summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 9px 0;
  }
  .hk-row-mainline {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: var(--space-3);
  }
  .hk-row-mainline .count {
    grid-column: 2;
    justify-self: start;
  }
  .hk-pa-strip {
    padding: 0 var(--space-3) var(--space-3) calc(var(--space-3) + 52px);
  }
  .hk-pa-link,
  .hk-la-link {
    min-height: 38px;
  }
  .hk-link-columns,
  .hk-weg-expand {
    grid-template-columns: 1fr;
    gap: var(--space-2);
    padding: 0 var(--space-3) var(--space-3) calc(var(--space-3) + 52px);
  }
  .hk-link-col:last-child {
    margin-top: 2px;
  }
  .hk-pfadnode {
    min-height: 46px;
  }
}
