/* Kallap – «Abreisskalender & Pinnwand».
   Warmes Papier, warme Tinte und Linien; die frei wählbare Kalenderfarbe
   (--accent) bleibt die Hauptfarbe. --wachs ist der Wachsmalstift, mit dem
   man im Wandkalender Termine ankreist: nur für Kringel, Marker-Striche
   und «verschoben»-Badges, nie für Flächen oder Fliesstext. Bitter (Slab,
   OFL) nur für Titel und Tageszahlen, alles andere System-Schrift.
   Mobil zuerst. */

@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("/static/fonts/bitter-latin.woff2") format("woff2");
}

:root {
  --accent: #177e6d;
  --accent-tief: #10594d;
  --wachs: #e2934c;
  --papier: #faf6ee;
  --karton: #fffdf7;
  --tinte: #2b2924;
  --graphit: #6a6357;
  --linie: #e8e0d1;
  --signal: #b3362b;
  --radius: 10px;
  --display: "Bitter", Georgia, serif;
  --schatten: 0 1px 2px rgba(43, 41, 36, 0.06), 0 4px 14px rgba(43, 41, 36, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--tinte);
  background: var(--papier);
  /* Vollbreite Farbbänder (.band) ragen rechnerisch minimal über den
     Viewport hinaus; clip verhindert horizontales Scrollen. */
  overflow-x: clip;
}

main { max-width: 62rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
.narrow { max-width: 33rem; margin: 0 auto; }

h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 0.75rem 0 1rem; }
h2 { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 0.5rem; }
a { color: var(--accent); text-underline-offset: 2px; }
small { color: var(--graphit); font-weight: normal; font-family: system-ui, sans-serif; }
.hint, .empty { color: var(--graphit); }
p.lead { font-size: 1.12rem; max-width: 38rem; }

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

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

/* Kopf- und Fusszeile. Der Header bleibt dezent sichtbar (sticky), auf
   Papiergrund statt Weiss, damit er zur Seite gehört statt darauf zu liegen. */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 1rem; border-bottom: 1px solid var(--linie); background: var(--papier);
  position: sticky; top: 0; z-index: 40;
}
.site-header .logo {
  font-family: var(--display); font-weight: 800; font-size: 1.25rem;
  text-decoration: none; color: var(--tinte); display: flex; align-items: center; gap: 0.45rem;
}
.site-header .logo::before {
  content: ""; width: 0.85rem; height: 0.95rem; border-radius: 3px;
  background: linear-gradient(to bottom, var(--accent) 32%, var(--karton) 32%);
  border: 1.5px solid var(--tinte); display: inline-block;
}
.site-header-public { justify-content: flex-end; }
.site-header nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; color: var(--tinte); }
.site-header nav a.nav-quiet { color: var(--graphit); }
.site-header nav a.nav-quiet:hover { color: var(--tinte); }
.org-name { color: var(--graphit); max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-footer {
  border-top: 1px solid var(--linie); margin-top: 3rem; padding: 1.25rem 1rem;
  color: var(--graphit); font-size: 0.85rem; text-align: center;
}
.public-footer {
  text-align: center; color: var(--graphit); font-size: 0.8rem;
  padding: 2rem 1rem 1.5rem; margin-top: 2rem;
}
.public-footer a { color: var(--graphit); }

/* Knöpfe */
.btn {
  display: inline-block; padding: 0.55rem 1.1rem; border: 1px solid var(--accent);
  border-radius: var(--radius); background: var(--accent); color: #fff; text-decoration: none;
  font: inherit; font-weight: 600; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--accent-tief); border-color: var(--accent-tief); }
