:root {
  --bg: #f4f3f0;
  --paper: #ffffff;
  --ink: #1c1c1c;
  --muted: #5e5e5e;
  --line: #e3e1db;
  --soft: #efeee9;
  --danger: #8d2f2f;
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.55;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: 2.05rem;
}

h2 {
  margin: 2.25rem 0 0.85rem;
  font-size: 1.35rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: inherit;
}

button,
.button {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  padding: 0.55rem 0.95rem;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.3;
}

button.sekundaer,
a.sekundaer {
  background: transparent;
  color: var(--ink);
  border-color: #c8c6c0;
}

button.gefahr {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

button.linkartig {
  background: none;
  color: inherit;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  font-family: var(--sans);
  font-size: 0.95rem;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c8c6c0;
  border-radius: 0;
  background: var(--paper);
  font-family: var(--sans);
  font-size: max(1rem, 16px);
  line-height: 1.3;
  appearance: none;
}

input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  font-family: var(--sans);
  font-size: max(1rem, 16px);
}

select {
  appearance: auto;
  padding-right: 0.75rem;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.feld {
  position: relative;
  display: block;
  min-width: 0;
}

input[readonly] {
  background: var(--soft);
  color: var(--ink);
}

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
  -webkit-text-fill-color: var(--ink);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input.kurz {
  width: 5rem;
}

label,
legend,
.editor-label,
.kategorie,
.meta,
.nav,
.filter,
.subnav,
.leise,
.hinweis,
.fehler,
.rechte,
.schritt-status,
.editor-werkzeug {
  font-family: var(--sans);
}

label {
  display: block;
  margin: 1.1rem 0 0.35rem;
}

.wahl {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0;
}

.wahl input {
  width: auto;
}

fieldset {
  margin: 1.75rem 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
  font-size: 1.15rem;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.sprung {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--paper);
  padding: 0.4rem 0.6rem;
}

.sprung:focus {
  top: 0.75rem;
}

.kopf {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.kopf-innen,
.inhalt {
  width: auto;
  max-width: 40rem;
  margin: 0 auto;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

.inhalt.breit,
.kopf-innen {
  max-width: 68rem;
}

.kopf-innen {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.wortmarke {
  text-decoration: none;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.1rem;
  font-size: 0.95rem;
}

.nav a,
.nav button.linkartig {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.nav a:hover,
.wortmarke:hover,
.filter a:hover,
.subnav a:hover,
.aktionen a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.inhalt {
  padding-top: 1.5rem;
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
}

.leise,
.meta {
  color: var(--muted);
}

.hinweis,
.fehler {
  padding-left: 0.85rem;
  margin: 0 0 1.25rem;
}

.hinweis {
  border-left: 2px solid var(--ink);
}

.fehler {
  border-left: 2px solid var(--danger);
  color: var(--danger);
  padding-left: 1.1rem;
}

.rechte {
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.filter,
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  margin: 0 0 2rem;
  font-size: 0.95rem;
}

.filter {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  padding-bottom: 0.15rem;
}

.filter a,
.subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  text-decoration: none;
}

.filter a {
  flex: 0 0 auto;
}

.filter a[aria-current="page"],
.subnav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.raster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.karte {
  display: block;
  text-decoration: none;
}

.karte-bild {
  aspect-ratio: 4 / 3;
  background: var(--soft);
  overflow: hidden;
}

.karte-bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.karte .kategorie {
  margin: 0.75rem 0 0.2rem;
}

.karte h2 {
  margin: 0;
  font-size: 1.2rem;
}

.karte:hover h2 {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.kategorie {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fotos {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.5rem 0 0.25rem;
}

.fotos img {
  display: block;
  width: 100%;
}

.zutaten {
  list-style: none;
  margin: 0;
  padding: 0;
}

.zutaten li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.icon {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--paper);
  flex: 0 0 auto;
  overflow: hidden;
}

.icon svg {
  width: 1.4rem;
  height: 1.4rem;
  display: block;
}

.icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emoji {
  font-size: 1.15rem;
  line-height: 1;
}

.icon-leer {
  background: var(--soft);
}

.markdown p {
  margin: 0.55rem 0;
}

.markdown ul,
.markdown ol {
  margin: 0.55rem 0;
  padding-left: 1.25rem;
}

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4 {
  margin: 1rem 0 0.4rem;
  font-size: 1.15rem;
}

.markdown a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.markdown blockquote {
  margin: 0.7rem 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.markdown code,
.markdown pre {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.92em;
}

.markdown pre {
  padding: 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: auto;
}

.stepper-status {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.stepper-nav {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.stepper-nav button {
  flex: 1 1 0;
  min-height: 2.75rem;
}

[data-stepper] [data-step] {
  display: none;
}

[data-stepper] [data-step].is-aktiv {
  display: block;
}

html.no-js [data-stepper] [data-step] {
  display: block;
  margin-bottom: 1.25rem;
}

html.no-js .stepper-status,
html.no-js .stepper-nav {
  display: none;
}

.kopfzeile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.kopfzeile h1 {
  margin: 0;
}

.liste {
  list-style: none;
  margin: 0;
  padding: 0;
}

.liste > li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.liste .meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
}

.aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.mit-icon {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.vorschau-icon {
  margin-bottom: 1rem;
}

.inline {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  flex: 1;
  width: 100%;
}

.feld span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
}

.zeile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.zeile .sekundaer {
  width: 100%;
  min-height: 2.75rem;
}

.zeile-kopf {
  display: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.bildliste {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.bildliste li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.bildliste img {
  width: 7rem;
  height: 5.25rem;
  object-fit: cover;
  background: var(--soft);
}

.bildliste label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.schritt-liste {
  counter-reset: schritt;
}

.schritt-block {
  margin: 0 0 1.5rem;
  padding-top: 0.25rem;
}

.schritt-kopf {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.schritt-nr {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.schritt-nr::before {
  counter-increment: schritt;
  content: "Schritt " counter(schritt);
}

.schritt-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.editor-werkzeug {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.editor-werkzeug button {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #ccc;
  min-height: 2.5rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.95rem;
}

.editor-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.editor-label {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.markdown-feld {
  min-height: 11rem;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: max(1rem, 16px);
  line-height: 1.45;
}

.editor-vorschau {
  min-height: 11rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #ccc;
  background: var(--paper);
}

form.anmeldung {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.1rem 1rem 1.35rem;
  margin-top: 0.25rem;
}

.formular button[type="submit"],
.kopfzeile .button {
  width: 100%;
  min-height: 2.75rem;
  margin-top: 1.25rem;
  text-align: center;
}

.kopfzeile .button {
  margin-top: 0;
}

@media (min-width: 40rem) {
  html {
    font-size: 17px;
  }

  .inhalt {
    padding-top: 2.5rem;
  }

  .raster {
    grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
    gap: 2.25rem 1.5rem;
  }

  .stepper-nav button,
  .formular button[type="submit"],
  .kopfzeile .button,
  .zeile .sekundaer {
    width: auto;
    flex: 0 0 auto;
  }

  .kopfzeile {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .liste > li,
  .schritt-kopf,
  .inline {
    flex-direction: row;
    align-items: center;
  }

  .liste > li {
    justify-content: space-between;
  }

  .schritt-kopf {
    justify-content: space-between;
  }

  .inline input {
    max-width: 18rem;
  }
}

@media (min-width: 48rem) {
  .zeile {
    grid-template-columns: 6.5rem 9.5rem minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .zeile-kopf {
    display: grid;
    grid-template-columns: 6.5rem 9.5rem minmax(0, 1fr) auto;
    gap: 0.5rem;
  }

  .feld > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .editor-split {
    grid-template-columns: 1fr 1fr;
  }

  .editor-werkzeug button {
    min-height: 0;
    padding: 0.28rem 0.5rem;
    font-size: 0.85rem;
  }
}

@media print {
  .kopf,
  .filter,
  .subnav,
  .stepper-nav,
  .sprung {
    display: none;
  }

  body {
    background: #fff;
  }

  [data-stepper] [data-step] {
    display: block;
    margin-bottom: 1rem;
  }
}
