/* Fahrwasser Projektboard – Farben und Formen nach fahrwasser-website/Brand-Design-Fahrwasser-KI.md (immer hell) */
@font-face {
  font-family: "Raleway"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/raleway-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Raleway"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/raleway-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --petrol: #2F4858; --blau: #33658A; --gelb: #FDE7A6; --gold: #D9B24A; --hellblau: #6FA3C8;
  --leinen: #F9F8F4; --flaeche: #FFFFFF; --text: #1B2C36; --gedaempft: #56697A; --linie: #E6E3DB; --toenung: #EEF1F0;
  --auf-dunkel: #F2F5F7; --auf-dunkel-gedaempft: #B5C6D2; --petrol-flaeche: #243A48;
  --gefahr: #B4432F;
  --schatten: 0 30px 60px -30px rgba(0, 0, 0, .55);
  --schatten-klein: 0 1px 2px rgba(27, 44, 54, .06), 0 4px 12px -6px rgba(27, 44, 54, .18);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--leinen); color: var(--text);
  font: 16px/1.6 "Raleway", system-ui, sans-serif; font-variant-numeric: lining-nums;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blau); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 11px 22px; font-weight: 600; line-height: 1.2;
  background: var(--gelb); color: var(--text); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(47, 72, 88, .55); }
.btn svg { transition: transform .15s ease; }
.btn:hover svg.pfeil { transform: translateX(3px); }
.btn.zweit { background: transparent; box-shadow: inset 0 0 0 1px var(--linie); }
.btn.zweit:hover { background: var(--flaeche); box-shadow: inset 0 0 0 1px var(--gedaempft); transform: none; }
.btn.gefahr { background: transparent; color: var(--gefahr); box-shadow: inset 0 0 0 1px rgba(180, 67, 47, .35); }
.btn.gefahr:hover { background: rgba(180, 67, 47, .07); transform: none; }
.btn.klein { padding: 7px 14px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.icon-btn {
  width: 34px; height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--gedaempft);
  display: inline-grid; place-items: center; flex: none;
}
.icon-btn:hover { background: var(--toenung); color: var(--text); }

/* ---------- Eingaben ---------- */
.feld { display: block; margin-bottom: 18px; }
.feld > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.feld small { display: block; color: var(--gedaempft); font-size: 13px; margin-top: 4px; }
input[type=text], input[type=password], textarea, select {
  width: 100%; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px;
  padding: 10px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(253, 231, 166, .7); }
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }

.eyebrow {
  font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--blau); margin: 0;
}
.fehler { color: var(--gefahr); font-size: 14px; min-height: 1.4em; margin: 0 0 10px; }