.btn-small { padding: 0.3rem 0.7rem; font-size: 0.9rem; font-weight: 500; }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent-tief); }
.btn-danger { background: var(--signal); border-color: var(--signal); }
.btn-danger:hover { background: #96271d; border-color: #96271d; }
.linklike {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.inline-form { display: inline; }

/* Formulare */
.stack { display: grid; gap: 0.4rem; margin: 1.25rem 0; }
.stack label { font-weight: 600; margin-top: 0.6rem; }
.stack input[type="text"], .stack input[type="email"], .stack input[type="date"],
.stack input[type="time"], .stack select, .stack textarea {
  width: 100%; padding: 0.55rem 0.65rem; border: 1px solid var(--linie); border-radius: 8px;
  font: inherit; background: var(--karton);
}
.stack input[type="color"] { border: 1px solid var(--linie); border-radius: 8px; background: var(--karton); padding: 0.15rem; width: 4rem; height: 2.4rem; }
.stack fieldset { border: 1px solid var(--linie); border-radius: var(--radius); padding: 0.9rem; display: grid; gap: 0.4rem; background: var(--karton); margin: 0.5rem 0 0; }
.stack legend { font-weight: 700; font-family: var(--display); padding: 0 0.3rem; }
.stack .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.checkbox { display: flex; gap: 0.5rem; align-items: center; font-weight: normal; }
.checkbox input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.stack .btn { justify-self: start; margin-top: 0.9rem; }
.reveal-link { justify-self: start; font-size: 0.9rem; margin-top: 0.4rem; }
[hidden] { display: none !important; }

.notice {
  background: color-mix(in srgb, var(--accent) 9%, var(--karton)); border: 1px solid var(--accent); border-radius: 8px;
  color: var(--tinte); padding: 0.6rem 1rem; margin: 1rem 0;
}

.member-list { list-style: none; margin: 0.5rem 0 1rem; padding: 0; }
.member-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.5rem 0.75rem; border: 1px solid var(--linie); border-radius: 8px;
  background: var(--karton); margin-bottom: 0.4rem;
}
.member-mail { overflow-wrap: anywhere; }

.form-errors {
  background: #fbeeec; border: 1px solid var(--signal); border-radius: 8px;
  color: var(--signal); padding: 0.75rem 1rem 0.75rem 2rem; margin: 1rem 0;
}

.danger-zone { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px dashed var(--linie); }
.danger-zone a { color: var(--signal); }

/* Dashboard */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.breadcrumb { font-size: 0.9rem; color: var(--graphit); margin-top: 0.5rem; }
.breadcrumb a { color: var(--graphit); }

.calendar-cards { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; }
.card {
  background: var(--karton); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; box-shadow: var(--schatten);
  border-top: 4px solid var(--accent);
}
.card h2 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.card h2 a { color: var(--tinte); text-decoration: none; }
.card h2 a:hover { color: var(--accent); }
.card p { margin: 0.25rem 0; color: var(--graphit); }
.card-actions { margin-top: 1rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

.empty-state {
  background: var(--karton); border: 1.5px dashed var(--linie); border-radius: var(--radius);
  padding: 2.5rem 1.5rem; text-align: center; margin-top: 1.5rem;
}
.empty-state p { max-width: 26rem; margin: 0.5rem auto 1.25rem; color: var(--graphit); }
.empty-state h2 { margin-top: 0; }

/* Teilen-Box (Kalender-Detail) */
.share-box {
  background: var(--karton); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.share-box h2 { margin-top: 0; }
.share-box label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--graphit); margin: 0.9rem 0 0.25rem; }
.copy-row { display: flex; gap: 0.5rem; }
.copy-row input {
  flex: 1; min-width: 0; padding: 0.45rem 0.55rem; border: 1px solid var(--linie);
  border-radius: 8px; font-size: 0.85rem; color: var(--graphit); background: var(--papier);
}

/* Tabellen */
.event-table {
  width: 100%; border-collapse: collapse; background: var(--karton);
  border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; margin-top: 1rem;
}
.event-table th, .event-table td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.event-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--graphit); background: var(--papier); }
.event-table tr:last-child td { border-bottom: none; }
.occ-actions { display: flex; gap: 0.75rem; white-space: nowrap; }

/* Badges sind Terminmarker: warm wie ein Wachsmalstift-Strich, damit sie
   neben jeder frei gewählten Kalenderfarbe funktionieren. */
.badge {
  display: inline-block; background: var(--wachs); color: #43290e; border-radius: 4px;
  font-size: 0.72rem; font-weight: 600; padding: 0.08rem 0.45rem; margin-left: 0.4rem; vertical-align: middle;
}
.badge-off { background: var(--graphit); color: #fff; }

/* Öffentliche Kalenderseite: kompakter Kopf, das Monatsraster ist das
   Hauptelement. Die Abo-Details stecken in einem Aufklapp-Panel. */
.cal-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap; margin: 1.25rem 0 0;
}
.cal-head h1 { font-size: 1.45rem; margin: 0; border-left: 6px solid var(--accent); padding-left: 0.6rem; }
.cal-desc { color: var(--graphit); font-size: 0.95rem; max-width: 40rem; margin: 0.35rem 0 0; padding-left: calc(6px + 0.6rem); }

.subscribe { position: relative; }
.subscribe summary { list-style: none; }
.subscribe summary::-webkit-details-marker { display: none; }
.subscribe summary.btn { cursor: pointer; }
.subscribe-panel {
  position: absolute; right: 0; top: calc(100% + 0.5rem); width: min(24rem, 90vw);
  background: var(--karton); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(32, 38, 43, 0.16); padding: 1rem 1.1rem; z-index: 10;
}
.subscribe-panel p { font-size: 0.9rem; color: var(--graphit); margin: 0.75rem 0 0.35rem; }
.subscribe-panel p:first-child { margin-top: 0; }
.subscribe-primary { display: block; text-align: center; margin: 0.5rem 0 0.25rem; }

@media (max-width: 40rem) {
  .subscribe { width: 100%; }
  .subscribe summary.btn { display: block; text-align: center; }
  .subscribe-panel { position: static; width: 100%; margin-top: 0.5rem; }
}

