/* Ehrenlied: Design-Tokens, Grundgerüst, Buttons, Karten, Formulare. Mobile-first, keine externen Quellen.
   Design „Jazzclub“ (seit 21.09.2026): Samt-Bordeaux, Messing und Gold, Papiercreme für Seiten mit Formularen (Auftrag, Übergabe, Admin, Recht),
   Nacht für die Marketing-Seiten (body.nacht: Startseite, Anlass-Seiten, Wisch-Flow). Schriften selbst gehostet unter /fonts (Limelight, Cormorant Garamond, IBM Plex Sans).
   Die Token-Namen aus der ersten Fassung bleiben, damit die übrigen Stylesheets weiterlaufen: --tiefblau ist jetzt das Samt-Bordeaux. */

:root {
  --creme: #F6F1E7;
  --creme-tief: #EDE5D4;
  --tiefblau: #4A1024;
  --tiefblau-hell: #6B1A36;
  --messing: #C9A961;
  --messing-hell: #E8C983;
  --gold: #E8C983;
  --nacht: #17121A;
  --nacht-hell: #221A26;
  --samt: #4A1024;
  --creme-hell: #F3E3C3;
  --rauch: #8A8290;
  --text: #2A1A1F;
  --text-leise: #6A5A60;
  --weiss: #FFFFFF;
  --linie: #E3D6C2;
  --fehler: #B3402F;
  --fehler-hell: #FBE9E5;
  --ok: #3B7A57;
  --ok-hell: #E6F1EA;

  --schrift: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schrift-display: "Limelight", "Cormorant Garamond", Georgia, serif;
  --schrift-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --schrift-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;

  --a1: 4px;
  --a2: 8px;
  --a3: 12px;
  --a4: 16px;
  --a5: 24px;
  --a6: 32px;
  --a7: 48px;
  --a8: 72px;

  --radius: 14px;
  --radius-klein: 8px;
  --radius-rund: 999px;
  --schatten: 0 1px 2px rgba(31, 42, 68, .06), 0 8px 24px rgba(31, 42, 68, .08);
  --schatten-klein: 0 1px 3px rgba(31, 42, 68, .10);
  --breite: 1040px;
  --breite-text: 680px;
  --dauer: 160ms;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-family: var(--schrift);
  font-size: 100%;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  background: var(--creme);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--tiefblau);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--a4);
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-family: var(--schrift-display); font-weight: 400; letter-spacing: .01em; line-height: 1.05; font-size: clamp(1.9rem, 4.5vw + .5rem, 3rem); }
/* Admin bleibt nüchtern: keine Plakatschrift in Tabellen und Formularen */
body.hell h1 { font-family: var(--schrift); font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.45rem, 2.5vw + .5rem, 2.1rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--a4); }
p.gross { font-size: 1.15rem; color: var(--text-leise); }
.ueberzeile {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--messing);
  margin-bottom: var(--a2);
}
.leise { color: var(--text-leise); }
.klein { font-size: .9rem; }
small { font-size: .875em; }

a { color: var(--tiefblau); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--messing); }

img, video, svg { max-width: 100%; height: auto; display: block; }
audio { width: 100%; }

ul, ol { padding-left: 1.25em; margin: 0 0 var(--a4); }
hr { border: 0; border-top: 1px solid var(--linie); margin: var(--a5) 0; }
code, pre { font-family: var(--schrift-mono); font-size: .9em; }
pre { white-space: pre-wrap; background: var(--weiss); padding: var(--a4); border-radius: var(--radius-klein); }

:focus-visible {
  outline: 3px solid var(--messing);
  outline-offset: 2px;
  border-radius: var(--radius-klein);
}

.sprung {
  position: absolute;
  left: var(--a4);
  top: -100px;
  background: var(--tiefblau);
  color: var(--weiss);
  padding: var(--a2) var(--a4);
  border-radius: var(--radius-klein);
  z-index: 100;
}
.sprung:focus { top: var(--a4); }

.versteckt { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Kopf und Fuß */
.kopf { background: var(--creme); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 40; }
.kopf-innen, .fuss-innen, .inhalt-innen {
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 var(--a4);
}
.kopf-innen { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: var(--a3); }
.wortmarke {
  display: inline-flex;
  align-items: center;
  gap: var(--a2);
  font-family: var(--schrift-display);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: .02em;
  color: var(--tiefblau);
  text-decoration: none;
  min-height: 44px;
}
.wortmarke:hover { color: var(--tiefblau); }
.wortmarke-punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--messing); box-shadow: 0 0 0 3px rgba(201, 169, 97, .22); }
.kopf-nav { display: flex; gap: var(--a2); align-items: center; }

