/* Kursprogramm für Volkshochschulen – Entwurf. Farben und Schriften aus der dioptify-Kursseite:
   tiefes Grün als Bühne, Gelb für die eine Handlung, Grün für Bestätigung; je Kurs eine Kennfarbe. */
:root {
  --tief: #13361f; --tief-2: #0e2a17; --gruen: #1E7A34; --gelb: #F2C200;
  --bg: #f6f7f4; --surface: #ffffff; --surface-2: #eef2ee; --ink: #1d2320; --ink-2: #48534c; --ink-3: #66726a;
  --line: #d6ddd7; --line-2: #c3ccc5; --ok: #1E7A34; --err: #b42318; --warn: #7a5200;
  --ok-bg: #e4f1e7; --warn-bg: #fff4d1; --err-bg: #fdecea;   /* wie im Portal */
  --shadow: 0 1px 2px rgb(19 54 31 / 0.06), 0 12px 32px -14px rgb(19 54 31 / 0.22);
  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --text: 'Source Sans 3', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1411; --surface: #161e19; --surface-2: #1d2721; --ink: #e8ede9; --ink-2: #b4c0b7; --ink-3: #8d9a91;
  --line: #2a352e; --line-2: #3a473f; --ok: #62c07a; --err: #ff8a7a; --warn: #f2c200;
  --ok-bg: #1d2b21; --warn-bg: #2a2410; --err-bg: #2e1a17;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 18px 40px -18px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--text); -webkit-font-smoothing: antialiased; caret-color: var(--gruen); }
body.tray-on { overflow: hidden; }
::selection { background: rgb(242 194 0 / 0.45); color: inherit; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
:focus-visible { outline: 2.5px solid var(--gelb); outline-offset: 2px; border-radius: 6px; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; text-wrap: balance; }
p { margin: 0; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.sprite { position: absolute; }
button { font: inherit; color: inherit; }

/* --------------------------------------------------------------- Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px;
  border: 1.5px solid transparent; border-radius: 999px; font: 700 16px/1 var(--text); text-decoration: none; cursor: pointer;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 160ms ease-out, box-shadow 180ms ease-out;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { cursor: default; opacity: 0.6; transform: none; }
.btn-gelb { background: var(--gelb); color: #1d2320; box-shadow: 0 8px 22px -10px rgb(242 194 0 / 0.75); }
.btn-gelb:hover { background: #ffd21f; box-shadow: 0 12px 28px -10px rgb(242 194 0 / 0.85); }
.btn-gruen { background: var(--gruen); color: #fff; }
.btn-gruen:hover:not(:disabled) { background: #22903d; }
.btn-ghost { border-color: var(--line-2); background: transparent; color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-3); }
.btn-ghost-dark { border-color: rgb(255 255 255 / 0.32); color: #f3f6f2; background: transparent; }
.btn-ghost-dark:hover { border-color: #fff; background: rgb(255 255 255 / 0.06); }
.btn-wide { width: 100%; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color 150ms ease-out, color 150ms ease-out; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }

/* -------------------------------------------------------------- Kopfzeile */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 max(20px, 4vw);
  background: var(--tief-2); color: #f3f6f2; border-bottom: 1px solid rgb(255 255 255 / 0.08);
}
.mark { display: inline-flex; align-items: center; gap: 10px; font: 800 21px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.mark svg { width: 28px; height: 28px; stroke: none; }
.top-nav { display: flex; gap: 4px; margin-left: 12px; }
.top-nav a { padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15.5px; color: #c9d6cc; text-decoration: none; }
.top-nav a:hover { color: #fff; background: rgb(255 255 255 / 0.07); }
.top-act { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top .icon-btn { color: #c9d6cc; }
.top .icon-btn:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.tray-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--gelb); color: #1d2320; font-weight: 700; cursor: pointer;
}
.tray-btn b { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--tief); color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tray-btn.bump { animation: bump 520ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes bump { 30% { transform: scale(1.12); } }

/* ------------------------------------------------------------------ Bühne */
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center;
  gap: 24px; min-height: min(760px, calc(100svh - 64px)); padding: 56px max(20px, 4vw) 48px; background: var(--tief); color: #f3f6f2;
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 72% 48%, rgb(98 192 122 / 0.22), transparent 70%), linear-gradient(180deg, transparent 60%, rgb(14 42 23 / 0.75)); }
.facets { stroke: rgb(255 255 255 / 0.06); stroke-width: 0.6; }
.hero .facets { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; }
.hero-text { max-width: 620px; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.75rem); font-weight: 800; line-height: 0.98; letter-spacing: -0.035em; }
.lede { margin-top: 22px; max-width: 54ch; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: #d3ded6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-who { margin-top: 34px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 0.14); max-width: 60ch; font-size: 14.5px; color: #a9bbad; }
.hero-orbs { margin: 0; position: relative; height: clamp(380px, 52vw, 620px); }
.hero-orbs canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; --fx-text: #eef3ef; --fx-dim: #a9bbad; --fx-line: rgb(220 255 230 / 0.12); --fx-mode: dark; }
/* Umschalter Kugeln/Sphäre und Zoom, als Glas auf der grünen Bühne */
.viz-bar { position: absolute; z-index: 2; top: 4px; right: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.viz-bar .seg-dark, .viz-bar .zoom { background: rgb(8 24 13 / 0.55); border: 1px solid rgb(255 255 255 / 0.14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.viz-bar .seg-dark button { color: #b9c9bd; }
.viz-bar .seg-dark button:hover:not(:disabled) { color: #fff; }
.viz-bar .seg-dark button[aria-checked="true"] { background: rgb(255 255 255 / 0.14); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); }
.zoom { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; }
.zoom button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #d3ded6; cursor: pointer; transition: background-color 150ms ease-out, color 150ms ease-out; }
.zoom button:hover { background: rgb(255 255 255 / 0.1); color: #fff; }
.zoom button:active { background: rgb(255 255 255 / 0.16); }
.hero-orbs figcaption { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 13.5px; color: #a9bbad; pointer-events: none; }

/* ---------------------------------------------------------- Abschnitte */
main > section:not(.hero) { padding: 88px max(20px, 4vw) 0; max-width: 1360px; margin: 0 auto; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 28px; }
.sec-head h2, .planung h2 { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; }
.sec-head p { max-width: 58ch; color: var(--ink-2); }

/* ------------------------------------------------------------ Kursbühne */
.stage { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.rail { position: sticky; top: 84px; min-width: 0; }
.rail-btn { display: none; }
.spines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.spine {
  width: 100%; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 12px 14px; text-align: left;
  border: 1px solid transparent; border-radius: var(--r); background: transparent; cursor: pointer;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, box-shadow 180ms ease-out;
}
.spine:hover { background: var(--surface); border-color: var(--line); }
.spine[aria-selected="true"] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.sp-text b { display: block; font: 700 17px/1.25 var(--display); letter-spacing: -0.01em; }
.sp-text small { display: block; margin-top: 3px; font-size: 14px; color: var(--ink-3); }
.tile { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); transition: background-color 200ms ease-out, color 200ms ease-out; }
[data-theme="light"] .tile { color: color-mix(in srgb, var(--c) 72%, #1d2320); }
.tile svg { width: 22px; height: 22px; }
.spine[aria-selected="true"] .tile { background: var(--c); color: #1d2320; }

.course {
  position: relative; isolation: isolate; overflow: hidden; padding: clamp(24px, 3.4vw, 44px); border: 1px solid var(--line); border-radius: 22px;
  background: var(--surface); box-shadow: var(--shadow); animation: course-in 420ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes course-in { from { opacity: 0.4; transform: translateY(6px); filter: blur(3px); } }
.course .facets { position: absolute; z-index: -1; top: 0; right: 0; width: min(62%, 560px); height: auto; -webkit-mask: linear-gradient(225deg, #000 30%, transparent 80%); mask: linear-gradient(225deg, #000 30%, transparent 80%); }
.course-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tile.big { width: 60px; height: 60px; border-radius: 16px; background: var(--c); color: #1d2320; box-shadow: 0 12px 26px -12px var(--c); }
.tile.big svg { width: 30px; height: 30px; stroke-width: 1.6; }
.levels { display: flex; gap: 6px; flex-wrap: wrap; }
.lvl { padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.course h3 { margin-top: 22px; max-width: 24ch; font-size: clamp(1.75rem, 3vw, 2.6rem); font-weight: 750; line-height: 1.06; letter-spacing: -0.028em; }
.format { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--ink-2); font-weight: 600; }
.format svg { color: var(--ink-3); }

.ue-strip { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 26px; }
.ue-day { display: grid; gap: 6px; justify-items: start; }
.ue-blocks { display: flex; gap: 4px; }
.ue-blocks i { width: 22px; height: 22px; border-radius: 6px; background: var(--c); box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.12); }
.ue-day small { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.path { margin-top: 34px; max-width: 62ch; }
.path h4 { font-size: 15px; font-weight: 700; color: var(--ink-3); margin-bottom: 10px; }
.path ol { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.path li { position: relative; padding: 0 0 16px 46px; counter-increment: s; font-size: 17px; }
.path li::before {
  content: counter(s); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 18%, var(--surface)); border: 1.5px solid var(--c); font: 700 14px/1 var(--display); font-variant-numeric: tabular-nums;
}
.path li:not(:last-child)::after { content: ""; position: absolute; left: 14.5px; top: 31px; bottom: 1px; width: 1.5px; background: color-mix(in srgb, var(--c) 45%, transparent); }
.note { margin-top: 8px; max-width: 62ch; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); }
.people { margin-top: 28px; max-width: 62ch; }
.people h4 { font-size: 15px; font-weight: 700; color: var(--ink-3); margin-bottom: 10px; }
.people ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.people small { font-size: 14px; color: var(--ink-3); }
.people li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; }
.people img, .people .initial { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--c); }
.people .initial { display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, var(--surface)); font: 700 22px/1 var(--display); }
.people b { display: block; font: 700 17px/1.3 var(--display); }
.people p { margin-top: 2px; color: var(--ink-2); }
.course-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }

/* ------------------------------------------------ Suche und Ansichten */
.finder { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: -6px 0 24px; }
.find { position: relative; flex: 1 1 260px; max-width: 440px; }
.find svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.find input { width: 100%; min-height: 46px; padding-left: 42px; border-radius: 12px; background: var(--surface); }
.find-msg { flex-basis: 100%; margin: 0; font-size: 15px; color: var(--ink-3); }
.find-msg:empty { height: 0; margin-top: -12px; overflow: hidden; }   /* leer im Fluss lassen: sonst sagt der Screenreader die erste Meldung nicht an */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: 600 14.5px/1 var(--text); cursor: pointer; transition: border-color 160ms ease-out, background-color 160ms ease-out;
}
.chip:hover { border-color: var(--c, var(--ink-3)); background: color-mix(in srgb, var(--c, var(--ink-3)) 8%, var(--surface)); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.chip svg { width: 15px; height: 15px; color: var(--ink-3); }
.chip small { font-size: 13px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.topics { margin-top: 16px; }
.persp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.person { display: grid; gap: 14px; align-content: start; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.person-head { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; }
.person img, .person .initial { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--line-2); }
.person .initial { display: grid; place-items: center; background: var(--surface-2); font: 700 22px/1 var(--display); }
.person h3 { font: 700 19px/1.25 var(--display); letter-spacing: -0.01em; }
.person p { color: var(--ink-2); font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.persp-note { margin-top: 16px; font-size: 15px; color: var(--ink-3); }
.cloud { gap: 8px; }
.cloud .chip { min-height: 40px; padding: 0 16px; font-size: 16px; }
.people .who-btn { padding: 0; border: 0; background: none; color: inherit; font: 700 17px/1.3 var(--display); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.people .who-btn:hover { text-decoration-color: var(--ink-3); }
.act-note { font-size: 14.5px; color: var(--ink-3); }

/* ------------------------------------------------------------- Planer */
.planner {
  display: grid; grid-template-columns: minmax(230px, 280px) minmax(0, 1fr); grid-template-areas: "ctl ctl" "sug cal" "thr thr";
  gap: 24px 28px; padding: clamp(18px, 2.6vw, 32px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow);
}
.controls { grid-area: ctl; display: flex; flex-wrap: wrap; align-items: end; gap: 16px 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
#plz-field { position: relative; }
#p-plz { width: 9.5em; font-variant-numeric: tabular-nums; }
.plz-msg { position: absolute; top: 100%; left: 0; width: max-content; max-width: 22rem; margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }
.plz-msg.err { color: var(--err); font-weight: 600; }
select, input, textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
select { min-width: 260px; padding-right: 36px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: right 18px top 50%, right 13px top 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 3px rgb(30 122 52 / 0.18); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font-weight: 600; cursor: pointer; transition: background-color 160ms ease-out, color 160ms ease-out, box-shadow 160ms ease-out; }
.seg button svg { width: 17px; height: 17px; }
.seg button:hover:not(:disabled) { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12), 0 0 0 1px var(--line); }
.seg button:disabled { opacity: 0.45; cursor: not-allowed; }

.suggest { grid-area: sug; }
.suggest h3, .month h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.suggest-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sug { width: 100%; display: grid; gap: 2px; padding: 12px 14px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; transition: border-color 160ms ease-out, background-color 160ms ease-out, transform 160ms ease-out; }
.sug:hover { border-color: var(--line-2); transform: translateX(2px); }
.sug.on { border-color: var(--gruen); background: color-mix(in srgb, var(--gruen) 9%, var(--surface)); }
.sug b { font-weight: 700; }
.sug small { font-size: 14px; color: var(--ink-3); }
.suggest-list .none { font-size: 15px; color: var(--ink-3); }

.cal-wrap { grid-area: cal; min-width: 0; }
.cal-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-nav p { flex: 1; text-align: center; font-weight: 600; color: var(--ink-2); }
.months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.month h3 { margin-bottom: 10px; }
.dow, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow span { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding-bottom: 4px; }
.day { position: relative; aspect-ratio: 1 / 0.92; display: grid; place-items: center; border-radius: 10px; font-variant-numeric: tabular-nums; }
.day .num { font-size: 15px; }
.day .mark { position: absolute; bottom: 5px; font: 800 11px/1 var(--display); }
.day.off { color: var(--ink-3); opacity: 0.55; }
.day.off.hol, .day.holiday { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--ink-3) 16%, transparent) 5px 6.5px); }
.day.holiday { color: var(--ink-3); }
.day.out { color: var(--ink-3); opacity: 0.4; }
.day.taken { color: var(--ink-3); }
.day.taken .num { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 70%, transparent); }
button.day { border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; padding: 0; transition: transform 140ms ease-out, background-color 140ms ease-out, border-color 140ms ease-out; }
.day.slot .num { transform: translateY(-3px); }
button.day.free::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
button.day:hover { border-color: var(--ok); transform: translateY(-1px); }
/* angefragt: von einer anderen VHS vorgemerkt, nicht fest; Warteliste möglich */
button.day.held:not(.pick) { background: repeating-linear-gradient(135deg, var(--bg) 0 5px, color-mix(in srgb, var(--gelb) 22%, var(--bg)) 5px 7px); color: var(--ink-2); }
button.day.held:not(.pick)::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; border: 1.5px solid var(--gelb); }
button.day.held:hover { border-color: var(--gelb); }
.day.ghost { border: 1.5px dashed var(--c, var(--ok)); background: color-mix(in srgb, var(--c, var(--ok)) 10%, var(--bg)); }
.day.ghost::after, .day.pick::after { display: none; }
.day.ghost .mark { color: var(--ink-2); }
.day.pick { background: var(--c, var(--gelb)); border-color: transparent; color: #1d2320; font-weight: 700; box-shadow: 0 6px 14px -8px var(--c, var(--gelb)); }
.day.pick .mark { color: #1d2320; }
.day.gap { outline: 1.5px dashed var(--c); outline-offset: -2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-3); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.lg { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-2); }
.lg.free { background: var(--bg); position: relative; }
.lg.free::after { content: ""; position: absolute; inset: 0; margin: auto; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.lg.taken { background: linear-gradient(transparent 45%, var(--ink-3) 45% 58%, transparent 58%); }
.lg.holiday { background: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--ink-3) 40%, transparent) 3px 4.5px); }
.lg.pick { background: var(--c, var(--gelb)); border-color: transparent; }
.lg.held { background: repeating-linear-gradient(135deg, var(--bg) 0 3px, color-mix(in srgb, var(--gelb) 45%, var(--bg)) 3px 4.5px); }

/* Perlenkette der gewählten Reihe */
.thread { grid-area: thr; padding: 22px clamp(16px, 2vw, 24px); border-radius: 16px; background: var(--surface-2); }
.thread-empty { display: flex; align-items: center; gap: 10px; color: var(--ink-3); }
.thread-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.thread-head h3 { font-size: 22px; font-weight: 750; letter-spacing: -0.02em; }
.thread-head p { margin-top: 2px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.thread-head .who { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 600; color: var(--ink); }
.thread-head .who img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.beads { list-style: none; display: flex; flex-wrap: wrap; gap: 18px 0; margin: 22px 0 0; padding: 0; }
.bead { position: relative; display: grid; justify-items: center; gap: 3px; width: 88px; text-align: center; animation: bead-in 480ms cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.bead:nth-child(2) { animation-delay: 50ms; } .bead:nth-child(3) { animation-delay: 100ms; } .bead:nth-child(4) { animation-delay: 150ms; }
.bead:nth-child(5) { animation-delay: 200ms; } .bead:nth-child(6) { animation-delay: 250ms; } .bead:nth-child(n+7) { animation-delay: 300ms; }
@keyframes bead-in { from { opacity: 0; transform: translateY(8px) scale(0.92); } }
.bead:not(:first-child)::before { content: ""; position: absolute; z-index: 0; top: 18px; right: 50%; width: 100%; height: 2px; background: color-mix(in srgb, var(--c) 55%, transparent); }
.bead .dot { position: relative; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: #1d2320; font: 800 15px/1 var(--display); box-shadow: 0 0 0 4px var(--surface-2), 0 8px 18px -8px var(--c); }
.bead b { font-size: 15px; font-variant-numeric: tabular-nums; }
.bead small { font-size: 12.5px; color: var(--ink-3); line-height: 1.25; }
.bead.skip .dot { background: var(--surface-2); border: 2px dashed color-mix(in srgb, var(--c) 70%, var(--ink-3)); box-shadow: 0 0 0 4px var(--surface-2); width: 30px; height: 30px; margin: 4px 0; }
.bead.skip b { color: var(--ink-3); font-weight: 600; }
.bead.held .dot { background: repeating-linear-gradient(135deg, var(--c) 0 5px, color-mix(in srgb, var(--c) 55%, var(--surface-2)) 5px 8px); }
.bead.held small { color: var(--ink-2); font-weight: 600; }
.bead.skip::before { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent) 0 6px, transparent 6px 11px); }
/* Hinweise im Planer und in der Anfrage, wie die Meldungen im Portal: todo (es fehlt noch etwas),
   err (so geht es nicht), info (gut zu wissen). Im Planer direkt unter dem Kopf der Reihe, neben dem Knopf. */
.notice {
  --n: var(--ok); display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 13px 14px 13px 16px;
  border: 1px solid color-mix(in srgb, var(--n) 30%, transparent); border-radius: 12px; background: var(--ok-bg); color: var(--ink);
}
.notice.todo { --n: var(--warn); background: var(--warn-bg); }
.notice.err { --n: var(--err); background: var(--err-bg); }
.notice > svg { width: 20px; height: 20px; margin-top: 1px; color: var(--n); stroke-width: 1.9; }
.notice-text { flex: 1; min-width: 0; }
.notice-text b { display: block; font-weight: 700; line-height: 1.35; }
.notice-text p { max-width: 68ch; color: var(--ink-2); line-height: 1.45; }
.notice-text b + p { margin-top: 2px; }
.notice-btn {
  align-self: center; flex: none; min-height: 36px; padding: 0 15px; border: 1px solid color-mix(in srgb, var(--n) 45%, var(--line-2));
  border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 14.5px/1 var(--text); cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.notice-btn:hover { border-color: var(--n); background: color-mix(in srgb, var(--n) 10%, var(--surface)); }
.notice-btn:focus-visible { outline: 2px solid var(--n); outline-offset: 2px; }
.notice.flash { animation: notice-in 320ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes notice-in { from { opacity: 0; transform: translateY(-6px); } }
.thread-head + .notice { margin-top: 18px; }
.notice + .notice { margin-top: 10px; }
.notice + .beads { margin-top: 26px; }
.load-err { margin-top: 14px; }
@media (max-width: 560px) { .notice { flex-wrap: wrap; } .notice-text { flex-basis: calc(100% - 32px); } .notice-btn { margin-left: 32px; } }
/* PLZ fehlt: das Feld zeigt, wo es weitergeht */
#plz-field.fehlt input { border-color: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
#plz-field.fehlt > label { color: var(--warn); }

/* --------------------------------------------------------------- Rahmen */
.planung { padding-bottom: 96px !important; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 22px 24px 22px 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts dt { display: flex; align-items: center; gap: 8px; font: 700 18px/1.2 var(--display); }
.facts dt svg { color: var(--ok); }
.facts dd { margin: 8px 0 0; color: var(--ink-2); }
.how { margin-top: 24px; max-width: 70ch; font-size: 18px; color: var(--ink-2); }

.foot { padding: 28px max(20px, 4vw) 40px; background: var(--tief-2); color: #a9bbad; font-size: 15px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot a { color: #e8ede9; }

/* -------------------------------------------------------------- Anfrage */
.scrim { position: fixed; inset: 0; z-index: 30; background: rgb(8 20 12 / 0.45); animation: fade 200ms ease-out; }
@keyframes fade { from { opacity: 0; } }
.tray {
  position: fixed; z-index: 31; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: -24px 0 60px -30px rgb(0 0 0 / 0.5); animation: tray-in 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes tray-in { from { transform: translateX(40px); opacity: 0; } }
.tray-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.tray-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.tray-body { flex: 1; overflow: auto; padding: 18px 20px calc(24px + env(safe-area-inset-bottom)); display: grid; align-content: start; gap: 16px; }
.tray-empty { color: var(--ink-3); }
.tray-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tray-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.tray-list b { display: block; font: 700 16px/1.25 var(--display); }
.tray-list small { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.tray-list .dates { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tray-sum { font-weight: 700; font-variant-numeric: tabular-nums; }
.tray-form { display: grid; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); }
.tray-form textarea { resize: vertical; }
.tray-form .notice { margin-top: 0; }
.tray-form .notice-text p { color: var(--ink); font-weight: 600; font-size: 15px; }
.tray-done h3 { font-size: 20px; font-weight: 750; }
.tray-done > p { margin-top: 6px; color: var(--ink-2); }
.tray-done pre { margin: 14px 0 0; padding: 14px; border-radius: 12px; background: var(--surface-2); font: 14px/1.5 ui-monospace, 'SF Mono', Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.tray-done .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.copied { min-height: 1.3em; margin-top: 8px; color: var(--ok); font-weight: 600; }

/* ------------------------------------------------------------ Responsiv */
@media (max-width: 1100px) {
  .months { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; }
  .hero-orbs { height: 420px; margin: 0 calc(-1 * max(20px, 4vw)); }
  .viz-bar { right: max(20px, 4vw); left: max(20px, 4vw); justify-content: space-between; }
  .stage { grid-template-columns: 1fr; }
  .rail { position: relative; top: auto; }
  .spines { display: flex; overflow-x: auto; gap: 8px; padding: 2px 0 6px; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
  .rail.scrolls .spines { cursor: grab; -webkit-mask: linear-gradient(90deg, transparent, #000 var(--fs, 0px), #000 calc(100% - var(--fe, 0px)), transparent); mask: linear-gradient(90deg, transparent, #000 var(--fs, 0px), #000 calc(100% - var(--fe, 0px)), transparent); }
  .rail.scrolls:not(.at-start) { --fs: 56px; }
  .rail.scrolls:not(.at-end) { --fe: 56px; }
  .rail.dragging .spines { cursor: grabbing; scroll-snap-type: none; user-select: none; }
  .rail.dragging .spine { pointer-events: none; }
  .rail.scrolls .rail-btn {
    position: absolute; z-index: 2; top: calc(50% - 22px); width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
    border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer;
    transition: opacity 180ms ease-out, transform 180ms ease-out;
  }
  .rail-btn.prev { left: -6px; }
  .rail-btn.next { right: -6px; }
  .rail-btn:hover { transform: scale(1.06); }
  .rail.at-start .rail-btn.prev, .rail.at-end .rail-btn.next { opacity: 0; pointer-events: none; }
  @media (hover: none) { .rail.scrolls .rail-btn { display: none; } }
  .spines::-webkit-scrollbar { display: none; }
  .spines li { flex: none; scroll-snap-align: start; }
  .spine { width: auto; grid-template-columns: 40px auto; padding: 10px 14px 10px 10px; background: var(--surface); border-color: var(--line); }
  .spine .tile { width: 40px; height: 40px; }
  .spine[aria-selected="true"] { box-shadow: 0 2px 6px -3px rgb(0 0 0 / 0.25); border-color: color-mix(in srgb, var(--c) 65%, var(--line)); }
  .sp-text small { display: none; }
  .planner { grid-template-columns: 1fr; grid-template-areas: "ctl" "sug" "cal" "thr"; }
  .suggest-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { gap: 10px; height: 58px; }
  .top-nav { display: none; }
  .tray-btn span { display: none; }
  .tray-btn { padding: 0 12px; }
  html { scroll-padding-top: 66px; }
  main > section:not(.hero) { padding-top: 64px; }
  .controls { display: grid; }
  select { min-width: 0; width: 100%; }
  .seg { display: flex; }
  .finder .seg { flex: 1 1 100%; }
  .seg button { flex: 1; justify-content: center; }
  .day .num { font-size: 14px; }
  .planner { padding: 16px 12px; }
  .dow, .grid { gap: 3px; }
  .day { aspect-ratio: auto; min-height: 44px; }
  .seg button { height: 44px; }
  .viz-bar .seg { display: inline-flex; }
  .viz-bar .seg button { flex: none; height: 40px; }
  .zoom button { width: 40px; height: 40px; }
  .foot a { display: inline-block; padding: 10px 0; }
  .cal-nav p { font-size: 15px; }
  .bead { width: 74px; }
  .facts { grid-template-columns: 1fr; }
  .facts div, .facts div + div { padding: 18px 0; border-left: 0; }
  .facts div + div { border-top: 1px solid var(--line); }
  .tray { width: 100vw; border-left: 0; }
}
