:root {
  --petrol: #396667;
  --petrol-hover: #2f5455;
  --rot: #b91c1c;
  --creme: #f8f4ef;
  --tinte: #1a1a1a;
  --leise: #5c5c5c;
  --linie: #d9d1c7;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--tinte);
  background: var(--creme);
  font-family: "Titillium Web", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.45;
}

.kopf {
  background: var(--petrol);
  color: #fff;
  padding: 0.85rem 1.25rem;
}

.kopf__marke {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: #fff;
  text-decoration: none;
  max-width: 46rem;
  margin: 0 auto;
}

.kopf__logo {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.kopf__marke-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.kopf__club {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
}

.kopf__titel {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.blatt {
  max-width: 46rem;
  margin: 1.25rem auto 3rem;
  padding: 1.25rem 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid var(--linie);
}

h1 { font-size: 1.35rem; margin: 0 0 0.6rem; }
h2 { font-size: 1.05rem; margin: 1rem 0 0.4rem; }
h3 { font-size: 1rem; margin: 1rem 0 0.4rem; }

.schritte {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  text-align: center;
  line-height: 1em;
}

.schritte li {
  position: relative;
  box-sizing: content-box;
  flex: 1 1 0;
  min-width: 0;
  margin: 0 3px;
  padding: 10px 8px 10px 18px;
  height: 12px;
  background: #dee7e7;
  color: #000;
  font-weight: 600;
  font-size: 0.92rem;
}

.schritte li:first-child { padding-left: 8px; }

.schritte li:before,
.schritte li:after {
  box-sizing: content-box;
  width: 0;
  height: 0;
}

.schritte li:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  border-left: 16px solid #fff;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
}

.schritte li:first-child:before { border: none; }

.schritte li:after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 2;
  border-left: 16px solid #dee7e7;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
}

.schritte li:last-child:after { border: none; }
.schritte li:last-child { margin-right: 0; }

.schritte li.aktiv {
  background: #3b6767;
  color: #fff;
}

.schritte li.aktiv:after { border-left-color: #3b6767; }

.schritte li.erledigt { background: #6d8d8e; }

.schritte li.erledigt:after { border-left-color: #6d8d8e; }

.schritte button {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 0 4px 0 18px;
  height: 100%;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
}

.schritte li:first-child button { padding-left: 8px; }
.schritte li.erledigt button { cursor: pointer; }
.schritte__nr { display: none; }

@media (max-width: 480px) {
  .schritte__name { display: none; }
  .schritte__nr { display: inline; }
  .schritte li { padding-left: 14px; padding-right: 2px; }
  .schritte li:first-child { padding-left: 0; }
  .schritte button { padding-left: 14px; padding-right: 2px; }
  .schritte li:first-child button { padding-left: 0; }
}

.schritte button:hover,
.schritte button:focus,
.schritte button:disabled {
  background: transparent;
  color: inherit;
  opacity: 1;
}

label, fieldset {
  display: block;
  margin: 0 0 0.85rem;
  font-weight: 600;
}

.zeile { margin: 0 0 0.85rem; }
.zeile > label { margin: 0; }

input[type="hidden"] { display: none; }

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--linie);
  border-radius: 2px;
  font: inherit;
  font-weight: 400;
  line-height: 1.45;
}

select {
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231a1a1a' stroke-width='1.5' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.7rem;
}

label.wahl {
  font-weight: 400;
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}

label.wahl input { width: auto; margin-top: 0.25rem; }
label.wahl > span { flex: 1; min-width: 0; }
label.wahl a, a.textlink { color: var(--petrol); font-weight: 600; }
.erlaeuterung { margin: -0.35rem 0 0.85rem; }

.bankzeile {
  margin: -0.2rem 0 0.85rem;
  font-weight: 600;
  color: #3b6767;
}

.hinweis {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.8rem;
  background: #dee7e7;
  font-weight: 400;
}

.datum { position: relative; display: block; }
.datum input { padding-right: 2.2rem; }
.datum .kalender {
  position: absolute;
  right: 0.15rem;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0.2rem;
  border: 0;
  background: transparent;
  color: var(--petrol);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.datum .kalender svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.datum .kalender:hover { background: transparent; color: var(--petrol-hover); }

#dfc-datum {
  position: fixed;
  z-index: 30;
  width: 16rem;
  padding: 0.35rem 0.45rem 0.5rem;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 2px;
  box-shadow: 0 0 6px #999;
  user-select: none;
}
#dfc-datum button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0.15rem 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 400;
  font-size: 0.82rem;
  line-height: 1.35;
  box-shadow: none;
}
#dfc-datum .navi {
  display: grid;
  grid-template-columns: 1.6rem 1fr 1.6rem;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 0;
}
#dfc-datum .tage { display: grid; grid-template-columns: repeat(7, 1fr); }
#dfc-datum .raster { display: grid; grid-template-columns: repeat(4, 1fr); }
#dfc-datum .zelle {
  margin: 0;
  padding: 0.2rem 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 400;
  font-size: 0.82rem;
  line-height: 1.35rem;
  text-align: center;
  height: auto;
  min-height: 0;
}
#dfc-datum .sprung,
#dfc-datum .titel {
  height: 1.6rem;
  min-height: 0;
  padding: 0;
  font-weight: 700;
}
#dfc-datum .wochentag {
  color: #808080;
  font-weight: 700;
  border-bottom-color: #808080;
  cursor: default;
}
#dfc-datum .titel { font-weight: 700; }
#dfc-datum .sprung, #dfc-datum .titel { color: var(--petrol); }
#dfc-datum .am { color: #808080; font-style: italic; }
#dfc-datum .heute { border-color: #3b6767; }
#dfc-datum .a:hover { background: linear-gradient(#ddd, #cce, #ddf); color: inherit; }
#dfc-datum .ausw { background: #fcc; }
#dfc-datum .aj { height: 2.1rem; }
#dfc-datum .genau {
  display: flex;
  justify-content: center;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--linie);
}
#dfc-datum .genau__knopf {
  background: transparent;
  color: var(--petrol);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--petrol);
  height: auto;
}
#dfc-datum .genau__knopf:hover { background: var(--creme); color: var(--petrol); }