.inhalt { flex: 1; width: 100%; max-width: var(--breite); margin: 0 auto; padding: var(--a5) var(--a4) var(--a7); }
body.schlicht .inhalt { max-width: none; padding: 0; }

.fuss { border-top: 1px solid var(--linie); padding: var(--a5) 0 var(--a6); color: var(--text-leise); font-size: .9rem; }
.fuss-innen { display: flex; flex-direction: column; gap: var(--a3); }
.fuss-hinweis { margin: 0; color: var(--tiefblau); font-family: var(--schrift-serif); font-style: italic; font-weight: 500; font-size: 1.15rem; }
.fuss-links { display: flex; flex-wrap: wrap; gap: 0 var(--a4); }
.fuss-links a { color: var(--text-leise); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.fuss-klein { padding: var(--a3) 0 var(--a4); font-size: .85rem; }
.fuss-klein .fuss-innen { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0 var(--a3); }
.fuss-links a:hover { color: var(--messing); text-decoration: underline; }
.fuss-rechte { margin: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--a2);
  min-height: 46px;
  padding: var(--a2) var(--a5);
  border: 1.5px solid var(--tiefblau);
  border-radius: var(--radius-rund);
  background: var(--weiss);
  color: var(--tiefblau);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dauer), color var(--dauer), border-color var(--dauer), transform var(--dauer), box-shadow var(--dauer);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover { background: var(--creme-tief); color: var(--tiefblau); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primaer { background: var(--tiefblau); color: var(--weiss); border-color: var(--tiefblau); box-shadow: var(--schatten-klein); }
.btn-primaer:hover { background: var(--tiefblau-hell); color: var(--weiss); }
.btn-messing { background: var(--messing); color: var(--weiss); border-color: var(--messing); }
.btn-messing:hover { background: var(--messing-hell); border-color: var(--messing-hell); color: var(--tiefblau); }
.btn-leise { border-color: transparent; background: transparent; }
.btn-leise:hover { background: var(--creme-tief); }
.btn-klein { min-height: 44px; padding: var(--a1) var(--a4); font-size: .95rem; }
.btn-breit { width: 100%; }
.btn-gefahr { border-color: var(--fehler); color: var(--fehler); }
.btn-gefahr:hover { background: var(--fehler-hell); color: var(--fehler); }
.btn-gruppe { display: flex; flex-wrap: wrap; gap: var(--a2); }

/* Karten */
.karte {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: var(--a5);
  box-shadow: var(--schatten);
  border: 1px solid rgba(225, 216, 198, .6);
}
.karte-hervor { border: 2px solid var(--messing); box-shadow: 0 12px 32px rgba(185, 139, 58, .16); }
.karte-leise { background: transparent; box-shadow: none; border: 1px solid var(--linie); }
.karten { display: grid; gap: var(--a4); grid-template-columns: 1fr; }
.karte > :last-child { margin-bottom: 0; }

.abzeichen {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-rund);
  background: var(--creme-tief);
  color: var(--tiefblau);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.6;
}
.abzeichen-messing { background: var(--messing); color: var(--weiss); }
.abzeichen-ok { background: var(--ok-hell); color: var(--ok); }
.abzeichen-fehler { background: var(--fehler-hell); color: var(--fehler); }

/* Hinweise */
.hinweis {
  padding: var(--a3) var(--a4);
  border-radius: var(--radius-klein);
  background: var(--creme-tief);
  border-left: 4px solid var(--messing);
  margin: 0 0 var(--a4);
}
.hinweis-fehler { background: var(--fehler-hell); border-left-color: var(--fehler); color: var(--fehler); }
.hinweis-ok { background: var(--ok-hell); border-left-color: var(--ok); color: var(--ok); }

