/* ============================================================================
   termin.css · PSD Verkehrssicherung · 3-Schritt-Terminanfrage
   ----------------------------------------------------------------------------
   Gehört zu termin.js. Alle Klassen tragen das Präfix .tb-, damit nichts mit
   dem Seiten-CSS kollidiert. Seitenvariablen werden immer mit Fallback genutzt:
     --bg --panel --panel-2 --white --ink --muted --line --red --red-dark
     --red-tint --font --radius
   Stil: dvo-Sprache (Warmgrau, Geologica leicht, flache Flächen ohne Schatten,
   kleine Versal-Labels, eckige Buttons mit 3px Radius). Rot nur als Akzent:
   Button, aktiver Schritt, Auswahl, Fokus, Fehler.
   ============================================================================ */

/* ---------- 1. Grundlage und komponenteneigene Töne ---------- */

.tb {
  container-type: inline-size;
  container-name: tb;
  --tb-field: #F1F1EE;                 /* Feldfläche */
  --tb-field-line: #D6D6D1;            /* Feldrand */
  --tb-field-hover: #BDBCB6;           /* Feldrand bei Hover */
  --tb-card-line: rgba(10, 10, 10, .08);
  --tb-done: #F6B4AD;                  /* erledigter Schritt: blasses Rot */
  --tb-done-hover: #EE8F86;
  --tb-open: #D9D9D4;                  /* offener Schritt */
  --tb-day-off: #B5B4AE;               /* vergangene Kalendertage */
  --tb-preview: #FFF1EF;               /* Vorschau beim Wählen eines Zeitraums */
  --tb-check-line: #A6A59F;            /* Rand von Radio und Checkbox */
  --tb-ring: 0 0 0 3px rgba(255, 0, 0, .15);
  --tb-ease: cubic-bezier(.2, .7, .2, 1);

  font-family: var(--font, 'Geologica', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink, #0A0A0A);
  text-align: left;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}
.tb *, .tb *::before, .tb *::after { box-sizing: border-box; }
.tb [hidden] { display: none !important; }

/* Abwehr gegen globale Seitenregeln (Abstände, Listen, Formular-Schrift).
   :where() hält die Spezifität bei 0,1,0: schlägt Element-Regeln der Seite (button, p …),
   lässt aber alle .tb-Klassen weiter unten gewinnen. */
.tb :where(h1, h2, h3, h4, h5, h6, p, ol, ul, dl, dt, dd, fieldset, legend, table, th, td, form, section) { margin: 0; padding: 0; }
.tb :where(ol, ul) { list-style: none; }
.tb :where(button, input, select, textarea) { font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; letter-spacing: inherit; margin: 0; }
.tb :where(button) { -webkit-tap-highlight-color: transparent; }
.tb :where(svg) { display: block; }

.tb :where(a) { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .16s ease; }
.tb :where(a):hover { color: var(--red-dark, #CC0000); }
.tb :where(a):focus-visible { outline: 2px solid var(--ink, #0A0A0A); outline-offset: 2px; border-radius: 2px; }

/* Nur für Screenreader */
.tb-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* Honeypot für Netlify: komplett ausgeblendet (kein Autofill, kein Screenreader) */
.tb-hp { display: none !important; }

/* ---------- 2. Karte ---------- */

.tb-card {
  position: relative;
  background: var(--white, #FAFAF8);
  border: 1px solid var(--tb-card-line);
  border-radius: var(--radius, 3px);
  padding: 56px;
}

/* ---------- 3. Fortschritt: 3 Balken + „Schritt X von 3“ ---------- */

.tb-progress {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-bottom: 52px; text-align: center;
}
.tb-bars { display: flex; align-items: center; gap: 6px; }
.tb-bars li { display: block; }
.tb-bar {
  position: relative; display: block;
  width: 26px; height: 24px; padding: 0;
  border: 0; border-radius: 2px; background: transparent;
  cursor: default;
  transition: width .22s var(--tb-ease);
}
.tb-bar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px;
  border-radius: 2px; background: var(--tb-open);
  transition: background-color .18s ease;
}
.tb-bar.tb-is-active { width: 52px; }
.tb-bar.tb-is-active::before { background: var(--red, #FF0000); }
.tb-bar.tb-is-done { cursor: pointer; }
.tb-bar.tb-is-done::before { background: var(--tb-done); }
.tb-bar.tb-is-done:hover::before { background: var(--tb-done-hover); }
.tb-bar:focus-visible { outline: 2px solid var(--ink, #0A0A0A); outline-offset: 2px; }

.tb-steptitle {
  font-size: 14px; line-height: 1.4; font-weight: 400; letter-spacing: .01em;
  color: var(--muted, #6B6A64);
}
.tb-steptitle:focus { outline: none; }

/* ---------- 4. Raster ---------- */

.tb-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 64px;
  align-items: start;
}
.tb-col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }

/* Einblenden beim Schrittwechsel (max. 180 ms) */
@keyframes tb-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.tb-enter { animation: tb-in .18s var(--tb-ease) both; }

/* ---------- 5. Feld, Label, Hinweis, Fehler ---------- */

.tb-field { display: flex; flex-direction: column; gap: 12px; min-width: 0; border: 0; }

.tb-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; line-height: 16px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink, #0A0A0A);
}
.tb-label .tb-ico { flex: none; width: 16px; height: 16px; margin-top: -1px; }
.tb-label-t { min-width: 0; }
.tb-opt {
  margin-left: 4px;
  font-size: 13px; font-weight: 300; letter-spacing: 0; text-transform: none; white-space: nowrap;
  color: var(--muted, #6B6A64);
}

.tb-hint { font-size: 14px; line-height: 1.55; font-weight: 300; color: var(--muted, #6B6A64); }

.tb-error {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: -4px;
  font-size: 13.5px; line-height: 1.45; font-weight: 400;
  color: var(--red-dark, #CC0000);
}
.tb-error .tb-ico { flex: none; margin-top: 1px; }

/* Gruppen (Lage, Wie oft): Legend wie Label */
.tb-fieldset { display: block; min-width: 0; }
.tb-fieldset > legend { float: left; width: 100%; padding: 0; margin: 0 0 12px; }
.tb-fieldset > legend + * { clear: both; }

/* ---------- 6. Eingabefelder ---------- */

.tb-control {
  display: block; width: 100%; height: 52px;
  padding: 0 16px;
  font-size: 16px; line-height: 1.4; font-weight: 400;
  color: var(--ink, #0A0A0A);
  background-color: var(--tb-field);
  border: 1px solid var(--tb-field-line);
  border-radius: var(--radius, 3px);
  box-shadow: none; outline: none;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.tb-control::placeholder { color: var(--muted, #6B6A64); opacity: 1; font-weight: 300; }
.tb-control:hover { border-color: var(--tb-field-hover); }
.tb-control:focus {
  border-color: var(--ink, #0A0A0A);
  background-color: var(--white, #FAFAF8);
  box-shadow: var(--tb-ring);
}
/* Browser-Autofill ohne blaue Fläche */
.tb-control:-webkit-autofill,
.tb-control:-webkit-autofill:hover { -webkit-text-fill-color: var(--ink, #0A0A0A); box-shadow: inset 0 0 0 100px var(--tb-field); }
.tb-control:-webkit-autofill:focus { box-shadow: inset 0 0 0 100px var(--white, #FAFAF8), var(--tb-ring); }

/* Select mit eigenem Chevron */
.tb-select {
  padding-right: 48px;
  cursor: pointer;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px 16px;
}
.tb-select::-ms-expand { display: none; }
.tb-select.tb-is-empty { color: var(--muted, #6B6A64); font-weight: 300; }
.tb-select option, .tb-select optgroup { color: var(--ink, #0A0A0A); font-weight: 400; }
.tb-select option[value=""] { color: var(--muted, #6B6A64); }

.tb-textarea { height: auto; min-height: 264px; padding: 14px 16px; line-height: 1.55; resize: vertical; }
.tb-textarea--s { min-height: 156px; }

/* Fehlerzustand */
.tb-field.tb-is-invalid .tb-control { border-color: var(--red-dark, #CC0000); }
.tb-field.tb-is-invalid .tb-control:focus { box-shadow: 0 0 0 3px rgba(204, 0, 0, .15); }

/* ---------- 7. Chips (Lage), Radios (Wie oft), Checkbox (Datenschutz) ---------- */

.tb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  font-size: 15px; font-weight: 400; line-height: 1.2;
  color: var(--ink, #0A0A0A);
  background: transparent;
  border: 1px solid var(--tb-field-line);
  border-radius: var(--radius, 3px);
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.tb-chip:hover { border-color: var(--ink, #0A0A0A); }
.tb-chip[aria-pressed="true"] {
  background: var(--ink, #0A0A0A); border-color: var(--ink, #0A0A0A);
  color: var(--white, #FAFAF8);
}
.tb-chip:focus-visible { outline: none; border-color: var(--ink, #0A0A0A); box-shadow: var(--tb-ring); }

.tb-radios { display: flex; flex-wrap: wrap; column-gap: 32px; row-gap: 4px; }
.tb-radio {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 28px;                    /* Handy: 44px, siehe unten */
  font-size: 16px; font-weight: 400; cursor: pointer;
}
.tb-radio input {
  flex: none; width: 20px; height: 20px;
  border: 1px solid var(--tb-check-line); border-radius: 50%;
  background: var(--white, #FAFAF8);
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.tb-radio:hover input { border-color: var(--ink, #0A0A0A); }
.tb-radio input:checked { border-color: var(--red, #FF0000); box-shadow: inset 0 0 0 6px var(--red, #FF0000); }
.tb-radio input:focus-visible { outline: none; border-color: var(--ink, #0A0A0A); box-shadow: var(--tb-ring); }
.tb-radio input:checked:focus-visible { border-color: var(--red, #FF0000); box-shadow: inset 0 0 0 6px var(--red, #FF0000), var(--tb-ring); }

.tb-check {
  display: flex; align-items: flex-start; gap: 14px;
  font-size: 15px; line-height: 1.55; font-weight: 300;
  cursor: pointer;
}
.tb-check input {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  border: 1px solid var(--tb-check-line); border-radius: var(--radius, 3px);
  background: var(--white, #FAFAF8) center / 14px 14px no-repeat;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.tb-check:hover input { border-color: var(--ink, #0A0A0A); }
.tb-check input:checked {
  background-color: var(--red, #FF0000); border-color: var(--red, #FF0000);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.tb-check input:focus-visible { outline: none; border-color: var(--ink, #0A0A0A); box-shadow: var(--tb-ring); }
.tb-consent.tb-is-invalid .tb-check input { border-color: var(--red-dark, #CC0000); }
.tb-consent .tb-error { margin-top: 0; padding-left: 36px; }

/* ---------- 8. Notdienst-Hinweis und Sendefehler ---------- */

.tb-note {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: var(--panel-2, #E6E6E3);
  border-left: 2px solid var(--red, #FF0000);
  border-radius: 0 var(--radius, 3px) var(--radius, 3px) 0;
  font-size: 14.5px; line-height: 1.5; font-weight: 300;
}
.tb-note .tb-ico { flex: none; margin-top: 3px; }
.tb-note a { font-weight: 500; white-space: nowrap; }

.tb-alert:empty { display: none; }
.tb-alert-box {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 40px; padding: 16px 18px;
  background: var(--red-tint, #FFE4E1);
  border: 1px solid var(--red-dark, #CC0000);
  border-radius: var(--radius, 3px);
  font-size: 15px; line-height: 1.55; font-weight: 400;
}
.tb-alert-box .tb-ico { flex: none; margin-top: 3px; color: var(--red-dark, #CC0000); }
.tb-alert-box a { font-weight: 500; white-space: nowrap; }

/* ---------- 9. Kalender ---------- */

.tb-cal {
  background: var(--white, #FAFAF8);
  border: 1px solid var(--line, rgba(10, 10, 10, .14));
  border-radius: var(--radius, 3px);
  padding: 18px 20px 12px;
}
.tb-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tb-cal-month { font-size: 18px; line-height: 1.3; font-weight: 400; letter-spacing: -.005em; text-align: center; }
.tb-cal-nav {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  color: var(--ink, #0A0A0A); background: transparent;
  border: 1px solid var(--line, rgba(10, 10, 10, .14));
  border-radius: var(--radius, 3px);
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, opacity .16s ease;
}
.tb-cal-nav:hover:not(:disabled) { border-color: var(--ink, #0A0A0A); }
.tb-cal-nav:disabled { opacity: .3; cursor: default; }
.tb-cal-nav:focus-visible { outline: none; border-color: var(--ink, #0A0A0A); box-shadow: var(--tb-ring); }

/* 2px Luft zwischen den Wochen, waagerecht lückenlos: der Zeitraum bleibt ein durchgehendes Band */
.tb-cal-grid { width: 100%; border-collapse: separate; border-spacing: 0 2px; table-layout: fixed; }
.tb-cal-grid th {
  height: 34px; padding: 0;
  font-size: 11.5px; line-height: 1; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; text-align: center;
  color: var(--muted, #6B6A64);
}
.tb-cal-grid td { height: 46px; padding: 0; text-align: center; vertical-align: middle; }

.tb-day {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 46px; padding: 0;
  font-size: 15px; font-weight: 400; font-variant-numeric: tabular-nums;
  color: var(--ink, #0A0A0A);
  background: transparent;
  border: 0; border-radius: var(--radius, 3px);
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.tb-day:hover { background: var(--tb-field); }
.tb-day:disabled { color: var(--tb-day-off); background: transparent; cursor: default; }
.tb-day.tb-is-today { box-shadow: inset 0 0 0 1px var(--red, #FF0000); }
/* Vorschau, während nur der Starttag gewählt ist */
.tb-day.tb-is-preview { background: var(--tb-preview); border-radius: 0; }
.tb-day.tb-is-preview-end { background: var(--tb-preview); box-shadow: inset 0 0 0 1px var(--red, #FF0000); border-radius: 0 var(--radius, 3px) var(--radius, 3px) 0; }
/* Gewählter Zeitraum: durchgehendes Band */
.tb-day.tb-is-range { background: var(--red-tint, #FFE4E1); border-radius: 0; }
.tb-day.tb-is-start, .tb-day.tb-is-end { background: var(--red, #FF0000); color: #fff; font-weight: 500; }
.tb-day.tb-is-start:hover, .tb-day.tb-is-end:hover { background: var(--red-dark, #CC0000); }
.tb-day.tb-is-start:not(.tb-is-end) { border-radius: var(--radius, 3px) 0 0 var(--radius, 3px); }
.tb-day.tb-is-end:not(.tb-is-start) { border-radius: 0 var(--radius, 3px) var(--radius, 3px) 0; }
.tb-day:focus-visible { outline: 2px solid var(--ink, #0A0A0A); outline-offset: -2px; z-index: 1; }
.tb-day.tb-is-start:focus-visible, .tb-day.tb-is-end:focus-visible { outline-color: var(--ink, #0A0A0A); box-shadow: inset 0 0 0 4px var(--red, #FF0000); }

.tb-cal-sel {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  min-height: 22px;
  font-size: 14px; line-height: 1.5; color: var(--muted, #6B6A64);
}
.tb-cal-sel strong { font-weight: 500; color: var(--ink, #0A0A0A); }

/* Textbuttons: „Auswahl löschen“, „Ändern“ */
.tb-linkbtn {
  flex: none; padding: 0; border: 0; background: none;
  font-size: 13.5px; line-height: 1.5; font-weight: 400; white-space: nowrap;
  color: var(--ink, #0A0A0A);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  cursor: pointer;
  transition: color .16s ease;
}
.tb-linkbtn:hover { color: var(--red-dark, #CC0000); }
.tb-linkbtn:focus-visible { outline: 2px solid var(--ink, #0A0A0A); outline-offset: 3px; border-radius: 2px; }

/* ---------- 10. Zusammenfassung „Ihre Anfrage“ ---------- */

.tb-sum {
  background: var(--panel-2, #E6E6E3);
  border-radius: var(--radius, 3px);
  padding: 22px 24px 6px;
}
.tb-sum-title {
  padding-bottom: 14px;
  font-size: 12.5px; line-height: 16px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
}
.tb-sum-block {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start;
  padding: 14px 0 16px;
  border-top: 1px solid rgba(10, 10, 10, .1);
}
.tb-sum-list { display: grid; row-gap: 6px; }
.tb-sum-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: 16px; font-size: 15px; line-height: 1.45; }
.tb-sum-row dt { font-weight: 300; color: var(--muted, #6B6A64); }
.tb-sum-row dd { font-weight: 500; color: var(--ink, #0A0A0A); overflow-wrap: break-word; }

/* ---------- 11. Aktionsleiste und Buttons ---------- */

.tb-actions {
  display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--line, rgba(10, 10, 10, .14));
}
.tb-alert:not(:empty) + .tb-actions { margin-top: 24px; }

.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 52px; padding: 0 28px;
  font-size: 13.5px; line-height: 1; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--radius, 3px);
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.tb-btn .tb-ico { flex: none; transition: transform .18s var(--tb-ease); }
.tb-btn:focus-visible { outline: 2px solid var(--ink, #0A0A0A); outline-offset: 3px; }

.tb-btn--primary { background: var(--red, #FF0000); border-color: var(--red, #FF0000); color: #fff; }
.tb-btn--primary:hover { background: var(--red-dark, #CC0000); border-color: var(--red-dark, #CC0000); }
.tb-btn--primary:hover .tb-ico { transform: translateX(3px); }
.tb-btn.tb-is-busy { cursor: progress; background: var(--red-dark, #CC0000); border-color: var(--red-dark, #CC0000); }
.tb-btn.tb-is-busy .tb-ico { display: none; }

.tb-btn--ghost { background: transparent; border-color: var(--ink, #0A0A0A); color: var(--ink, #0A0A0A); }
.tb-btn--ghost:hover { background: var(--ink, #0A0A0A); color: var(--white, #FAFAF8); }

.tb-back {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 4px;
  font-size: 13.5px; line-height: 1; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink, #0A0A0A); background: none; border: 0;
  cursor: pointer;
}
.tb-back span { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 6px; transition: text-decoration-color .16s ease; }
.tb-back:hover span { text-decoration-color: currentColor; }
.tb-back .tb-ico { transition: transform .18s var(--tb-ease); }
.tb-back:hover .tb-ico { transform: translateX(-3px); }
.tb-back:disabled { opacity: .4; cursor: default; }
.tb-back:focus-visible { outline: 2px solid var(--ink, #0A0A0A); outline-offset: 2px; border-radius: 2px; }

/* ---------- 12. Erfolgsansicht ---------- */

.tb-done {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 64px; row-gap: 40px;
  align-items: start;
}
.tb-eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
  font-size: 12.5px; line-height: 16px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
}
.tb-eyebrow::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--red, #FF0000); }
.tb-done-title {
  font-size: 34px; line-height: 1.15; font-weight: 300; letter-spacing: -.015em;
  color: var(--ink, #0A0A0A);
}
.tb-done-title:focus { outline: none; }
.tb-done-text { max-width: 44ch; margin-top: 20px; font-size: 16px; line-height: 1.6; font-weight: 300; }
.tb-done-text a { font-weight: 500; white-space: nowrap; }
.tb-done .tb-btn { margin-top: 36px; }

/* ---------- 13. Responsiv ---------- */

@media (max-width: 1100px) {
  .tb-card { padding: 44px 40px; }
  .tb-cols, .tb-done { column-gap: 40px; }
}

/* Handy und kleines Tablet: eine Spalte, volle Breite, Tipp-Ziele mindestens 44px */
@media (max-width: 860px) {
  .tb-card { padding: 28px 16px 20px; }
  .tb-progress { margin-bottom: 32px; }
  .tb-cols, .tb-done { grid-template-columns: minmax(0, 1fr); }
  .tb-cols { row-gap: 28px; }
  .tb-done-title { font-size: 28px; }

  .tb-cal { padding: 12px 0 6px; }
  .tb-cal-head { padding: 0 10px; margin-bottom: 6px; }
  .tb-cal-nav { width: 44px; height: 44px; }
  .tb-cal-grid td, .tb-day { height: 44px; }
  .tb-cal-sel { flex-wrap: wrap; row-gap: 0; }
  .tb-linkbtn { padding: 11px 0; margin: -11px 0; }
  .tb-radio { min-height: 44px; }

  .tb-chips { display: grid; grid-template-columns: 1fr 1fr; }

  .tb-textarea { min-height: 180px; }
  .tb-textarea--s { min-height: 132px; }

  /* Zusammenfassung gestapelt: Label über Wert, „Ändern“ oben rechts */
  .tb-sum { padding: 20px 16px 4px; }
  .tb-sum-block { display: block; position: relative; }
  .tb-sum-edit { position: absolute; top: 14px; right: 0; }
  .tb-sum-list { row-gap: 10px; }
  .tb-sum-row { display: block; }
  .tb-sum-row dt { font-size: 13px; line-height: 1.4; }
  .tb-sum-row dd { font-size: 15px; line-height: 1.45; }

  .tb-actions { flex-direction: column; align-items: stretch; gap: 4px; margin-top: 36px; padding-top: 24px; }
  .tb-btn { width: 100%; }
  .tb-back { justify-content: center; height: 48px; }
}

/* ---------- 14. Barrierefreiheit: weniger Bewegung, Kontrastmodus ---------- */

@media (prefers-reduced-motion: reduce) {
  .tb-enter { animation: none; }
  .tb *, .tb *::before, .tb *::after { transition: none !important; }
}
@media (forced-colors: active) {
  .tb-bar::before { background: GrayText; }
  .tb-bar.tb-is-active::before, .tb-bar.tb-is-done::before { background: Highlight; }
  .tb-day.tb-is-start, .tb-day.tb-is-end { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .tb-day.tb-is-range { outline: 1px solid Highlight; outline-offset: -3px; }
  .tb-radio input:checked, .tb-check input:checked { forced-color-adjust: none; background: Highlight; border-color: Highlight; }
}

/* ---------- 14. Anpassung an den eigenen Platz (Container-Abfragen) ----------
   Die Komponente sitzt je nach Seite in einer breiten oder schmalen Spalte.
   Diese Regeln richten sich nach ihrer tatsächlichen Breite, nicht nach dem Fenster. */

/* Mittlere Breite (z. B. 2/3-Spalte der Startseite): Zusammenfassung gestapelt,
   damit lange Wörter wie „Baustellenabsicherung“ nie mitten im Wort umbrechen */
@container tb (max-width: 1000px) {
  .tb-card { padding: 44px 40px; }
  .tb-cols, .tb-done { column-gap: 40px; }
  .tb-sum { padding: 20px 20px 4px; }
  .tb-sum-block { display: block; position: relative; }
  .tb-sum-edit { position: absolute; top: 14px; right: 0; }
  .tb-sum-list { row-gap: 10px; }
  .tb-sum-row { display: block; }
  .tb-sum-row dt { font-size: 13px; line-height: 1.4; }
  .tb-sum-row dd { font-size: 15px; line-height: 1.45; }
}

/* Schmal: eine Spalte, Kalender in voller Breite */
@container tb (max-width: 720px) {
  .tb-cols, .tb-done { grid-template-columns: minmax(0, 1fr); }
  .tb-cols { row-gap: 28px; }
  .tb-done-title { font-size: 28px; }
}

/* Hinweis in der lokalen Vorschau (file://): Anfrage wurde nicht gesendet */
.tb-preview-note {
  margin-bottom: 28px; padding: 14px 16px;
  background: #FFF4CC; border: 1px solid #E0B400; border-radius: var(--radius, 3px);
  font-size: 15px; line-height: 1.5; font-weight: 400; color: var(--ink, #0A0A0A);
}
.tb-preview-note strong { font-weight: 600; }