#dfc-zeit {
  position: fixed;
  z-index: 30;
  width: 14rem;
  padding: 0.55rem 0.6rem 0.65rem;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 2px;
  box-shadow: 0 0 6px #999;
  user-select: none;
  color: var(--tinte);
}
#dfc-zeit button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 0;
  max-height: none;
}
#dfc-zeit h4 { margin: 0 0 0.35rem; font-size: 0.78rem; color: var(--leise); }
#dfc-zeit h4 + .zeit-raster { margin-bottom: 0.55rem; }
#dfc-zeit .zeit-raster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  max-height: 11rem;
  overflow: auto;
}
#dfc-zeit .zelle {
  margin: 0;
  padding: 0.25rem 0;
  border: 1px solid var(--linie);
  border-radius: 2px;
  background: #fff;
  color: var(--tinte);
  font: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  height: auto;
  min-height: 0;
  max-height: none;
}
#dfc-zeit .zelle:hover { background: #dee7e7; color: var(--tinte); }
#dfc-zeit .zelle.aktiv { background: #3b6767; color: #fff; border-color: #3b6767; }

fieldset { border: 0; padding: 0; }
legend { font-weight: 600; }

.zeile, .spalten { display: grid; gap: 0.8rem; }
.zeile { grid-template-columns: 8rem 1fr; }
.spalten { grid-template-columns: 1fr 1fr; }

.navi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 1rem;
}

.navi__rechts {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.navi button { border: 1px solid transparent; }
.navi button.neben { border-color: var(--petrol); }

@media (max-width: 520px) {
  .navi {
    flex-wrap: wrap;
  }
  .navi > #spaeter {
    flex: 1 1 100%;
    order: 2;
    margin-top: 0.15rem;
  }
  .navi__rechts {
    flex: 1 1 100%;
    order: 1;
    margin-left: 0;
    justify-content: space-between;
  }
  .navi__rechts #zurueck,
  .navi__rechts #weiter {
    flex: 1 1 auto;
  }
}

.dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(26, 26, 26, 0.45);
}

.dialog__karte {
  width: min(28rem, 100%);
  background: #fff;
  padding: 1.1rem 1.2rem 1rem;
  border-top: 4px solid var(--petrol);
}

.dialog__karte.weit { width: min(36rem, 100%); }

.koppel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.2rem;
}

.koppel label { margin: 0; }

button.textlink {
  background: transparent;
  color: var(--petrol);
  font-weight: 600;
  padding: 0;
  border: 0;
}

button.textlink:hover { background: transparent; color: var(--petrol); text-decoration: underline; }
select#geschlecht { margin: 0.2rem 0 0.85rem; }

.dialog__karte h2 { margin: 0 0 0.6rem; color: var(--petrol); }
.dialog__karte p { margin: 0 0 0.85rem; }

button, .button {
  font: inherit;
  font-weight: 700;
  line-height: 1;
  border: 1px solid var(--petrol);
  background: var(--petrol);
  color: #fff;
  padding: 0 0.95rem;
  height: 2.5rem;
  min-height: 2.5rem;
  box-sizing: border-box;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.neben, .button.neben { background: #fff; color: var(--petrol); border: 1px solid var(--petrol); }
button:hover, .button:hover { background: var(--petrol-hover); border-color: var(--petrol-hover); }
button.neben:hover { background: var(--creme); border-color: var(--petrol); color: var(--petrol); }
button:disabled { opacity: 0.5; cursor: default; }

.fehlerblock {
  color: var(--rot);
  font-weight: 600;
  font-size: 0.92rem;
}

input.pflicht, textarea.pflicht, select.pflicht { background-color: #dee7e7; }
fieldset.pflicht { background: #dee7e7; padding: 0.35rem 0.55rem; border-radius: 2px; }

input.fehler, select.fehler, textarea.fehler, fieldset.fehler {
  border-color: var(--rot);
  background-color: #fcc;
}

.suchfeld, .wahlfeld { position: relative; display: block; overflow: visible; z-index: 50; }
.suchliste, .wahliste {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 6px #999;
  max-height: 14rem;
  overflow: auto;
}
.suchliste button, .wahliste button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 400;
  text-align: left;
}
.suchliste button:hover, .wahliste button:hover,
.suchliste button.aktiv, .wahliste button.aktiv { background: #dee7e7; color: inherit; }

#nationen { margin-bottom: 0.85rem; }
.wahlzeile { display: flex; align-items: flex-end; gap: 0.4rem; }
.wahlzeile > label, .wahlzeile > .wahlfeld { flex: 1; margin: 0; }
.wahlzeile .plus {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  margin: 0;
  padding: 0;
}

.fenster {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--creme);
  border: 1px solid var(--linie);
}

.nachricht {
  margin: 0.4rem 0;
  padding: 0.5rem 0.7rem;
  background: var(--creme);
}

.hinweis { color: var(--leise); }

/* Für Browser sichtbar genug zum Autofill, für Nutzer unsichtbar. display:none würde Safari blockieren. */
.autofill-falle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 700px) {
  .spalten, .zeile { grid-template-columns: 1fr; }
}