/* Formulare */
.feld { margin: 0 0 var(--a4); }
.feld label, .feld .label {
  display: block;
  font-weight: 600;
  color: var(--tiefblau);
  margin-bottom: var(--a1);
}
.feld .beschreibung { font-size: .9rem; color: var(--text-leise); margin: 0 0 var(--a2); }
.feld .fehlertext { font-size: .9rem; color: var(--fehler); margin: var(--a1) 0 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], input[type="url"], input[type="search"], input[type="tel"], textarea, select {
  width: 100%;
  min-height: 46px;
  padding: var(--a2) var(--a3);
  border: 1.5px solid var(--linie);
  border-radius: var(--radius-klein);
  background: var(--weiss);
  color: var(--text);
  font: inherit;
  transition: border-color var(--dauer), box-shadow var(--dauer);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--tiefblau); box-shadow: 0 0 0 3px rgba(31, 42, 68, .12); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--fehler); }
input::placeholder, textarea::placeholder { color: #9A968E; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--tiefblau); margin: 0 var(--a2) 0 0; vertical-align: -4px; }
.feld-zeile { display: flex; align-items: flex-start; gap: var(--a2); font-weight: 400; }
.feld-zeile input { flex: none; margin-top: 3px; }
fieldset { border: 0; padding: 0; margin: 0 0 var(--a4); min-width: 0; }
legend { font-weight: 600; color: var(--tiefblau); padding: 0; margin-bottom: var(--a2); }
input[type="file"] { font: inherit; }

/* Fortschritt */
.fortschritt { list-style: none; padding: 0; margin: 0 0 var(--a5); display: grid; gap: var(--a2); counter-reset: schritt; }
.fortschritt li { display: flex; align-items: center; gap: var(--a3); color: var(--text-leise); }
.fortschritt li::before {
  counter-increment: schritt;
  content: counter(schritt);
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--linie);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
  background: var(--weiss);
}
.fortschritt li.fertig { color: var(--tiefblau); }
.fortschritt li.fertig::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: var(--weiss); }
.fortschritt li.aktiv { color: var(--tiefblau); font-weight: 600; }
.fortschritt li.aktiv::before { border-color: var(--messing); color: var(--messing); }
.balken { height: 10px; background: var(--creme-tief); border-radius: var(--radius-rund); overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--messing); border-radius: var(--radius-rund); transition: width 300ms; }

/* Layout-Helfer */
.stapel { display: flex; flex-direction: column; gap: var(--a4); }
.stapel-klein { display: flex; flex-direction: column; gap: var(--a2); }
.reihe { display: flex; flex-wrap: wrap; gap: var(--a3); align-items: center; }
.zwischen { justify-content: space-between; }
.mitte { text-align: center; }
.schmal { max-width: var(--breite-text); margin-left: auto; margin-right: auto; }
.abschnitt { padding: var(--a6) 0; }
.abschnitt + .abschnitt { border-top: 1px solid var(--linie); }
.raster { display: grid; gap: var(--a4); grid-template-columns: 1fr; }
.ladend { position: relative; color: transparent !important; pointer-events: none; }
.ladend::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(31, 42, 68, .25);
  border-top-color: var(--tiefblau);
  border-radius: 50%;
  animation: drehen .8s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