/* Monatsraster */
.month-nav { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.month-nav h2 { margin: 0.4rem 0; min-width: 12rem; text-align: center; }
.month-nav a {
  text-decoration: none; font-size: 1.3rem; line-height: 1; padding: 0.35rem 0.75rem;
  border: 1px solid var(--linie); border-radius: 8px; background: var(--karton); color: var(--tinte);
}
.month-nav a:hover { border-color: var(--accent); color: var(--accent); }
.month-grid {
  width: 100%; border-collapse: collapse; table-layout: fixed;
  background: var(--karton); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden;
}
.month-grid th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--graphit); padding: 0.35rem 0.25rem; background: var(--papier); }
.month-grid td.day { border: 1px solid var(--linie); vertical-align: top; height: 3.2rem; padding: 0.2rem; }
.day-num { font-size: 0.78rem; color: var(--graphit); font-family: var(--display); font-weight: 700; }
td.today { box-shadow: inset 0 0 0 2px var(--accent); }
td.today .day-num { color: var(--accent); }
td.dim { background: var(--papier); }
td.dim .day-num { opacity: 0.35; }

/* Auf schmalen Bildschirmen: Punkte statt Text-Chips – die Liste darunter
   trägt die Details. */
.chip {
  display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--accent); margin: 0.1rem 0.1rem 0 0;
  overflow: hidden; font-size: 0; color: transparent;
}
td.dim .chip { opacity: 0.45; }

@media (min-width: 40rem) {
  .month-grid td.day { height: 5.5rem; padding: 0.25rem; }
  .chip {
    display: block; width: auto; height: auto; border-radius: 4px;
    font-size: 0.72rem; color: #fff; line-height: 1.35; padding: 0.06rem 0.3rem;
    margin: 0.15rem 0 0; white-space: nowrap; text-overflow: ellipsis;
  }
  .chip-time { opacity: 0.85; margin-right: 0.25em; }
}

/* Terminliste mit Datumsplakette */
.event-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.event-list li {
  display: flex; gap: 0.85rem; align-items: center;
  padding: 0.45rem 0; border-bottom: 1px solid var(--linie);
}
.date-tile {
  flex: none; width: 2.9rem; text-align: center; background: var(--karton);
  border: 1px solid var(--linie); border-radius: 7px; overflow: hidden;
  box-shadow: var(--schatten);
}
.dt-dow {
  display: block; background: var(--accent); color: #fff; font-size: 0.58rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.08rem 0;
}
.dt-day { display: block; font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1.2; }
.dt-mon { display: block; font-size: 0.62rem; color: var(--graphit); padding-bottom: 0.12rem; }
.event-list .what { min-width: 0; }
.event-list .title-row { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.event-list strong { font-size: 1.02rem; }
.event-list .time { color: var(--graphit); }
.event-list .location { color: var(--graphit); font-size: 0.92rem; }
.event-list .location::before { content: "· "; }
.event-list .desc { margin: 0.3rem 0 0; color: var(--graphit); font-size: 0.92rem; white-space: pre-line; }

/* Startseite */
.hero { padding: 3rem 0 1rem; position: relative; }
.eyebrow {
  color: var(--accent); font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.07em; margin: 0 0 0.5rem;
}
.hero h1 { font-size: 2.25rem; line-height: 1.15; letter-spacing: -0.015em; margin-top: 0; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.5rem 0 0.75rem; }
.hero-note { color: var(--graphit); font-size: 0.88rem; }

/* Der Wachsmalstift-Kringel um «Einmal»: wie ein eingekreister Termin im
   Wandkalender. Rein dekorativ, das Wort bleibt normaler Text. */
.kringel { position: relative; display: inline-block; }
.kringel-svg {
  position: absolute; inset: -0.32em -0.42em -0.26em -0.5em;
  overflow: visible; pointer-events: none;
}
.kringel-svg path { stroke: var(--wachs); stroke-width: 3.5px; stroke-linecap: round; opacity: 0.9; }
.feature-list { padding-left: 1.25rem; max-width: 42rem; }
.feature-list li { margin: 0.5rem 0; }

.hero-split { display: grid; gap: 2.5rem; align-items: center; }

/* Browserfenster-Mock (reines HTML/CSS-Produktbild) */
.hero-visual { position: relative; max-width: 30rem; }
.browser-mock {
  background: var(--karton); border: 1px solid var(--linie); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(32, 38, 43, 0.16); overflow: hidden;
}
.bm-bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  background: var(--papier); border-bottom: 1px solid var(--linie);
}
.bm-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--linie); }
.bm-url {
  flex: 1; margin-left: 8px; background: var(--karton); border: 1px solid var(--linie);
  border-radius: 999px; font-size: 11px; color: var(--graphit); padding: 2px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bm-body { padding: 14px 16px 10px; }
.bm-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.bm-title {
  font-family: var(--display); font-weight: 800; font-size: 15px;
  border-left: 4px solid var(--accent); padding-left: 8px;
}
.bm-pill {
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
  border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.bm-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin: 12px 0 6px; }
.bm-dow {
  font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--graphit); text-align: center; padding-bottom: 2px;
}
.bm-cell {
  min-height: 27px; background: var(--karton); border: 1px solid var(--linie);
  border-radius: 3px; padding: 1px 3px; overflow: hidden;
}
.bm-num { display: block; font-size: 8.5px; font-family: var(--display); font-weight: 700; color: var(--graphit); line-height: 1.2; }
.bm-cell.bm-dim { background: var(--papier); }
.bm-cell.bm-dim .bm-num { opacity: 0.4; }
/* «Heute» ist im Mock von Hand eingekreist – dasselbe Wachsmalstift-Motiv
   wie der Kringel in der Überschrift. */
