:root {
  --grund: #ffffff;
  --flaeche: #f4f6f1;
  --text: #1c1f1a;
  --leise: #5a6156;
  --rand: #d5dacf;
  --akzent: #4f7d14;
  --akzent-text: #ffffff;
  --akzent-hell: #e6f2d6;
  --fehler: #b3261e;
  --fokus: #1d5fd1;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #141613;
    --flaeche: #1e211c;
    --text: #e9ece6;
    --leise: #a5ad9f;
    --rand: #3a4036;
    --akzent: #8fd13a;
    --akzent-text: #141613;
    --akzent-hell: #2a3a18;
    --fehler: #ff8a80;
    --fokus: #8ab4ff;
  }
}

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

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

main:focus {
  outline: none;
}

h1 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  line-height: 1.2;
  margin: 1.5rem 0 0.5rem;
}

h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
}

h2:focus {
  outline: none;
}

a {
  color: var(--akzent);
}

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

[hidden] {
  display: none !important;
}

.sprungmarke {
  position: absolute;
  left: -10000px;
  top: 0;
}

.sprungmarke:focus {
  left: 1rem;
  top: 0.5rem;
  background: var(--grund);
  padding: 0.5rem 0.75rem;
  z-index: 1;
}

.kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem;
}

.marke {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sprachwahl {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--leise);
}

.sprachwahl button {
  background: none;
  border: 0;
  color: var(--leise);
  font: inherit;
  padding: 0.5rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  cursor: pointer;
}

.sprachwahl button[aria-pressed="true"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.einleitung {
  margin: 0;
  color: var(--leise);
}

.zone,
.hinweis {
  color: var(--leise);
  font-size: 0.95rem;
}

.klein {
  font-size: 0.85rem;
}

.meldung:empty {
  display: none;
}

.fehler {
  border: 1px solid var(--fehler);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1.5rem 0;
}

.fehler p {
  margin-top: 0;
  color: var(--fehler);
  font-weight: 600;
}

.tage,
.zeiten,
.links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tage {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
  gap: 0.5rem;
}

.zeiten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.5rem;
}

.tag,
.zeit {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 1px solid var(--rand);
  border-radius: 0.5rem;
  background: var(--flaeche);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: center;
}

.tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
}

.tag .wochentag {
  font-size: 0.8rem;
  color: var(--leise);
}

.tag .datum {
  font-weight: 600;
}

.tag:disabled {
  cursor: default;
  opacity: 0.45;
  background: transparent;
}

.tag:not(:disabled):hover,
.zeit:hover {
  border-color: var(--akzent);
}

.tag[aria-pressed="true"],
.zeit[aria-pressed="true"] {
  background: var(--akzent);
  border-color: var(--akzent);
  color: var(--akzent-text);
}

.tag[aria-pressed="true"] .wochentag {
  color: inherit;
}

.zeit .wien {
  display: block;
  font-size: 0.8rem;
  opacity: 0.8;
}

.gewaehlt {
  background: var(--akzent-hell);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
}

.feld {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

input,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--rand);
  border-radius: 0.5rem;
  background: var(--grund);
  color: var(--text);
  font: inherit;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--fehler);
}

textarea {
  resize: vertical;
}

.feldfehler,
.formularfehler {
  color: var(--fehler);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

.feldfehler:empty,
.formularfehler:empty {
  display: none;
}

/* Honeypot: für Menschen unsichtbar, für Screenreader ausgeblendet, nicht per Tab erreichbar. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.knopf {
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--akzent);
  border-radius: 0.5rem;
  background: var(--akzent);
  color: var(--akzent-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.knopf:disabled {
  opacity: 0.6;
  cursor: progress;
}

.knopf.zweitrangig {
  background: transparent;
  color: var(--akzent);
}

.links li {
  margin: 0.5rem 0;
}

.links a {
  font-weight: 600;
}

.fuss {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--rand);
  font-size: 0.9rem;
}

.fuss a {
  color: var(--leise);
}

@media (prefers-reduced-motion: no-preference) {
  .tag,
  .zeit,
  .knopf {
    transition: background-color 120ms ease, border-color 120ms ease;
  }
}