/* Tabellen (Admin) */
table.tabelle { width: 100%; border-collapse: collapse; background: var(--weiss); border-radius: var(--radius-klein); overflow: hidden; font-size: .95rem; }
.tabelle th, .tabelle td { text-align: left; padding: var(--a2) var(--a3); border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { background: var(--creme-tief); color: var(--tiefblau); font-weight: 600; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle-rollen { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Fehlerseite */
.fehlerseite { max-width: var(--breite-text); margin: var(--a7) auto; text-align: center; }
.fehlerseite .ueberzeile { font-size: 3rem; letter-spacing: 0; line-height: 1; color: var(--messing); opacity: .55; }

/* Breite Bildschirme */
@media (min-width: 640px) {
  .karten { grid-template-columns: repeat(2, 1fr); }
  .raster-2 { grid-template-columns: repeat(2, 1fr); }
  .fuss-innen { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .inhalt { padding-top: var(--a6); }
}
@media (min-width: 960px) {
  .karten-3 { grid-template-columns: repeat(3, 1fr); }
  .raster-3 { grid-template-columns: repeat(3, 1fr); }
  .kopf-innen { min-height: 72px; }
  .inhalt { padding-top: var(--a7); }
}

/* Nacht: Startseite, Anlass-Seiten, Wisch-Flow (body.nacht). Samt und Messing, Text in Creme, Knöpfe in Gold. */
html:has(body.nacht) { background: var(--nacht); }
body.nacht { background: var(--nacht); color: var(--creme-hell); color-scheme: dark; }
body.nacht h1, body.nacht h2, body.nacht h3, body.nacht h4 { color: var(--gold); }
body.nacht h2 { font-family: var(--schrift-display); font-weight: 400; letter-spacing: .01em; }
body.nacht p.gross, body.nacht .leise { color: var(--rauch); }
body.nacht .ueberzeile { color: var(--messing); }
body.nacht a { color: var(--gold); }
body.nacht a:hover { color: var(--creme-hell); }
body.nacht .kopf { background: linear-gradient(to bottom, rgba(23, 18, 26, .96), rgba(23, 18, 26, .7)); border-bottom: 1px solid rgba(201, 169, 97, .25); }
body.nacht .wortmarke, body.nacht .wortmarke:hover { color: var(--gold); }
body.nacht .wortmarke-punkt { background: var(--gold); box-shadow: 0 0 0 3px rgba(232, 201, 131, .18); }
body.nacht .btn { background: transparent; color: var(--gold); border-color: var(--messing); }
body.nacht .btn:hover { background: rgba(232, 201, 131, .1); color: var(--gold); }
body.nacht .btn-primaer, body.nacht .btn-messing { background: var(--gold); color: var(--nacht); border-color: var(--gold); box-shadow: none; }
body.nacht .btn-primaer:hover, body.nacht .btn-messing:hover { background: var(--creme-hell); border-color: var(--creme-hell); color: var(--nacht); box-shadow: 0 0 0 1px var(--messing), 0 12px 30px rgba(232, 201, 131, .22); }
body.nacht .btn-leise { border-color: transparent; background: transparent; color: var(--creme-hell); }
body.nacht .btn-leise:hover { background: rgba(243, 227, 195, .08); }
body.nacht .karte { background: rgba(23, 18, 26, .78); border: 1px solid rgba(201, 169, 97, .55); color: var(--creme-hell); box-shadow: none; }
body.nacht .karte-hervor { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(232, 201, 131, .25); }
body.nacht .abzeichen { background: rgba(201, 169, 97, .18); color: var(--gold); }
body.nacht .abzeichen-messing { background: var(--gold); color: var(--nacht); }
body.nacht .hinweis { background: rgba(74, 16, 36, .5); border-left-color: var(--messing); color: var(--creme-hell); }
body.nacht .hinweis-fehler { background: rgba(179, 64, 47, .2); border-left-color: #E07A66; color: #F4C2B8; }
body.nacht .hinweis-ok { background: rgba(59, 122, 87, .2); border-left-color: #7FBF98; color: #CFEBD9; }
body.nacht input[type="text"], body.nacht input[type="email"], body.nacht input[type="password"], body.nacht input[type="date"], body.nacht input[type="number"], body.nacht input[type="url"], body.nacht input[type="search"], body.nacht input[type="tel"], body.nacht textarea, body.nacht select {
  background: rgba(23, 18, 26, .6); color: var(--creme-hell); border-color: rgba(201, 169, 97, .55);
}
body.nacht input:focus, body.nacht textarea:focus, body.nacht select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 201, 131, .18); }
body.nacht input::placeholder, body.nacht textarea::placeholder { color: var(--rauch); }
body.nacht input[type="checkbox"], body.nacht input[type="radio"] { accent-color: var(--gold); }
body.nacht .feld label, body.nacht .feld .label, body.nacht legend { color: var(--gold); }
body.nacht .feld .beschreibung, body.nacht .klein.leise { color: var(--rauch); }
body.nacht .balken { background: rgba(201, 169, 97, .2); }
body.nacht .balken > span { background: var(--gold); }
body.nacht .fuss { border-top-color: rgba(201, 169, 97, .25); color: var(--rauch); }
body.nacht .fuss-hinweis { color: var(--gold); font-family: var(--schrift-serif); font-style: italic; font-weight: 500; font-size: 1.15rem; }
body.nacht .fuss-links a { color: var(--creme-hell); }
body.nacht .fuss-links a:hover { color: var(--gold); }
body.nacht :focus-visible { outline-color: var(--gold); }
body.nacht .fehlertext { color: #F4C2B8; }
body.nacht ::selection { background: var(--gold); color: var(--nacht); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .kopf-nav, .fuss, .sprung { display: none; }
  body { background: #fff; }
}
