/* Marke: Nachtblau/Schwarz als Fläche, Breakout-Gelb #FDB305 als einziger Akzent (brand-kit/visual.md) */
:root {
  --flaeche: #0b1220;
  --karte: #121b2e;
  --linie: #24304a;
  --text: #e8ecf3;
  --leise: #8f9bb3;
  --gelb: #FDB305;
  --rot: #ff6b6b;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--flaeche); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: var(--gelb); }
button, input, select, textarea { font: inherit; color: inherit; }
button {
  background: var(--gelb); color: #111; border: 0; border-radius: 6px; padding: .5em 1em;
  font-weight: 600; cursor: pointer;
}
button.leise { background: transparent; color: var(--leise); border: 1px solid var(--linie); font-weight: 400; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea {
  background: var(--karte); border: 1px solid var(--linie); border-radius: 6px; padding: .5em .6em; width: 100%;
}
textarea { min-height: 16em; resize: vertical; font-family: inherit; }
label { display: block; color: var(--leise); font-size: .85em; margin: .8em 0 .25em; }

.kopf {
  display: flex; align-items: center; gap: 1em; padding: .6em 16px; border-bottom: 1px solid var(--linie);
  position: sticky; top: 0; background: var(--flaeche); z-index: 2; flex-wrap: wrap;
}
.marke { color: var(--text); text-decoration: none; letter-spacing: .08em; }
.marke b { color: var(--gelb); }
nav { display: flex; gap: .3em; flex: 1; flex-wrap: wrap; }
nav a { color: var(--text); text-decoration: none; padding: .3em .7em; border-radius: 6px; }
nav a.aktiv { background: var(--karte); color: var(--gelb); }
.zahl { background: var(--gelb); color: #111; border-radius: 9px; padding: 0 .45em; font-size: .8em; font-weight: 700; margin-left: .3em; }
.wer { color: var(--leise); }

main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { font-weight: 300; font-size: 1.6em; margin: .2em 0 .6em; }
h2 { font-weight: 400; font-size: 1.15em; margin: 1.2em 0 .5em; }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; padding: 16px; }
.leiste { display: flex; gap: .5em; align-items: center; flex-wrap: wrap; margin-bottom: 1em; }
.leiste input[type=search] { flex: 1; min-width: 10em; width: auto; }
.reiter a { padding: .3em .8em; border-radius: 6px; text-decoration: none; color: var(--text); border: 1px solid var(--linie); }
.reiter a.aktiv { border-color: var(--gelb); color: var(--gelb); }
.hinweis { color: var(--leise); font-size: .9em; }
.fehler { color: var(--rot); }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { border-bottom: 1px solid var(--linie); }
.liste a { display: grid; grid-template-columns: 14em 1fr auto; gap: 1em; padding: .65em .4em; color: var(--text); text-decoration: none; }
.liste a:hover { background: var(--karte); }
.liste .neu { font-weight: 600; }
.liste .neu::before { content: "● "; color: var(--gelb); }
.liste .datum { color: var(--leise); white-space: nowrap; }
.ellipse { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mailkopf dl { display: grid; grid-template-columns: 6em 1fr; gap: .2em 1em; margin: 0 0 1em; }
.mailkopf dt { color: var(--leise); }
.mailkopf dd { margin: 0; overflow-wrap: anywhere; }
pre.mailtext { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; margin: 0; }
.zweispaltig { display: grid; grid-template-columns: 1fr 18em; gap: 16px; align-items: start; }

.chat { display: flex; flex-direction: column; gap: .5em; max-height: 60vh; overflow-y: auto; padding: .5em 0; }
.blase { max-width: 75%; padding: .5em .8em; border-radius: 10px; background: var(--karte); border: 1px solid var(--linie); white-space: pre-wrap; overflow-wrap: anywhere; }
.blase.aus { align-self: flex-end; border-color: var(--gelb); }
.blase small { display: block; color: var(--leise); font-size: .75em; margin-top: .3em; }
.blase.bot { opacity: .65; }

table { border-collapse: collapse; width: 100%; }
td, th { text-align: left; padding: .45em .4em; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { color: var(--leise); font-weight: 400; font-size: .85em; }
code.link { display: block; padding: .6em; background: #000; border-radius: 6px; overflow-wrap: anywhere; margin: .5em 0; }

.anmeldung { max-width: 22em; margin: 12vh auto; }
.meldung {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--karte);
  border: 1px solid var(--gelb); padding: .6em 1em; border-radius: 8px; max-width: calc(100% - 32px); z-index: 5;
}
.meldung.fehler { border-color: var(--rot); color: var(--text); }

.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.foto { background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; color: var(--text); text-decoration: none; }
.foto img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.foto div { padding: .5em .6em; font-size: .85em; }
.foto .vorschlag { color: var(--gelb); }
.marken { display: flex; gap: .3em; flex-wrap: wrap; margin-top: .3em; }
.marken span { border: 1px solid var(--linie); border-radius: 5px; padding: 0 .35em; font-size: .8em; color: var(--leise); }
.marken span.ja { border-color: var(--gelb); color: var(--gelb); }
img.gross { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 6px; }
.knopfreihe { display: flex; gap: .4em; flex-wrap: wrap; align-items: center; }

@media (max-width: 720px) {
  .liste a { grid-template-columns: 1fr auto; }
  .liste a .betreff { grid-column: 1 / -1; }
  .zweispaltig { grid-template-columns: 1fr; }
  .wer { display: none; }
  .blase { max-width: 90%; }
  .raster { grid-template-columns: repeat(2, 1fr); }
}