/* ---------- Kopfleiste ---------- */
.kopf {
  position: sticky; top: 0; z-index: 20; height: 64px;
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  background: rgba(47, 72, 88, .96); color: var(--auf-dunkel);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.marke { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex: none; }
.marke b { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.marke small { font-size: 10.5px; letter-spacing: .14em; color: var(--auf-dunkel-gedaempft); font-weight: 500; }
.kopf-titel { flex: 1; min-width: 0; padding-left: 16px; border-left: 1px solid rgba(181, 198, 210, .25); }
.kopf-titel .eyebrow { color: var(--auf-dunkel-gedaempft); font-size: 11px; line-height: 1.3; }
.kopf-titel h1 { margin: 0; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.kopf-rechts { display: flex; align-items: center; gap: 10px; flex: none; }
.kopf .icon-btn { color: var(--auf-dunkel-gedaempft); }
.kopf .icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--auf-dunkel); }
.ich {
  display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--auf-dunkel);
  padding: 4px 10px 4px 4px; border-radius: 999px; font-size: 14px;
}
.ich:hover { background: rgba(255, 255, 255, .08); }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--gedaempft); flex: none; }
.live.an { background: #7BC59A; box-shadow: 0 0 0 3px rgba(123, 197, 154, .2); }
.kopf a.zurueck { color: var(--auf-dunkel-gedaempft); font-size: 14px; text-decoration: none; }
.kopf a.zurueck:hover { color: var(--auf-dunkel); }

/* Personen-Kürzel */
.kuerzel {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; background: var(--blau); color: #fff;
}
.kuerzel.f1 { background: var(--petrol); }
.kuerzel.f2 { background: #4E7F6A; }
.kuerzel.f3 { background: #8A6A2E; }
.kuerzel.f4 { background: #6C5B7B; }
.kuerzel.f5 { background: #A0553F; }
.kopf .kuerzel { background: var(--gelb); color: var(--text); }

/* ---------- Board ---------- */
.board {
  height: calc(100vh - 64px); height: calc(100dvh - 64px);
  display: flex; align-items: flex-start; gap: 16px; padding: 20px 20px 24px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
}
.spalte {
  flex: 0 0 296px; max-height: 100%; display: flex; flex-direction: column;
  background: var(--toenung); border-radius: 18px; padding: 8px;
}
.spalte-kopf { display: flex; align-items: center; gap: 4px; padding: 6px 4px 8px 10px; }
.spalte-titel {
  flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.005em;
  border: 0; background: transparent; padding: 4px 6px; margin-left: -6px; border-radius: 8px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text;
}
.spalte-titel:hover { background: rgba(255, 255, 255, .6); }
input.spalte-titel { cursor: text; background: var(--flaeche); border: 1px solid var(--gold); padding: 3px 6px; }
.anzahl { font-size: 13px; color: var(--gedaempft); font-weight: 600; padding: 0 4px; }
.karten { flex: 1; min-height: 12px; overflow-y: auto; padding: 2px 2px 4px; display: flex; flex-direction: column; gap: 8px; }

.karte {
  position: relative; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px;
  padding: 12px 14px; box-shadow: var(--schatten-klein); cursor: pointer; user-select: none;
  -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  transition: border-color .15s, box-shadow .15s;
}
.karte:hover { border-color: #D3CEC2; }
.karte:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.karte .vorschau {
  display: block; width: calc(100% + 28px); margin: -12px -14px 10px; height: 132px; object-fit: cover;
  border-radius: 13px 13px 0 0; background: var(--toenung);
}
.karte h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.karte .meta { display: flex; align-items: center; gap: 12px; margin-top: 10px; color: var(--gedaempft); font-size: 13px; }
.karte .meta:empty { display: none; }
.karte .meta span { display: inline-flex; align-items: center; gap: 4px; }
.karte .meta .kuerzel { margin-left: auto; width: 26px; height: 26px; font-size: 11px; }
.karte.platzhalter { background: transparent; border: 2px dashed var(--hellblau); box-shadow: none; }
.karte.platzhalter > * { visibility: hidden; }
.karte.geist {
  position: fixed; z-index: 100; pointer-events: none; margin: 0; transform: rotate(2.5deg);
  box-shadow: var(--schatten); border-color: var(--gold);
}
body.zieht, body.zieht * { cursor: grabbing !important; }

.neu-karte { margin-top: 6px; }
.neu-karte-knopf {
  width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--gedaempft);
  padding: 9px 10px; border-radius: 12px; font-weight: 600; font-size: 14px; text-align: left;
}
.neu-karte-knopf:hover { background: rgba(255, 255, 255, .7); color: var(--text); }
.neu-karte form { display: flex; flex-direction: column; gap: 8px; }
.neu-karte textarea { min-height: 64px; resize: none; border-radius: 12px; }
.neu-karte .reihe { display: flex; gap: 8px; align-items: center; }

.spalte-neu { flex: 0 0 296px; }
.spalte-neu > button {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-radius: 18px; font-weight: 600;
  border: 1.5px dashed #D3CEC2; background: transparent; color: var(--gedaempft);
}
.spalte-neu > button:hover { background: var(--toenung); color: var(--text); border-color: var(--gedaempft); }
.spalte-neu form { background: var(--toenung); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }

/* Menüs */
.menue {
  position: fixed; z-index: 60; min-width: 220px; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 14px; box-shadow: var(--schatten); padding: 6px;
}
.menue button {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; text-align: left;
  padding: 9px 12px; border-radius: 9px; font-size: 14.5px;
}
.menue button:hover:not(:disabled) { background: var(--toenung); }
.menue button:disabled { color: #A7B3BC; cursor: default; }
.menue button.gefahr { color: var(--gefahr); }
.menue hr { border: 0; border-top: 1px solid var(--linie); margin: 6px 4px; }

/* ---------- Dialoge ---------- */
.schleier {
  position: fixed; inset: 0; z-index: 40; background: rgba(27, 44, 54, .45);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 24px; overflow-y: auto;
}
.dialog {
  position: relative; width: 100%; max-width: 760px; background: var(--leinen); border-radius: 22px;
  box-shadow: var(--schatten); padding: 28px 32px 24px;
}
.dialog.schmal { max-width: 440px; }
.dialog-zu { position: absolute; top: 14px; right: 14px; }
.dialog h2 { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.015em; }
.karte-titel {
  width: 100%; border: 1px solid transparent; background: transparent; border-radius: 10px; margin: 2px 0 0 -10px;
  padding: 4px 10px; font-size: 1.45rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; resize: none;
  min-height: 0; overflow: hidden; width: calc(100% - 26px);
}
.karte-titel:hover { background: var(--flaeche); border-color: var(--linie); }
.karte-titel:focus { background: var(--flaeche); }
.karte-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 6px; }
.abschnitt { margin-top: 22px; }
.abschnitt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.abschnitt-kopf h3 { margin: 0; font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.speicherstand { font-size: 13px; color: var(--gedaempft); }

.beschreibung {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; min-height: 64px;
  white-space: pre-wrap; overflow-wrap: anywhere; cursor: text;
}
.beschreibung.leer { color: var(--gedaempft); }
.beschreibung:hover { border-color: #D3CEC2; }

.ablage {
  border: 1.5px dashed #CFD6D8; border-radius: 14px; padding: 16px; text-align: center; color: var(--gedaempft);
  font-size: 14px; background: rgba(255, 255, 255, .55); transition: background .15s, border-color .15s;
}
.ablage.aktiv { background: rgba(253, 231, 166, .35); border-color: var(--gold); color: var(--text); }
.ablage kbd {
  font: 600 12px/1 "Raleway", sans-serif; background: var(--flaeche); border: 1px solid var(--linie); border-bottom-width: 2px;
  border-radius: 6px; padding: 3px 6px; color: var(--text);
}
.ablage .link-knopf { border: 0; background: none; color: var(--blau); font-weight: 600; text-decoration: underline; padding: 0; }
.bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.bild {
  position: relative; border-radius: 12px; overflow: hidden; background: var(--toenung); border: 1px solid var(--linie);
  aspect-ratio: 4 / 3;
}
.bild img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.bild .weg, .datei .weg { position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, .92); width: 30px; height: 30px; }
.bild .weg { opacity: 0; transition: opacity .15s; }
.bild:hover .weg, .bild:focus-within .weg { opacity: 1; }
.dateien { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.datei {
  position: relative; display: flex; align-items: center; gap: 12px; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 12px; padding: 10px 48px 10px 12px; text-decoration: none; color: inherit;
}
.datei .symbol { width: 38px; height: 38px; border-radius: 10px; background: var(--toenung); color: var(--blau); display: grid; place-items: center; flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.datei .name { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.datei .info { font-size: 12.5px; color: var(--gedaempft); }
.datei .weg { top: 50%; transform: translateY(-50%); }
.hochladen-status { font-size: 13.5px; color: var(--gedaempft); margin-top: 8px; }

.dialog-fuss {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--linie); font-size: 13px; color: var(--gedaempft);
}

/* Großansicht für Bilder */
.lightbox {
  position: fixed; inset: 0; z-index: 80; background: rgba(15, 26, 33, .92); display: grid; place-items: center; padding: 24px;
}
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 10px; box-shadow: var(--schatten); }
.lightbox .leiste { position: fixed; top: 14px; right: 16px; display: flex; gap: 8px; }
.lightbox .leiste .btn.zweit { color: var(--auf-dunkel); box-shadow: inset 0 0 0 1px rgba(253, 231, 166, .45); }
.lightbox .leiste .btn.zweit:hover { background: rgba(255, 255, 255, .08); }
.lightbox .bildname { position: fixed; bottom: 16px; left: 0; right: 0; text-align: center; color: var(--auf-dunkel-gedaempft); font-size: 14px; }

/* Hinweise */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90;
  background: var(--petrol); color: var(--auf-dunkel); padding: 11px 20px; border-radius: 999px; font-size: 14.5px;
  box-shadow: var(--schatten); max-width: calc(100vw - 32px);
}
.toast.fehler-toast { background: var(--gefahr); }

/* ---------- Anmelde- und Einzelseiten ---------- */
.seite { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.seite-kopf { background: var(--petrol); color: var(--auf-dunkel); padding: 0 20px; height: 64px; display: flex; align-items: center; }
.welle-band {
  height: 120px; background: var(--petrol); position: relative; overflow: hidden;
}
.welle-band svg { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; }
.seite-inhalt { flex: 1; display: flex; justify-content: center; padding: 0 16px 48px; margin-top: -84px; position: relative; }
.karte-gross {
  width: 100%; max-width: 420px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 22px;
  box-shadow: var(--schatten); padding: 36px 32px 28px; align-self: flex-start;
}
.karte-gross h1 { font-size: 1.85rem; line-height: 1.12; letter-spacing: -.015em; margin: 8px 0 10px; }
.karte-gross p.lead { color: var(--gedaempft); margin: 0 0 24px; }
.karte-gross .btn { width: 100%; padding: 13px 22px; }
.seite-fuss { text-align: center; font-size: 13px; color: var(--gedaempft); padding: 20px 16px 28px; }
.seite-fuss a { color: var(--gedaempft); }

.laden { display: grid; place-items: center; height: calc(100vh - 64px); color: var(--gedaempft); }

/* ---------- Verwaltung ---------- */
.verwaltung { max-width: 1160px; margin: 0 auto; padding: 40px 20px 64px; }
.verwaltung-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.verwaltung-kopf h1 { margin: 6px 0 0; font-size: clamp(1.9rem, 3vw, 2.4rem); line-height: 1.08; letter-spacing: -.015em; }
.board-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.board-karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 18px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--schatten-klein);
}
.board-karte h2 { margin: 0; font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
.board-karte .zahlen { color: var(--gedaempft); font-size: 13.5px; }
.board-karte .aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.leer-hinweis {
  background: var(--toenung); border-radius: 18px; padding: 32px; text-align: center; color: var(--gedaempft);
}
.zugang {
  background: var(--toenung); border-radius: 14px; padding: 14px 16px; margin: 6px 0 16px; font-size: 14.5px;
  border-left: 3px solid var(--gold);
}
.zugang dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.zugang dt { color: var(--gedaempft); }
.zugang dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.zugang code { font: 600 15px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }

/* ---------- Mobil ---------- */
@media (max-width: 720px) {
  .kopf { padding: 0 12px; gap: 10px; }
  .marke small, .marke b { display: none; }
  .kopf-titel { padding-left: 10px; }
  .ich span.name { display: none; }
  .kopf a.zurueck span { display: none; }
  .board { padding: 14px 12px 20px; gap: 12px; scroll-snap-type: x mandatory; scroll-padding: 12px; }
  .spalte, .spalte-neu { flex-basis: min(86vw, 320px); scroll-snap-align: start; }
  .schleier { padding: 0; }
  .dialog { border-radius: 0; min-height: 100%; padding: 22px 16px 20px; }
  .karte-raster { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.dialog-text { color: var(--gedaempft); margin: 8px 0 22px; }
.knopfreihe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
figure.bild { margin: 0; }
.datei-link { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.datei-link:hover .name { color: var(--blau); text-decoration: underline; }
.kopf-titel .eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
