@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------ Farben */
:root {
  color-scheme: light;
  --bg: #faf8f5;
  --bg-sunk: #f1eee9;
  --fg: #1a1a1a;
  --fg-muted: #6f6c67;
  --border: #e6e2dc;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, .1);
  --focus-ring: 0 0 0 4px rgba(124, 131, 242, .2);
  --ok: #2f7d4f;
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, .08);
  --verlauf: linear-gradient(135deg, #f59e7b 0%, #d9669b 50%, #7c83f2 100%);
  --radius: 24px;
  --shadow: 0 1px 2px rgba(30, 20, 10, .04), 0 12px 32px -8px rgba(60, 40, 20, .14);
  --shadow-lg: 0 1px 2px rgba(30, 20, 10, .04), 0 24px 60px -12px rgba(60, 40, 20, .22);
}

/* ------------------------------------------------------------ Basis */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 15px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg);
  font: 15px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 60vmax at 10% 0%, #fde2d4 0%, transparent 60%),
    radial-gradient(55vmax 55vmax at 100% 20%, #dbe7ff 0%, transparent 55%),
    radial-gradient(60vmax 60vmax at 50% 110%, #efe3fb 0%, transparent 60%),
    var(--bg);
}
body.modal-offen { overflow: hidden; }
h1, h2 { font-weight: 650; letter-spacing: -.02em; line-height: 1.2; margin: 0; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ------------------------------------------------------------ Seite */
.seite {
  max-width: 560px; margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}
.kopf { text-align: center; margin-bottom: 20px; }
.kopf-icon {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 20px;
  display: grid; place-items: center; color: #fff; background: var(--verlauf);
  box-shadow: 0 10px 24px -6px rgba(217, 102, 155, .55);
}
.kopf-icon svg { width: 30px; height: 30px; }
.logo { display: block; width: min(210px, 58vw); height: auto; margin: 0 auto 18px; }
.kopf h1 { font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.8rem); margin-bottom: 6px; }
.kopf-text { color: var(--fg-muted); margin: 0 auto; max-width: 32ch; }

.karte {
  background: rgba(255, 255, 255, .82); border: 1px solid rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px 20px 22px;
}
.block { padding: 18px 0; border-bottom: 1px solid var(--border); }
.spalte + .spalte .block:last-child { border-bottom: 0; }
.block h2 { font-size: 1.05rem; margin-bottom: 12px; }
.block > .hilfe { margin: -6px 0 12px; }
.block [data-feld] + [data-feld] { margin-top: 14px; }
.optional { font-weight: 450; font-size: .82rem; color: var(--fg-muted); margin-left: 4px; letter-spacing: 0; }
.hilfe { color: var(--fg-muted); font-size: .88rem; margin: 6px 0 0; }
.feld-label { display: block; font-size: .88rem; font-weight: 550; margin-bottom: 6px; }

/* Auswahl-Kacheln (Radio) */
.auswahl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auswahl.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.auswahl.drei .option span { padding: 10px 4px; font-size: .95rem; white-space: nowrap; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; inset: 0; margin: 0; pointer-events: none; }
.option span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 10px 12px; border-radius: 16px; background: #fff;
  border: 1.5px solid var(--border); font-weight: 550; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
}
.option svg { width: 22px; height: 22px; flex: none; }
.option input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: #3f3fb8; }
.option input:focus-visible + span { box-shadow: var(--focus-ring); }
/* Standorte: gewählte Kachel in der Farbe des Standorts */
.option.farbig input:checked + span { background: var(--farbe); border-color: var(--farbe-rand); color: var(--fg); }
/* Berufsgruppe: neutrales Grau, damit es sich nicht mit den Standortfarben beißt */
.option.grau input:checked + span { background: #e6e3de; border-color: #a8a29a; color: var(--fg); }
@media (hover: hover) { .option span:hover { border-color: #c9c4bc; } }

/* Eingabefelder */
.eingabe, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 14px; background: #fff;
  border: 1.5px solid var(--border); outline: none; transition: border-color .15s, box-shadow .15s;
  font-size: 16px; /* verhindert Zoom auf iOS */
}
textarea { resize: vertical; min-height: 72px; }
.eingabe:focus, textarea:focus { border-color: #7c83f2; box-shadow: var(--focus-ring); }
.dienste { margin-top: 14px; }

/* Datum */
.zeitraum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zeitraum [data-feld] + [data-feld] { margin-top: 0; }
.datum-feld {
  width: 100%; min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 14px; background: #fff; border: 1.5px solid var(--border); text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.datum-feld svg { width: 20px; height: 20px; flex: none; color: var(--fg-muted); }
.datum-feld:focus-visible { outline: none; border-color: #7c83f2; box-shadow: var(--focus-ring); }
.datum-text { color: var(--fg-muted); line-height: 1.25; }
.datum-feld.gesetzt .datum-text { color: var(--fg); font-weight: 550; }
.datum-feld.gesetzt svg { color: var(--accent); }
.dauer { margin: 10px 0 0; font-size: .9rem; color: var(--fg-muted); }
.dauer strong { color: var(--fg); font-weight: 600; }

/* Ablage für die AU */
.ablage {
  position: relative; display: grid; justify-items: center; gap: 4px; padding: 22px 16px;
  border: 2px dashed #d6d1c9; border-radius: 18px; background: rgba(255, 255, 255, .6);
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.ablage input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ablage svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 4px; }
.ablage-titel { font-weight: 550; }
.ablage-titel u { text-decoration-color: rgba(99, 102, 241, .5); text-underline-offset: 3px; color: #4b4bd0; }
.ablage-hilfe { font-size: .84rem; color: var(--fg-muted); }
.ablage.drueber { border-color: var(--accent); background: var(--accent-soft); }
.ablage:focus-within { border-color: #7c83f2; box-shadow: var(--focus-ring); }
@media (hover: none) { .nur-maus { display: none; } .ablage-titel u { text-decoration: none; } }

.dateien { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.dateien:empty { display: none; }
.datei {
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
}
.datei-bild {
  width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--bg-sunk) center/cover no-repeat;
  display: grid; place-items: center; color: var(--danger); font-size: .7rem; font-weight: 700;
}
.datei-info { min-width: 0; flex: 1; }
.datei-name { font-size: .92rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datei-groesse { font-size: .8rem; color: var(--fg-muted); }

.icon-knopf {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px;
  background: transparent; color: var(--fg-muted); transition: background .15s, color .15s;
}
.icon-knopf svg { width: 20px; height: 20px; }
.icon-knopf:hover { background: var(--bg-sunk); color: var(--fg); }
.icon-knopf:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.icon-knopf:disabled { opacity: .3; pointer-events: none; }

/* Fehler */
.fehler { color: var(--danger); font-size: .86rem; margin: 6px 0 0; }
.fehler:empty { display: none; }
.hat-fehler .eingabe, .hat-fehler .datum-feld, .hat-fehler .option span, .hat-fehler .ablage { border-color: #e4a39c; }
.hinweis-box {
  margin: 4px 0 14px; padding: 12px 14px; border-radius: 14px;
  background: var(--danger-soft); color: var(--danger); font-size: .92rem;
}

/* Absenden */
.senden {
  width: 100%; height: 58px; margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 16px; color: #fff; font-weight: 600; font-size: 1.02rem;
  background: var(--verlauf); box-shadow: 0 12px 24px -10px rgba(217, 102, 155, .7);
  transition: transform .1s, filter .15s, opacity .15s;
}
.senden svg { width: 20px; height: 20px; }
.senden:hover { filter: brightness(1.04); }
.senden:active { transform: scale(.99); }
.senden:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.senden:disabled { opacity: .7; cursor: progress; }
.fortschritt { height: 6px; margin-top: 12px; border-radius: 3px; background: var(--bg-sunk); overflow: hidden; }
.fortschritt-balken { height: 100%; width: 0; background: var(--verlauf); transition: width .2s; }
.datenschutz {
  margin: 14px 0 0; font-size: .8rem; color: var(--fg-muted);
  display: flex; align-items: flex-start; justify-content: center; gap: 6px; text-align: left;
}
.datenschutz svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--accent); }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Fertig */
.fertig { text-align: center; padding: 34px 22px 28px; outline: none; }
.fertig-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--ok);
  box-shadow: 0 10px 24px -8px rgba(47, 125, 79, .6);
}
.fertig-icon svg { width: 32px; height: 32px; stroke-width: 2.4; }
.fertig h2 { font-size: 1.3rem; margin-bottom: 8px; }
.fertig p { margin: 0 0 6px; }
.zweit {
  margin-top: 20px; min-height: 50px; padding: 0 22px; border-radius: 14px;
  border: 1.5px solid var(--border); background: #fff; font-weight: 550;
}
.zweit:hover { border-color: #c9c4bc; }

/* ------------------------------------------------------------ Kalender-Modal */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-hintergrund { position: absolute; inset: 0; background: rgba(26, 22, 18, .38); animation: einblenden .18s ease-out; }
.modal-fenster {
  position: relative; width: 100%; max-width: 380px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 16px 16px 18px; animation: auftauchen .2s ease-out;
}
.modal-griff { display: none; }
.kal-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; padding-left: 6px; }
.kal-kopf h2 { font-size: 1.08rem; }
.kal-monat { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
#kal-monatsname { font-weight: 600; }
.kal-wochentage, .kal-tage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kal-wochentage span { text-align: center; font-size: .76rem; font-weight: 600; color: var(--fg-muted); padding: 4px 0 6px; }
.kal-wochentage span:nth-child(n+6) { color: #b0aba4; }
.kal-tage { row-gap: 2px; }
.tag {
  position: relative; height: 44px; padding: 0; border: 0; background: transparent; font-size: .95rem;
  font-variant-numeric: tabular-nums; display: grid; place-items: center;
}
.tag span { width: min(40px, 100%); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; transition: background .12s; }
.tag.wochenende { color: #8d8880; }
.tag.heute span { box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 600; }
@media (hover: hover) { .tag:not(:disabled):hover span { background: var(--bg-sunk); } }
.tag:focus-visible { outline: none; }
.tag:focus-visible span { box-shadow: var(--focus-ring), inset 0 0 0 1.5px var(--accent); }
.tag:disabled { color: #cfcac3; cursor: default; }
.tag.im-bereich { background: var(--accent-soft); }
.tag.bereich-start { background: linear-gradient(90deg, transparent 50%, var(--accent-soft) 50%); }
.tag.bereich-ende { background: linear-gradient(90deg, var(--accent-soft) 50%, transparent 50%); }
.tag.bereich-start.bereich-ende { background: transparent; }
.tag.gewaehlt span, .tag.bereich-start span, .tag.bereich-ende span { background: var(--accent) !important; color: #fff; font-weight: 600; box-shadow: none; }
.kal-schnell { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kal-schnell:empty { display: none; }
.kal-schnell button {
  flex: 1 1 auto; min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: #fff; font-weight: 550; font-size: .92rem;
}
.kal-schnell button:hover { border-color: #c9c4bc; }

@keyframes einblenden { from { opacity: 0; } }
@keyframes auftauchen { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes hochfahren { from { transform: translateY(100%); } }

/* ------------------------------------------------------------ Desktop: zwei Spalten */
@media (min-width: 900px) {
  .seite { max-width: 1080px; padding-top: 20px; padding-bottom: 16px; }
  .kopf { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 16px; }
  .kopf .logo { width: 190px; margin: 0; }
  .kopf h1 { margin: 0; padding-left: 22px; border-left: 1.5px solid var(--border); font-size: 1.75rem; }
  #formular.karte {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 44px;
    padding: 6px 32px 24px;
  }
  .spalte + .spalte { position: relative; }
  .spalte + .spalte::before {           /* feine Trennlinie zwischen den Spalten */
    content: ""; position: absolute; left: -22px; top: 18px; bottom: 18px; border-left: 1px solid var(--border);
  }
  .spalte .block:last-child { border-bottom: 0; }
  .person-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .person-felder [data-feld] + [data-feld] { margin-top: 0; }
  .dienste textarea { min-height: 50px; }
  .block { padding: 16px 0; }
  .block h2 { margin-bottom: 10px; }
  .option span, .datum-feld { min-height: 50px; }
  .eingabe { min-height: 48px; }
  .ablage { padding: 18px 16px; }
  .fuss { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 18px; }
  .fuss .senden { max-width: 440px; margin: 0 auto; }
  .fuss .fortschritt { max-width: 440px; margin-left: auto; margin-right: auto; }
  .fertig { max-width: 560px; margin: 0 auto; }
}

/* ------------------------------------------------------------ Handy */
@media (max-width: 560px) {
  .seite { padding-top: max(20px, env(safe-area-inset-top)); padding-left: 12px; padding-right: 12px; }
  .kopf { margin-bottom: 16px; }
  .kopf-icon { width: 52px; height: 52px; border-radius: 17px; margin-bottom: 10px; }
  .kopf-icon svg { width: 26px; height: 26px; }
  .karte { padding: 4px 16px 18px; border-radius: 22px; }
  .zeitraum { grid-template-columns: 1fr; }
  .zeitraum [data-feld] + [data-feld] { margin-top: 12px; }

  /* Kalender als Blatt von unten */
  .modal { align-items: flex-end; padding: 0; }
  .modal-fenster {
    max-width: none; border-radius: 26px 26px 0 0; animation: hochfahren .24s cubic-bezier(.2, .8, .3, 1);
    padding: 8px 14px max(18px, env(safe-area-inset-bottom));
  }
  .modal-griff { display: block; width: 40px; height: 5px; border-radius: 3px; background: #dcd7d0; margin: 0 auto 8px; }
  .tag { height: 48px; }
  .tag span { width: min(44px, 100%); }
}
@media (max-width: 400px) {
  .auswahl.drei { gap: 8px; }
  .auswahl.drei .option span { font-size: .86rem; letter-spacing: -.01em; }
}
@media (max-width: 340px) {
  .auswahl:not(.drei) { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