.bm-cell.bm-today .bm-num {
  color: var(--tinte); position: relative; display: inline-block; padding: 0 2px;
}
.bm-cell.bm-today .bm-num::after {
  content: ""; position: absolute; inset: -2px -3.5px -1px -3px;
  border: 1.5px solid var(--wachs); border-radius: 50%;
  transform: rotate(-8deg);
}
.bm-chip {
  display: block; background: var(--accent); color: #fff; border-radius: 2px;
  font-size: 7.5px; line-height: 1.5; padding: 0 3px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bm-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  border-top: 1px solid var(--linie);
}
.bm-tile { width: 2.1rem; box-shadow: none; }
.bm-tile .dt-dow { font-size: 0.5rem; padding: 0.06rem 0; }
.bm-tile .dt-day { font-size: 0.9rem; line-height: 1.3; }
.bm-lines { display: grid; line-height: 1.4; min-width: 0; }
.bm-lines strong { font-size: 13px; }
.bm-lines span { font-size: 11px; color: var(--graphit); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Laptop-Rahmen um das Browserfenster */
.laptop-mock {
  filter: drop-shadow(0 22px 26px rgba(32, 38, 43, 0.16)) drop-shadow(0 3px 5px rgba(32, 38, 43, 0.12));
}
.laptop-screen {
  position: relative;
  aspect-ratio: 16 / 10; /* reale Notebook-Proportion; Inhalt wird unten beschnitten */
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #2b3138, #171a1e);
  border-radius: 14px 14px 0 0;
  padding: 14px 12px 0;
  overflow: hidden;
}
.laptop-screen .browser-mock { flex: 1; min-height: 0; }
.laptop-cam {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: #0b0d0f; box-shadow: inset 0 0 1.5px #3f6f6a;
}
.laptop-base {
  height: 12px; margin: 0 -5.5%;
  background: linear-gradient(180deg, #e4e7ea 0%, #c4cacf 55%, #9aa2a9 100%);
  border-radius: 2px 2px 10px 10px;
  position: relative;
}
.laptop-base::after {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 15%; height: 5px; background: #aab1b7; border-radius: 0 0 6px 6px;
}
.laptop-mock .browser-mock { box-shadow: none; border-radius: 6px 6px 0 0; border-bottom: none; }

/* Handy-Mock: die Kallap-Termine in der ganz normalen Kalender-App des
   Handys. Auf schmalen Bildschirmen ist er das einzige Hero-Bild, auf
   breiten überlappt er den Laptop unten rechts. */
.phone-mock {
  width: 10.5rem;
  aspect-ratio: 9 / 18.5; /* reale Handy-Proportion */
  display: flex;
  background: linear-gradient(180deg, #2b3138, #171a1e);
  border-radius: 26px; padding: 5px;
  box-shadow: 0 18px 40px rgba(32, 38, 43, 0.3);
  margin: 1.25rem auto 0;
}
.phone-screen {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
  background: var(--karton); border-radius: 22px; overflow: hidden;
  padding: 5px 8px 4px;
}
.pm-list { flex: 1; }
.pm-home { margin-top: auto; }
.pm-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 4px 4px;
}
.pm-time { font-size: 8.5px; font-weight: 700; }
.pm-island { width: 32%; height: 8px; background: #171a1e; border-radius: 999px; }
.pm-status-icons { display: flex; align-items: center; gap: 3px; }
.pm-sig { display: flex; align-items: flex-end; gap: 1.5px; }
.pm-sig i { width: 2.2px; background: var(--tinte); border-radius: 0.5px; }
.pm-sig i:nth-child(1) { height: 3px; }
.pm-sig i:nth-child(2) { height: 4.5px; }
.pm-sig i:nth-child(3) { height: 6px; }
.pm-sig i:nth-child(4) { height: 7.5px; }
.pm-batt {
  width: 14px; height: 7px; border: 1px solid var(--tinte); border-radius: 2px;
  position: relative; opacity: 0.9;
}
.pm-batt::before { content: ""; position: absolute; inset: 1px 4px 1px 1px; background: var(--tinte); border-radius: 1px; }
.pm-batt::after { content: ""; position: absolute; right: -2.5px; top: 1.5px; width: 1.5px; height: 3px; background: var(--tinte); border-radius: 0 1px 1px 0; }
.pm-apphead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 3px 2px 4px;
}
.pm-back { color: var(--accent); font-size: 13px; line-height: 1; }
.pm-month { font-size: 11px; font-weight: 700; }
.pm-plus { color: var(--accent); font-size: 12px; line-height: 1; }
.pm-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; padding-bottom: 4px; border-bottom: 1px solid var(--linie); }
.pm-wd { display: grid; justify-items: center; gap: 1px; font-size: 7px; color: var(--graphit); }
.pm-wnum {
  font-size: 8.5px; font-weight: 600; color: var(--tinte);
  width: 13px; height: 13px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.pm-sel .pm-wnum { background: var(--accent); color: #fff; }
.pm-list { padding: 4px 1px 2px; display: grid; gap: 3px; }
.pm-datehead {
  font-size: 7.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--graphit); margin-top: 3px;
}
.pm-event {
  display: flex; gap: 5px; align-items: stretch;
  background: var(--papier); border-radius: 5px; padding: 3px 5px 3px 3px;
}
.pm-eventbar { flex: none; width: 3px; border-radius: 2px; background: var(--accent); }
.pm-eventtext { display: grid; line-height: 1.35; min-width: 0; }
.pm-eventtext strong { font-size: 9.5px; }
.pm-eventtext span { font-size: 8px; color: var(--graphit); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-home { display: block; width: 32%; height: 3px; background: var(--tinte); border-radius: 999px; margin: 6px auto 2px; opacity: 0.75; }

.float-check {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Startseiten-Sektionen: grosszügige Abstände, wechselnde Hintergründe.
   .band zieht eine Sektion über die volle Viewport-Breite (der Inhalt
   bleibt auf der 60rem-Spalte von main), damit Flächen statt umrandeter
   Boxen den Rhythmus der Seite bestimmen. */
.landing-section { margin-top: 4.5rem; }
.landing-section h2 { font-size: 1.5rem; margin-bottom: 0.35rem; }
.landing-section > h2::before {
  content: ""; display: block; width: 2.4rem; height: 0.3rem; border-radius: 999px;
  background: var(--wachs); margin: 0 0 0.8rem; transform: rotate(-1.5deg);
}
.section-lead { color: var(--graphit); max-width: 40rem; margin: 0 0 1.5rem; }

.band {
  margin-inline: calc(50% - 50vw);
  padding-inline: max(1rem, calc(50vw - 30rem));
  padding-block: 3.25rem 3.75rem;
}
@media (min-width: 40rem) {
  /* main hat hier 1.5rem Seitenabstand; die Band-Innenkante folgt ihm. */
  .band { padding-inline: max(1.5rem, calc(50vw - 29.5rem)); }
}
.band-karton { background: var(--karton); border-block: 1px solid var(--linie); }
.band > h2 { margin-top: 0; }

/* Offene Schritte – bewusst ohne Kartenrahmen, die Mini-Mockups sind
   die einzigen Flächen. */
.step-cards { display: grid; gap: 2rem; margin-top: 1.25rem; }
.step-card { background: none; border: none; padding: 0; }
.step-card h3 {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--display); font-size: 1.02rem; margin: 1rem 0 0.35rem;
}
.step-card p { margin: 0; color: var(--graphit); font-size: 0.95rem; }
.step-num {
  flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}

/* Mini-Mockups in den Schritt-Karten: wie Zettel an einer Pinnwand
   minimal verdreht – gerade genug, dass die Reihe nicht schematisch wirkt. */
.mini-mock {
  background: var(--papier); border: 1px solid var(--linie); border-radius: 8px;
  padding: 12px; display: grid; gap: 6px; align-content: start;
  min-height: 9.5rem; font-size: 12px; box-shadow: var(--schatten);
}
.step-card:nth-child(1) .mini-mock { transform: rotate(-0.7deg); }
.step-card:nth-child(2) .mini-mock { transform: rotate(0.5deg); }
.step-card:nth-child(3) .mini-mock { transform: rotate(-0.4deg); }
.mm-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--graphit); font-weight: 600; }
.mm-input { background: var(--karton); border: 1px solid var(--linie); border-radius: 6px; padding: 5px 8px; }
.mm-btn {
  background: var(--accent); color: #fff; border-radius: 6px; padding: 5px 10px;
  justify-self: start; font-weight: 600; margin-top: 2px;
}
.mm-occ {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  background: var(--karton); border: 1px solid var(--linie); border-radius: 6px; padding: 6px 8px;
}
.mm-occ .badge { margin-left: 0; }
.mm-link { color: var(--accent); text-decoration: underline; font-size: 11px; }
.mm-copyrow { display: flex; gap: 6px; }
.mm-url {
  flex: 1; min-width: 0; background: var(--karton); border: 1px solid var(--linie);
  border-radius: 6px; padding: 6px 8px; color: var(--graphit);
  white-space: nowrap; overflow: hidden;
}
.mm-btn-s { background: var(--accent); color: #fff; border-radius: 6px; padding: 6px 8px; font-weight: 600; }
.mm-check { background: var(--karton); border: 1px solid var(--linie); border-radius: 6px; padding: 6px 8px; }

.paths { display: grid; gap: 1rem; margin-top: 1rem; }
.paths .card { border-top-width: 1px; }
.paths .card-featured {
  background: color-mix(in srgb, var(--accent) 9%, var(--karton));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--linie));
}
/* Selbst hosten = selbst anpacken: gestrichelte Kontur statt Karte. */
.paths .card:not(.card-featured) {
  background: transparent; border: 1.5px dashed var(--linie);
  border-top-width: 1.5px; box-shadow: none;
}
.paths .card h3 { margin: 0 0 0.4rem; font-family: var(--display); font-size: 1.1rem; }
.paths .card p { color: var(--tinte); }
.paths .card p:last-child { margin-bottom: 0; }

