:root {
  --primaer: #253943;
  --sekundaer: #344D5C;
  --weiss: #F6F6F6;
  --schwarz: #2F2F2F;
  --highlight: #9EB0B9;
  --font: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --rand-oben: 22mm;
  --rand-unten: 18mm;
  --rand-links: 22mm;
  --rand-rechts: 22mm;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--weiss);
  color: var(--schwarz);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}
.rahmen { width: 100%; max-width: 64rem; margin: 0 auto; padding: 1rem; }
.kopf { background: var(--primaer); color: var(--weiss); }
.marke { margin: 0; font-weight: 700; font-size: 1.125rem; }
.appname { margin: 0.25rem 0 0; color: var(--highlight); }
.kopfinhalt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.abmelden { margin: 0; }
.abmelden button { border: 1px solid var(--highlight); }
.abmelden button:focus-visible { outline-color: var(--highlight); }
.angemeldet { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
main { flex: 1; }
h1 { color: var(--primaer); font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.2; }
p { max-width: 65ch; overflow-wrap: anywhere; }
a { color: var(--sekundaer); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--sekundaer);
  outline-offset: 3px;
}
nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--primaer);
  border-top: 1px solid var(--highlight);
  padding: 0.25rem 0 calc(0.25rem + env(safe-area-inset-bottom));
}
nav a { color: var(--weiss); text-decoration: none; }
nav a:focus-visible { outline-color: var(--highlight); outline-offset: -3px; }
nav a, button, .knopf, .fuss a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
}
nav a { flex-direction: column; gap: 0.25rem; min-width: 0; min-height: 68px; font-size: 0.75rem; }
nav a[aria-current="page"] { background: var(--sekundaer); box-shadow: inset 0 2px var(--highlight); font-weight: 700; }
nav a:hover { background: var(--sekundaer); }
nav svg { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
button { font: inherit; border: 0; cursor: pointer; background: var(--primaer); }
button:hover, button:active, .knopf:hover { background: var(--sekundaer); }
.knopf { color: var(--weiss); background: var(--primaer); text-decoration: none; }
.fuss { border-top: 1px solid var(--highlight); }
.fuss .rahmen { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.fuss span { font-size: 0.875rem; }
.sprunglink { position: absolute; left: 1rem; top: -10rem; padding: 0.75rem; }
.sprunglink:focus { top: 1rem; background: var(--weiss); z-index: 20; }

[hidden] { display: none !important; }
.kasten { border: 1px solid var(--highlight); padding: 1.25rem; margin: 1rem 0; min-width: 0; }
.kasten > :first-child { margin-top: 0; }
.kasten > :last-child { margin-bottom: 0; }
h2 { color: var(--primaer); font-size: 1.25rem; line-height: 1.4; }
.anmeldeformular { display: grid; gap: 0.75rem; max-width: 28rem; }
.anmeldeformular label { font-weight: 600; }
.anmeldeformular input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--sekundaer);
  background: var(--weiss);
  color: var(--schwarz);
  padding: 0.5rem 0.75rem;
  font: inherit;
}
.anmeldeformular input:focus-visible { outline: 3px solid var(--sekundaer); outline-offset: 3px; }
button { color: var(--weiss); }
button:disabled { cursor: wait; opacity: 0.7; }
.meldung { border-left: 3px solid var(--sekundaer); padding: 0.5rem 1rem; }


h1, h2 { overflow-wrap: anywhere; }
.dokumentliste { list-style: none; margin: 0 0 1rem; padding: 0; }
.dokumentliste li { padding: 0.75rem 0; border-bottom: 1px solid var(--highlight); }
.dokumentliste li:last-child { border-bottom: 0; }
.dokumentliste a { display: inline-block; padding: 0.5rem 0; overflow-wrap: anywhere; }
.dokumentliste time, .dokumentdatum { display: block; font-size: 0.875rem; }
.marke-neu {
  display: inline-block;
  background: var(--primaer);
  color: var(--weiss);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  margin-left: 0.5rem;
}
.dokumentaktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin: 1rem 0; }
.dokumentaktionen a { min-height: 44px; display: inline-flex; align-items: center; }
.dokumentvorschau { display: block; width: 100%; height: 70vh; min-height: 24rem; border: 1px solid var(--highlight); }
.dokumentbild { display: block; max-width: 100%; max-height: 75vh; height: auto; margin: 1rem auto; }

.kontaktperson { display: flex; align-items: center; gap: 1rem; }
.kontaktperson > div { min-width: 0; }
.kontaktperson h2 { margin: 0; }
.kontaktbild { flex-shrink: 0; width: 80px; height: 80px; object-fit: cover; border-radius: 50%; }
.kontaktname { margin: 0; color: var(--primaer); font-weight: 600; }
.kontaktrolle { margin: 0.25rem 0 0; }
.kontaktwege { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.kontaktwege a { min-height: 44px; display: inline-flex; align-items: center; overflow-wrap: anywhere; }
.buchungsrahmen { display: block; width: 100%; height: 48rem; border: 1px solid var(--highlight); margin: 1rem 0; }
.datenschutztext { max-width: 65ch; }

@media (min-width: 768px) {
  .angemeldet { padding-bottom: 0; }
  nav { position: static; width: 100%; padding: 0; border-top: 1px solid var(--highlight); }
  nav a { flex-direction: row; min-height: 48px; font-size: 0.875rem; gap: 0.5rem; }
  nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--highlight); }
  .kontaktbild { width: 96px; height: 96px; }
  .rahmen { padding-left: var(--rand-links); padding-right: var(--rand-rechts); }
  main.rahmen { padding-top: var(--rand-oben); padding-bottom: var(--rand-unten); }
  .zweispaltig { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
