/* ============================================================
   KKG Projektlernen — Design-System
   Markenfarbe: Indigo→Violett, Akzente Coral/Amber/Teal
   ============================================================ */
:root {
  --brand-1: #5145e0;        /* Indigo */
  --brand-2: #8b3df5;        /* Violett */
  --brand-grad: linear-gradient(135deg, #5145e0 0%, #8b3df5 100%);
  --brand-soft: #eceafe;     /* heller Indigo-Tint */
  --brand-soft-2: #f4f0ff;
  --accent: #ff5d8f;         /* Coral/Pink Akzent */
  --amber: #f5a623;
  --teal: #14b8a6;

  --ink: #1c2030;            /* Haupttext, fast-schwarz mit Blaustich */
  --ink-soft: #4a5063;
  --muted: #8a90a2;
  --bg: #f3f4fb;             /* kühler Hintergrund */
  --surface: #ffffff;
  --surface-2: #fafaff;
  --line: #e8e9f4;
  --line-strong: #d6d8ea;

  --green: #15a86a;  --green-bg: #e6f7ef;
  --red:   #ec4040;  --red-bg:   #fdebeb;
  --amber-bg: #fdf3e0;

  --shadow-sm: 0 1px 2px rgba(28,32,48,.05);
  --shadow: 0 2px 4px rgba(28,32,48,.04), 0 8px 24px rgba(40,30,90,.07);
  --shadow-lg: 0 12px 40px rgba(40,30,90,.16);
  --radius: 16px;
  --radius-sm: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); line-height: 1.55; font-size: 15px;
  background:
    radial-gradient(1200px 480px at 85% -8%, rgba(139,61,245,.10), transparent 60%),
    radial-gradient(900px 420px at -5% 0%, rgba(81,69,224,.10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* ── Topbar ─────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.78); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); padding: 11px 20px;
  position: sticky; top: 0; z-index: 30;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand .logo {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 3px; overflow: hidden; flex: none;
}
.brand .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.06; }
.brand-text b { font-weight: 800; font-size: 16.5px; letter-spacing: -.2px;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-text > span { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .3px; }
.topnav { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.topnav a {
  color: var(--ink-soft); text-decoration: none; padding: 8px 14px; border-radius: 10px;
  font-weight: 600; font-size: 14px; transition: all .15s;
}
.topnav a:hover { background: var(--brand-soft); color: var(--brand-1); }
.topnav a.active { background: var(--brand-grad); color: #fff; box-shadow: 0 3px 10px rgba(81,69,224,.35); }
.account { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.who { color: var(--muted); font-size: 12px; }
.logout { font-size: 13px; }
.tabbar { display: none; }

.container { max-width: 1000px; margin: 0 auto; padding: 28px 20px 90px; }
h1 { font-size: 28px; letter-spacing: -.6px; margin: 6px 0 2px; font-weight: 800; }
h2 { font-size: 18px; margin: 0 0 4px; letter-spacing: -.2px; font-weight: 700; }
h3 { font-size: 14px; margin: 16px 0 6px; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 16px; }
a { color: var(--brand-1); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.head-actions { display: flex; align-items: center; gap: 10px; }

/* ── Cards / forms ──────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 18px 0; box-shadow: var(--shadow); position: relative;
}
/* dezenter Farbakzent oben links an Karten */
.card > h2:first-child { padding-left: 14px; position: relative; }
.card > h2:first-child::before {
  content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 5px; border-radius: 3px;
  background: var(--brand-grad);
}
.card.narrow { max-width: 440px; margin: 7vh auto; box-shadow: var(--shadow-lg); }
.login-logo { display: block; width: 200px; max-width: 70%; height: auto; margin: 0 auto 6px; }
.login-sub { text-align: center; margin: 0 0 18px; color: var(--brand-1); font-weight: 700; font-size: 13px; letter-spacing: .3px; }
.card.narrow h1 { text-align: center; }

label { display: block; margin: 12px 0; font-weight: 600; }
.inline-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--muted); }
input[type=email], input[type=text], input[type=number], select {
  display: block; width: 100%; max-width: 340px; padding: 12px 14px; margin-top: 6px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 16px; font-weight: 400;
  background: var(--surface-2); color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus { outline: none; border-color: var(--brand-1); background: #fff;
  box-shadow: 0 0 0 4px rgba(81,69,224,.14); }
.inline-label select { width: auto; margin-top: 0; }
.code-input { letter-spacing: 12px; font-size: 28px; text-align: center; font-weight: 800; color: var(--brand-1); }
.time { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); }
.time input { width: 78px; display: inline-block; }
.row { display: flex; gap: 22px; flex-wrap: wrap; }

button {
  background: var(--brand-grad); color: #fff; border: 0; border-radius: var(--radius-sm);
  padding: 13px 22px; font-size: 15px; font-weight: 700; cursor: pointer; letter-spacing: .2px;
  box-shadow: 0 4px 14px rgba(81,69,224,.32); transition: transform .06s, box-shadow .15s, filter .15s;
}
button:hover { filter: brightness(1.05); box-shadow: 0 6px 20px rgba(81,69,224,.42); }
button:active { transform: translateY(1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px; padding: 12px 18px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; font-weight: 700; background: #fff;
  transition: all .15s;
}
.btn-secondary:hover { border-color: var(--brand-1); color: var(--brand-1); box-shadow: var(--shadow-sm); }
.link { background: none; color: var(--brand-1); padding: 0; font-weight: 700; box-shadow: none; }
.link:hover { box-shadow: none; filter: none; text-decoration: underline; }
.inline { display: inline; }

.checklist { display: grid; gap: 6px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .checklist { grid-template-columns: 1fr 1fr; } }
.check {
  display: flex; align-items: center; gap: 11px; font-weight: 500; margin: 0;
  padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid transparent; transition: all .12s; cursor: pointer;
}
.check:hover { background: var(--brand-soft-2); border-color: var(--line); }
.check input { width: auto; accent-color: var(--brand-1); transform: scale(1.25); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 16px 0; font-weight: 600; border: 1px solid transparent; }
.alert.info { background: var(--green-bg); color: var(--green); border-color: #c7ecd9; }
.alert.error { background: var(--red-bg); color: var(--red); border-color: #f6d2d2; }
.tag {
  display: inline-block; background: var(--brand-soft); color: var(--brand-1);
  font-size: 11.5px; padding: 3px 10px; border-radius: 20px; margin-left: 6px; font-weight: 700;
}
.tag.green { background: var(--green-bg); color: var(--green); }
code { background: var(--brand-soft); color: var(--brand-1); padding: 2px 7px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 28px; }
ul { margin: 6px 0; padding-left: 20px; } li { margin: 4px 0; }

/* ── Gantt ──────────────────────────────────────── */
.gantt-legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-soft); font-size: 13px; margin: 12px 2px; align-items: center; font-weight: 600; }
.gantt-legend i.dot { display: inline-block; width: 13px; height: 13px; border-radius: 4px; background: var(--brand-1); vertical-align: -2px; margin-right: 5px; }
.gantt-legend i.dot.running { background: var(--green); }
.gantt-legend i.today-key { display: inline-block; width: 3px; height: 14px; background: var(--red); vertical-align: -2px; margin-right: 6px; border-radius: 2px; }

.gantt-ruler { display: none; }

.gantt-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.gantt { min-width: 720px; }
.gantt-row { display: flex; align-items: stretch; border-bottom: 1px solid #f1f2f8; min-height: 36px; }
.gantt-row:last-child { border-bottom: 0; }
.gantt-label {
  flex: 0 0 210px; width: 210px; padding: 7px 14px; font-size: 13px;
  border-right: 1px solid var(--line); display: flex; align-items: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 2;
}
.gantt-track { position: relative; flex: 1 1 auto; display: flex; }
.gantt-week { flex: 1 1 0; border-right: 1px dashed #eceef6; min-width: 56px; }
.gantt-week:last-child { border-right: 0; }

.gantt-head { background: linear-gradient(180deg, #f7f6ff, #f3f2fc); position: sticky; top: 0; z-index: 5; border-bottom: 1.5px solid var(--line-strong); }
.gantt-head .gantt-label { background: #f6f5ff; font-weight: 800; color: var(--brand-1); }
.gantt-head .gantt-week { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 6px 2px; }
.gantt-head .kw { font-size: 11px; font-weight: 800; color: var(--ink); }
.gantt-head .wd { font-size: 10px; color: var(--muted); }

.gantt-project { background: var(--brand-soft-2); }
.gantt-project .gantt-label { background: var(--brand-soft-2); }
.gantt-project .gantt-label strong { font-size: 13.5px; color: var(--brand-1); }

.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 6; pointer-events: none; box-shadow: 0 0 0 1px rgba(236,64,64,.12); }
.gantt-today::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.gantt-head .gantt-today { z-index: 7; }
.today-flag {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; font-size: 9px; font-weight: 800;
  padding: 2px 7px; border-radius: 0 0 7px 7px; white-space: nowrap; letter-spacing: .3px;
  box-shadow: 0 2px 6px rgba(236,64,64,.4);
}

.gantt-bar {
  position: absolute; top: 6px; height: 23px; border-radius: 8px;
  background-image: linear-gradient(180deg, rgba(255,255,255,.22), rgba(0,0,0,.10));
  background-color: var(--c);
  box-shadow: 0 2px 6px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.3);
  display: flex; align-items: center; overflow: hidden; z-index: 4; cursor: default; min-width: 6px;
}
.gantt-bar.is-running { box-shadow: 0 0 0 2px rgba(21,168,106,.6), 0 2px 6px rgba(0,0,0,.16); }
.gantt-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.gantt-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.gantt-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.30); }
.gantt-bar-text {
  position: relative; z-index: 1; color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 0 9px; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.gantt-msg { padding: 8px 14px; font-size: 13px; }
.gantt-msg.error { color: var(--red); }
.weeks-select { margin: 0; }
.gantt-name { display: inline-flex; align-items: center; gap: 6px; }
.gantt-dates { display: none; }
.run-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; box-shadow: 0 0 0 3px rgba(21,168,106,.15); }

/* ── Landing (öffentlich) ───────────────────────── */
.landing { max-width: 680px; margin: 4vh auto; text-align: center; padding: 0 8px; }
.landing-logo { width: 240px; max-width: 72%; height: auto; margin: 0 auto 18px; display: block; }
.landing h1 { font-size: 30px; margin: 4px 0; }
.lead { font-size: 17px; color: var(--ink-soft); max-width: 520px; margin: 6px auto 26px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 30px; text-align: left; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.feature .fi { font-size: 26px; display: block; margin-bottom: 8px; }
.feature b { display: block; margin-bottom: 4px; font-size: 15px; }
.feature p { margin: 0; }
.cta {
  display: inline-block; background: var(--brand-grad); color: #fff; text-decoration: none;
  padding: 16px 34px; border-radius: 12px; font-weight: 800; font-size: 17px;
  box-shadow: 0 8px 24px rgba(81,69,224,.4); transition: filter .15s, transform .06s;
}
.cta:hover { filter: brightness(1.05); }
.cta:active { transform: translateY(1px); }
.landing .cta + .small { margin-top: 14px; }

/* ── Home (eingeloggt) ──────────────────────────── */
.hero h1 { margin-bottom: 0; }
.hero .lead { text-align: left; margin: 2px 0 0; }
.purpose { margin: 14px 0 18px; max-width: 640px; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; }
.stat-num { font-size: 34px; font-weight: 800; line-height: 1;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-num.stat-ok { background: none; color: var(--green); }
.stat-num.stat-off { background: none; color: var(--amber); }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.quick-card {
  display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  box-shadow: var(--shadow); transition: transform .08s, box-shadow .15s, border-color .15s;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand-1); }
.quick-card .qi { display: inline-flex; color: var(--brand-1); margin-bottom: 2px; }
.quick-card .qi svg { width: 26px; height: 26px; }
.quick-card b { font-size: 15.5px; }

/* ── Profil-Rollenwahl ──────────────────────────── */
.role-choice { display: flex; gap: 10px; margin: 4px 0 8px; }
.role-choice .check { flex: 1 1 0; border: 1.5px solid var(--line-strong); justify-content: center; font-weight: 700; }
.role-choice .check:has(input:checked) { border-color: var(--brand-1); background: var(--brand-soft); color: var(--brand-1); }

/* ── Admin-Nutzerübersicht ──────────────────────── */
.user-list { display: grid; gap: 12px; }
.user-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.uc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uc-id { font-weight: 800; color: var(--muted); font-size: 13px; }
.uc-head strong { font-size: 15px; }
.uc-meta { color: var(--ink-soft); font-size: 13px; margin-top: 5px; }
.uc-status { margin-top: 9px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uc-err { margin-top: 6px; color: var(--red); font-size: 12px; background: var(--red-bg); padding: 6px 9px; border-radius: 7px; width: 100%; }
.badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 11px; border-radius: 20px; }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.err { background: var(--red-bg); color: var(--red); }
.badge.none { background: #eef0f4; color: var(--muted); }

/* ============================================================
   MOBILE (Hauptaugenmerk)
   ============================================================ */
@media (max-width: 719px) {
  body { font-size: 15px; padding-bottom: 70px; }
  .topbar { padding: 10px 16px; }
  .topnav { display: none; }
  .who { display: none; }
  .account { margin-left: auto; }
  .container { padding: 20px 15px 26px; }
  h1 { font-size: 23px; }

  button { width: 100%; padding: 15px 18px; font-size: 16px; }
  .topbar button.link, .weeks-select button { width: auto; }
  .btn-secondary { display: flex; justify-content: center; margin: 10px 0 0; }
  input[type=email], input[type=text], select { max-width: 100%; }
  .checklist { grid-template-columns: 1fr; }
  .check { padding: 13px 13px; }
  /* Startseiten-Raster einspaltig auf dem Handy */
  .features, .quick { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr; }
  .landing { margin-top: 2vh; }
  .landing h1 { font-size: 26px; }
  .lead { font-size: 16px; }
  .role-choice { flex-direction: column; }
  .page-head { align-items: stretch; }
  .head-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .weeks-select { width: 100%; }
  .weeks-select select { width: 100%; max-width: 100%; }

  /* Bottom-Tab-Leiste */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255,255,255,.94); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(40,30,90,.08);
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    text-decoration: none; color: var(--muted); font-size: 10.5px; font-weight: 700;
    padding: 5px 2px; border-radius: 12px; transition: all .15s;
  }
  .tabbar a .ti { display: inline-flex; align-items: center; justify-content: center; height: 24px; }
  .tabbar a .ti svg { width: 23px; height: 23px; display: block; }
  .tabbar a.active { color: var(--brand-1); background: var(--brand-soft); }
  .tabbar a.active .ti svg { stroke-width: 2.3; }

  /* Gantt → gestapelte Karten */
  .gantt-scroll { overflow-x: visible; border: 0; background: transparent; box-shadow: none; }
  .gantt { min-width: 0; }
  .gantt-head { display: none; }
  .gantt-row { flex-direction: column; align-items: stretch; border-bottom: 0; min-height: 0; }
  .gantt-project { background: transparent; margin: 20px 0 6px; }
  .gantt-project .gantt-label {
    position: static; width: auto; flex: none; border: 0; padding: 0 2px 2px;
    background: transparent; white-space: normal;
  }
  .gantt-project .gantt-label strong { font-size: 12px; color: var(--brand-1); text-transform: uppercase; letter-spacing: .6px; }
  .gantt-project .gantt-track { display: none; }

  .gantt-task {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    padding: 12px 0; margin: 9px 0; box-shadow: var(--shadow);
  }
  .gantt-task.row-running { box-shadow: inset 4px 0 0 var(--green), var(--shadow); }
  .gantt-task .gantt-label {
    position: static; width: auto; flex: none; border: 0; padding: 0 14px;
    background: transparent; white-space: normal; display: flex;
    flex-direction: column; align-items: flex-start; gap: 3px;
  }
  .gantt-name { font-size: 15px; font-weight: 700; color: var(--ink); }
  .gantt-dates { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
  .gantt-task .gantt-track { height: 22px; min-height: 22px; margin: 10px 14px 2px; background: #eef0f7; border-radius: 7px; overflow: hidden; }
  .gantt-task .gantt-week { border-right: 1px solid #e4e7f0; }
  .gantt-bar { top: 0; height: 22px; border-radius: 7px; }
  .gantt-bar-text { display: none; }
  .gantt-task .gantt-today { width: 2.5px; z-index: 8; box-shadow: 0 0 0 2px rgba(236,64,64,.2); }
  .gantt-task .gantt-today::after { display: none; }

  /* allgemeiner Reset: keine Labels mit Desktop-Breite/-Hintergrund auf Mobil
     (verhindert die große weiße „keine Aufgaben"-Box) */
  .gantt-label { position: static; width: auto; flex: none; border-right: 0; white-space: normal; background: transparent; }

  /* leere/fehler Zeilen kompakt als dezenter Hinweis statt Box */
  .gantt-empty, .gantt-row.gantt-err { background: transparent; padding: 0; }
  .gantt-empty .gantt-track, .gantt-row.gantt-err .gantt-track { display: none; }
  .gantt-empty .gantt-label { padding: 0 4px 4px; color: var(--muted); font-size: 13px; font-style: italic; }

  /* Sticky Skala mit Heute-Fähnchen — als eigene Header-Leiste unter der Topbar */
  .gantt-ruler {
    display: block; position: sticky; top: 54px; z-index: 15;
    height: 52px; margin: 12px 14px 14px; overflow: visible;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm);
  }
  .ruler-weeks { display: flex; height: 100%; }
  /* KW-Beschriftung nach OBEN, damit sie frei lesbar bleibt */
  .ruler-weeks .rw {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    border-left: 1px solid #eef0f6; padding-top: 5px; line-height: 1.15; overflow: hidden;
  }
  .ruler-weeks .rw:first-child { border-left: 0; }
  .ruler-weeks .rw b { font-size: 10px; color: var(--ink); font-weight: 800; }
  .ruler-weeks .rw i { font-style: normal; font-size: 8.5px; color: var(--muted); }
  /* Linie + Fähnchen sitzen im UNTEREN Bereich (unter den Datumsangaben) */
  .ruler-today { position: absolute; top: 30px; bottom: -4px; width: 2.5px; background: var(--red); z-index: 2; border-radius: 2px; }
  .ruler-today::after { content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 1px 4px rgba(236,64,64,.5); }
  .ruler-flag {
    position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
    background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
    padding: 2px 9px; border-radius: 7px; white-space: nowrap; letter-spacing: .3px;
    box-shadow: 0 2px 8px rgba(236,64,64,.45); z-index: 3;
  }
  /* Fähnchen am Rand nicht abschneiden lassen */
  .ruler-flag.edge-l { left: 0; transform: none; }
  .ruler-flag.edge-r { left: auto; right: 0; transform: none; }

  .gantt-legend { font-size: 12px; gap: 14px; }
}