/* Datenschutz: eine zusammenhängende, grün getönte Fläche über die volle
   Breite. */
.privacy-band {
  background: color-mix(in srgb, var(--accent) 8%, var(--papier));
}
.privacy-band h2 { margin-top: 0; }
.privacy-grid { display: grid; gap: 1.5rem 2.5rem; margin-top: 1.25rem; }
.privacy-card { display: grid; gap: 0.3rem; align-content: start; }
.privacy-icon { width: 1.9rem; height: 1.9rem; color: var(--accent); }
.privacy-icon svg { width: 100%; height: 100%; }
.privacy-card h3 { margin: 0; font-family: var(--display); font-size: 1rem; }
.privacy-card p { margin: 0; color: var(--graphit); font-size: 0.95rem; }

/* Abschluss-Band: tiefes Grün über die volle Breite, mit dem
   Wachsmalstift-Strich als Echo der Abschnittstitel. */
.cta-band {
  background: var(--accent-tief); color: #fdf9f1;
  text-align: center; margin-top: 4.5rem;
}
.cta-band h2 { color: #fff; font-size: 1.5rem; margin: 0 0 0.5rem; }
.cta-band h2::before {
  content: ""; display: block; width: 2.4rem; height: 0.3rem; border-radius: 999px;
  background: var(--wachs); margin: 0 auto 0.9rem; transform: rotate(-1.5deg);
}
.cta-band p { margin: 0 0 1.25rem; color: rgba(253, 249, 241, 0.9); }
.cta-band :focus-visible { outline-color: #fff; }
.btn-invert { background: #fff; color: var(--accent-tief); border-color: #fff; }
.btn-invert:hover { background: var(--papier); border-color: var(--papier); color: var(--accent-tief); }

@media (min-width: 40rem) {
  .paths { grid-template-columns: 1fr 1fr; }
  .privacy-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 51.99rem) {
  /* Auf schmalen Bildschirmen trägt der Handy-Mock den Hero allein. */
  .laptop-mock { display: none; }
}

@media (min-width: 52rem) {
  /* Das Produkt ist der Star: die Geräte bekommen die breitere Spalte. */
  .hero-split { grid-template-columns: 1fr 1.2fr; }
  .step-cards { grid-template-columns: 1fr 1fr 1fr; }
  .hero-visual { max-width: none; padding: 2.5rem 0 3rem; }
  .laptop-mock { margin: 0 2.25rem; }
  .phone-mock {
    position: absolute; right: -0.5rem; bottom: -3.5rem; margin: 0;
    width: 10.5rem; transform: rotate(1.5deg);
  }
  .hero { padding-bottom: 3.5rem; }

  /* Bühne und Bodenschatten: verankern die Geräte, statt sie schweben
     zu lassen. */
  .hero-visual::before {
    content: ""; position: absolute; z-index: -1;
    inset: 0 -7% 1rem -9%;
    background: color-mix(in srgb, var(--accent) 6%, var(--karton));
    border-radius: 26px;
  }
  .hero-visual::after {
    content: ""; position: absolute; z-index: -1;
    left: 0; right: 22%; bottom: 2.1rem; height: 32px;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(43, 41, 36, 0.2), transparent 70%);
  }
  .privacy-grid { grid-template-columns: 1fr 1fr; }
  .landing-section { margin-top: 5.5rem; }
  .band { padding-block: 4rem 4.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead, .hero-actions, .hero-note, .hero-visual {
    animation: hero-in 0.5s ease-out backwards;
  }
  .hero .lead { animation-delay: 0.08s; }
  .hero-actions, .hero-note { animation-delay: 0.16s; }
  .hero-visual { animation-delay: 0.24s; }
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
  /* Der Kringel zeichnet sich nach dem Einblenden der Headline selbst;
     pathLength=100 im SVG macht die Dash-Werte massstabsunabhängig. */
  .kringel-svg path {
    stroke-dasharray: 100; stroke-dashoffset: 100;
    animation: kringel-draw 0.7s ease-out 0.7s forwards;
  }
  @keyframes kringel-draw {
    to { stroke-dashoffset: 0; }
  }
}

/* Einreichen (öffentliche Seite) und Prüfen (Admin) */
.cal-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-start; }
.lead-small { color: var(--graphit); }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--linie); margin: 1.25rem 0 1rem; }
.tab {
  background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -1px;
  padding: 0.55rem 0.8rem; font: inherit; font-weight: 600; color: var(--graphit); cursor: pointer;
}
.tab:hover { color: var(--tinte); }
.tab[aria-selected="true"] { color: var(--tinte); border-bottom-color: var(--accent); }
.ai-box {
  background: var(--karton); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1rem 1.25rem 1.25rem; margin: 1rem 0 1.5rem;
}
.ai-box h2 { margin-top: 0; }
.ai-box .stack { margin-bottom: 0; }
/* Honeypot: für Menschen unsichtbar, für Bots ein normales Feld. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.thanks p { margin: 0.3rem 0; }
.submit-page .breadcrumb a { color: var(--graphit); text-decoration: none; }

.review-list { margin: 1.5rem 0 2rem; }
.review-list h2 { margin-top: 0; }
.review-item, .review-box {
  background: color-mix(in srgb, var(--wachs) 12%, var(--karton));
  border: 1px solid color-mix(in srgb, var(--wachs) 45%, var(--linie));
  border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 0.75rem;
}
.review-box { margin: 1rem 0 1.5rem; }
.review-item h3 { margin: 0 0 0.2rem; font-family: var(--display); font-size: 1.05rem; }
.review-item p, .review-box p { margin: 0.2rem 0; }
.review-item .location::before { content: " · "; }
.review-item .desc { color: var(--graphit); white-space: pre-line; }
.review-meta { color: var(--graphit); font-size: 0.9rem; }
.review-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; margin-top: 0.6rem; }
.badge-link { text-decoration: none; margin-left: 0; }
.badge-link:hover { filter: brightness(0.95); }

/* Team-Zusatz auf der Kalenderseite: eine leise Zeile mit dem Weg zu den
   Einstellungen; das «Team»-Etikett sagt, dass Besucher sie nicht sehen. */
.team-link {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  margin: 0.75rem 0 0; font-size: 0.92rem;
}
.team-link a { color: var(--graphit); text-decoration-color: var(--linie); }
.team-link a:hover { color: var(--accent); }
.team-tag {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--graphit); border: 1px solid var(--linie); border-radius: 999px; padding: 0.08rem 0.5rem;
}
.team-notice { color: var(--accent); font-weight: 600; }
.public-cal .review-list { margin: 1rem 0 0; }
a.chip { text-decoration: none; }
a.chip:hover { filter: brightness(0.9); }

/* Konto-Menü hinter dem Avatar */
.account { position: relative; }
.account summary { list-style: none; cursor: pointer; display: flex; border-radius: 50%; }
.account summary::-webkit-details-marker { display: none; }
.avatar {
  width: 2.15rem; height: 2.15rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-family: var(--display); font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.account summary:hover .avatar { filter: brightness(0.94); }
.account-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 14rem;
  background: var(--karton); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(43, 41, 36, 0.14); padding: 0.4rem; z-index: 60; display: grid;
}
.account-org {
  padding: 0.45rem 0.75rem 0.5rem; margin-bottom: 0.25rem; border-bottom: 1px solid var(--linie);
  color: var(--graphit); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-menu a, .account-menu button {
  display: block; width: 100%; text-align: left; padding: 0.55rem 0.75rem; border-radius: 6px;
  color: var(--tinte); text-decoration: none; font: inherit; background: none; border: none; cursor: pointer;
}
.account-menu a:hover, .account-menu button:hover { background: var(--papier); color: var(--accent); }

@media (max-width: 40rem) {
  .cal-actions { width: 100%; }
  .cal-actions > .btn { flex: 1; text-align: center; }
}

/* Embed */
body.embed { padding: 0.75rem; background: transparent; }
body.embed h1 { font-size: 1.05rem; border-left: 4px solid var(--accent); padding-left: 0.5rem; margin: 0 0 0.5rem; }
.embed-more { font-size: 0.9rem; }

@media (min-width: 40rem) {
  main { padding: 1.5rem 1.5rem 4rem; }
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.8rem; }
  .calendar-cards { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
}

/* Kalenderseite: Ansicht-Umschalter, Tagesliste, Termin-Dialog. Vorbild ist
   die Kinderagaenda-Ansicht (klickbare Termine, Modal, Dreistufen-Hierarchie
   Titel/Meta/Beschreibung), ergänzt um die Gruppierung nach Tagen. */
.view-switch {
  display: inline-flex; gap: 0.2rem; margin: 1.1rem 0 0.25rem;
  background: var(--karton); border: 1px solid var(--linie); border-radius: 999px; padding: 0.2rem;
}
.view-switch a {
  padding: 0.35rem 0.95rem; border-radius: 999px; text-decoration: none;
  color: var(--graphit); font-weight: 600; font-size: 0.92rem;
}
.view-switch a:hover { color: var(--tinte); }
.view-switch a[aria-current] { background: var(--accent); color: #fff; }

.upcoming-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 2rem; }
.upcoming-head h2 { margin: 0; }
.more-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.more-link:hover { text-decoration: underline; }

.event-groups { margin-top: 0.5rem; }
.month-break {
  font-family: var(--display); font-size: 0.85rem; font-weight: 700; color: var(--graphit);
  text-transform: uppercase; letter-spacing: 0.08em; margin: 2rem 0 0;
}
.day-group { margin-top: 1.4rem; }
.day-head {
  display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap;
  font-family: var(--display); font-size: 1.05rem; font-weight: 700; margin: 0 0 0.55rem;
}
.day-head .badge { margin-left: 0; }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ev-link {
  display: grid; grid-template-columns: 5.6rem 1fr; gap: 0.9rem; align-items: start;
  padding: 0.8rem 1rem; background: var(--karton); border: 1px solid var(--linie);
  border-radius: var(--radius); color: inherit; text-decoration: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.ev-link:hover { box-shadow: var(--schatten); border-color: color-mix(in srgb, var(--accent) 45%, var(--linie)); }
.ev-time { display: grid; align-content: start; line-height: 1.3; }
.ev-time strong { color: var(--accent); font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.ev-time .ev-allday { font-size: 0.88rem; }
.ev-time span { color: var(--graphit); font-size: 0.85rem; }
.ev-main { display: grid; gap: 0.2rem; min-width: 0; }
.ev-title { font-weight: 700; font-size: 1.02rem; display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.ev-meta { color: var(--graphit); font-size: 0.9rem; display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.ev-meta svg { width: 0.9rem; height: 0.9rem; flex: none; }
.ev-desc {
  color: var(--graphit); font-size: 0.92rem; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.chip-more { display: none; }
@media (min-width: 40rem) {
  .chip-more { display: block; font-size: 0.72rem; font-weight: 600; color: var(--accent); text-decoration: none; margin-top: 0.15rem; }
  .chip-more:hover { text-decoration: underline; }
}
@media (max-width: 40rem) {
  .ev-link { grid-template-columns: 4.6rem 1fr; gap: 0.7rem; padding: 0.7rem 0.8rem; }
  .view-switch { width: 100%; }
  .view-switch a { flex: 1; text-align: center; }
}

/* Termin-Dialog (nativer <dialog>, per htmx gefüllt) */
.event-dialog {
  border: none; border-radius: 16px; padding: 0; margin: auto;
  width: min(34rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem);
  background: var(--karton); color: var(--tinte);
  box-shadow: 0 24px 60px rgba(43, 41, 36, 0.25);
}
.event-dialog::backdrop { background: rgba(43, 41, 36, 0.35); }
body:has(dialog[open]) { overflow: hidden; }
.event-detail { position: relative; padding: 1.5rem 1.6rem 1.5rem; }
.ed-close { position: absolute; top: 0.55rem; right: 0.6rem; margin: 0; }
.ed-close button {
  background: none; border: none; font: inherit; font-size: 1.7rem; line-height: 1;
  color: var(--graphit); cursor: pointer; padding: 0.2rem 0.55rem; border-radius: 50%;
}
.ed-close button:hover { color: var(--tinte); background: var(--papier); }
.ed-cal {
  margin: 0 0 0.3rem; color: var(--graphit); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.event-detail h2 { margin: 0 2.2rem 0.9rem 0; font-size: 1.5rem; line-height: 1.2; }
.ed-facts { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.ed-facts li { display: flex; gap: 0.65rem; align-items: flex-start; }
.ed-facts svg { width: 1.2rem; height: 1.2rem; flex: none; color: var(--accent); margin-top: 0.15rem; }
.ed-map { margin-left: 0.45rem; font-size: 0.9rem; }
.ed-desc { white-space: pre-line; margin: 0 0 1.25rem; }
.ed-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.ed-edit { margin-left: auto; color: var(--graphit); font-size: 0.9rem; }
.ed-permalink { margin: 1rem 0 0; font-size: 0.82rem; word-break: break-all; }
.event-detail-page .ed-close { display: none; }
.event-detail-page .event-detail { background: var(--karton); border: 1px solid var(--linie); border-radius: var(--radius); }
.event-detail-page .breadcrumb a { color: var(--graphit); text-decoration: none; }
@media (max-width: 40rem) {
  .event-dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 92vh; }
  .event-detail { padding: 1.25rem 1.1rem 1.4rem; }
}
