/*
 * CMS: redaktionelle Optik „hp-editorial“ (Papier, Montserrat 300, große
 * Headlines, <em> in Vereinsfarbe), alle Baustein-Typen, Seiten-Editor,
 * Rechtstexte und Vereinseinstellungen.
 *
 *   1. Editorial-Grundlagen      6. Monats-Slider, Polygon, Foto der Woche
 *   2. Text-Bausteine            7. Editorial-Sonderformen (Marathon, FAQ …)
 *   3. Bild-Bausteine            8. Teaser (Historie, Termine)
 *   4. Karussells                9. Seiten-Editor
 *   5. Karten                   10. Rechtstexte, Vereinsverwaltung, Druck
 */

/* 1. Editorial-Grundlagen ---------------------------------------------------- */
.hp-editorial {
  --hp-ink: #2d2d35;
  --hp-ink-2: #3d3d46;
  --hp-paper: #f2f0eb;
  --hp-paper-2: #e9e6df;
  --hp-dark: #24242b;
  --hp-line: rgba(45, 45, 53, .18);
  --hp-pad: clamp(24px, 5.5vw, 90px);
  --hp-display: var(--font-editorial);
  --hp-accent: var(--club-primary-text);
  /* Abgesetzte Fläche (Banner, Stimmen, Jugend-Karten): hell, leicht in Vereinsfarbe
     getönt – im Dunkelmodus dunkel. --hp-band-icon: Filter der (weißen) Bootstrap-Pfeile. */
  --hp-band: color-mix(in srgb, var(--club-primary) 9%, #fbfaf7);
  --hp-band-line: rgba(var(--club-primary-rgb), .28);
  --hp-band-icon: invert(1) grayscale(1);
  background: var(--hp-paper);
  color: var(--hp-ink);
  font-family: var(--hp-display);
  font-weight: 300;
}
[data-bs-theme="dark"] .hp-editorial {
  --hp-ink: #ececf1;
  --hp-ink-2: #c9c9d3;
  --hp-paper: #18181b;
  --hp-paper-2: #222227;
  --hp-line: rgba(255, 255, 255, .16);
  --hp-band: var(--hp-dark);
  --hp-band-line: rgba(255, 255, 255, .14);
  --hp-band-icon: none;
}
.hp-editorial p, .hp-editorial li { font-family: var(--hp-display); font-weight: 300; }
.hp-editorial .page-section { padding: clamp(4.5rem, 9vw, 8.5rem) 0; }
.hp-editorial h2,
.hp-editorial .cms-page-title,
.hp-editorial .hp-headline-text-title {
  font-family: var(--hp-display);
  font-size: clamp(2.35rem, 6.2vw, 5.6rem);
  font-weight: 300;
  letter-spacing: -.065em;
  line-height: .92;
  color: var(--hp-ink);
  margin-bottom: 1.5rem;
}
.hp-editorial h2 em, .hp-editorial .cms-page-title em {
  color: var(--hp-accent);
  font-style: normal;
  font-weight: 600;
}
/* Dunkelmodus: Hervorhebung weiß (--hp-accent = --club-primary-text), Akzent als Unterstreichung */
[data-bs-theme="dark"] .hp-editorial h2 em,
[data-bs-theme="dark"] .hp-editorial .cms-page-title em {
  text-decoration: underline;
  text-decoration-color: var(--club-accent-line);
  text-decoration-thickness: .06em;
  text-underline-offset: .12em;
}
.hp-editorial h3 { font-family: var(--hp-display); font-weight: 500; letter-spacing: -.02em; }
.hp-editorial p { font-size: 1.02rem; line-height: 1.8; color: var(--hp-ink-2); }
.hp-editorial .hp-overline,
.hp-editorial .hp-teaser-panel-title {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--hp-accent);
  margin-bottom: 1rem;
}
.hp-editorial .btn {
  border-radius: 2px;
  font-family: var(--hp-display);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .72rem;
  padding: .95rem 1.2rem;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.hp-editorial .btn-lg, .hp-editorial .btn-xl { padding: 1.1rem 1.35rem; }
.hp-editorial .btn-primary { box-shadow: 0 12px 32px rgba(var(--club-primary-rgb), .24); }
.hp-editorial .btn-primary:hover, .hp-editorial .btn-primary:focus-visible {
  background: #fff; color: #2d2d35; border-color: #fff; transform: translateY(-2px);
}
.hp-editorial .page-section.bg-dark { background: var(--hp-dark) !important; }
.hp-editorial .page-section.bg-dark h2,
.hp-editorial .page-section.bg-primary h2 { color: #fff; }
.hp-editorial .page-section.bg-primary h2 { color: var(--club-on-primary); }
.hp-editorial .page-section.bg-primary p { color: var(--club-on-primary); opacity: .92; font-size: 1.05rem; }
.hp-editorial .hp-divider { width: 4rem; margin: 1.5rem auto; border-top: 3px solid currentColor; opacity: .7; }

.cms-page-header { padding: clamp(2.5rem, 6vw, 5rem) 0 0; }
.cms-page-title { margin: 0; }
.cms-edit-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1030;
  box-shadow: var(--elevation-2);
}
@media (max-width: 575.98px) { .cms-edit-fab span { display: none; } }

.hp-hero-slider-section.is-under-nav,
.hp-month-slider-section.is-under-nav { margin-top: 0; }

/* 2. Text-Bausteine ------------------------------------------------------------ */
.hp-headline-text-paragraph:first-of-type {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.55;
  color: var(--hp-ink);
}
.hp-headline-text-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.hp-headline-text-list li {
  position: relative;
  padding: .55rem 0 .55rem 1.6rem;
  border-top: 1px solid var(--hp-line);
}
.hp-headline-text-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: .55rem;
  height: .55rem;
  background: var(--club-primary);
}
.hp-text-row-media img, .hp-headline-text-media img { width: 100%; height: auto; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45); }
.hp-headline-gallery-caption { font-size: .85rem; margin-top: .75rem; color: var(--hp-ink-2); }
/* Bildergalerie eines Eintrags: Wisch-Karussell (scroll-snap, cms-modules.js),
   Pfeile, Punkte; Klick öffnet die Lightbox. Bilder ganz sichtbar (contain),
   Schatten folgt dem Bild (drop-shadow statt box-shadow). */
.hp-hgal { position: relative; container-type: inline-size; }
.hp-hgal-track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  outline-offset: 4px;
}
.hp-hgal-track::-webkit-scrollbar { display: none; }
.hp-hgal-track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.hp-hgal-track.is-dragging a { cursor: grabbing; }
.hp-hgal-slide { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.hp-hgal-frame { aspect-ratio: var(--hp-hgal-ratio, 1.5); display: flex; }
.hp-hgal-frame > a { display: block; flex: 1; min-width: 0; }
.hp-headline-text-media .hp-hgal-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: none;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .28));
  -webkit-user-drag: none;
}
.hp-hgal-slide .hp-headline-gallery-caption { text-align: center; padding-inline: .5rem; }
.hp-hgal-nav {
  position: absolute;
  top: calc(50cqw / var(--hp-hgal-ratio, 1.5));
  translate: 0 -50%;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.15rem;
  transition: opacity .2s ease, background-color .2s ease;
}
.hp-hgal-nav:hover { background: rgba(0, 0, 0, .7); }
.hp-hgal-nav:focus-visible { outline: 2px solid var(--club-primary); outline-offset: 2px; }
.hp-hgal-nav:disabled { opacity: 0; pointer-events: none; }
.hp-hgal-prev { left: .5rem; }
.hp-hgal-next { right: .5rem; }
@media (hover: none) { .hp-hgal-nav { width: 2.25rem; height: 2.25rem; font-size: 1rem; background: rgba(0, 0, 0, .35); } }
.hp-hgal-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem; margin-top: .75rem; }
.hp-hgal-dot {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hp-hgal-dot::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--hp-ink);
  opacity: .25;
  transition: opacity .2s ease, transform .2s ease;
}
.hp-hgal-dot.is-active::before { opacity: .9; transform: scale(1.25); }
.hp-hgal-dot:focus-visible { outline: 2px solid var(--club-primary); outline-offset: -2px; }
.hp-hgal-count { margin: .75rem 0 0; text-align: center; font-size: .85rem; color: var(--hp-ink-2); }
@media (prefers-reduced-motion: reduce) { .hp-hgal-dot::before, .hp-hgal-nav { transition: none; } }
.hp-heading-section h2 { margin-bottom: 0; }
.hp-editorial .hp-band { background: var(--hp-band); color: var(--hp-ink); border-block: 1px solid var(--hp-band-line); }
.hp-editorial .hp-band h2 { color: var(--hp-ink); }
.hp-band-accent { display: block; width: 4rem; height: 3px; margin: 0 auto 2rem; background: var(--club-primary); }
[data-bs-theme="dark"] .hp-band-accent { background: var(--club-accent-line); }
.hp-cta-dark--sm h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.hp-cta-dark--lg h2 { font-size: clamp(2.6rem, 7.5vw, 6.5rem); }

/* Historie als Zeitstrahl: Einträge abwechselnd links/rechts (data-hp-align setzt
   headline_text.twig fortlaufend), mittige Linie mit Punkt; mobil einspaltig. */
.hp-history-timeline .hp-headline-text-section { position: relative; padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.hp-history-timeline .hp-headline-text-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--hp-line);
}
.hp-history-timeline .hp-headline-text-section::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: .9rem;
  height: .9rem;
  margin: -.45rem 0 0 -.45rem;
  border-radius: 50%;
  background: var(--club-primary);
  box-shadow: 0 0 0 .35rem var(--hp-paper), 0 0 0 calc(.35rem + 1px) var(--hp-line);
}
.hp-history-timeline .hp-headline-text-section .container { position: relative; z-index: 1; }
.hp-history-timeline .hp-headline-text-title { font-size: clamp(2rem, 4.5vw, 3.6rem); }
@media (min-width: 768px) {
  /* Text zur Linie hin etwas Luft, Bild mit leichter Rundung an der Außenkante */
  .hp-history-timeline [data-hp-align="left"] .hp-headline-text-copy { padding-right: clamp(1rem, 3vw, 3rem); }
  .hp-history-timeline [data-hp-align="right"] .hp-headline-text-copy { padding-left: clamp(1rem, 3vw, 3rem); }
}
@media (max-width: 767.98px) {
  .hp-history-timeline .hp-headline-text-section::before { left: 1.25rem; }
  .hp-history-timeline .hp-headline-text-section::after { left: 1.25rem; top: clamp(2.5rem, 5vw, 4.5rem); margin-top: .9rem; }
  .hp-history-timeline .hp-headline-text-section .container { padding-left: 3rem !important; }
}
.cms-lightbox-link { display: block; cursor: zoom-in; }
.cms-lightbox-link:focus-visible { outline-offset: 4px; }

/* 3. Bild-Bausteine ------------------------------------------------------------- */
.hp-portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.hp-portfolio-tile { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--hp-paper-2); }
.hp-portfolio-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.hp-portfolio-tile:hover img { transform: scale(1.06); }
.hp-portfolio-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 1rem .9rem;
  color: #fff;
  font-weight: 500;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
  pointer-events: none;
}

.hp-compare {
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  max-height: 85vh;
  background: var(--hp-paper-2);
}
.hp-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.hp-compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--hp-compare-pos, 32%)) 0 0); }
.hp-compare-after { position: absolute; inset: 0; }
.hp-compare.is-animating .hp-compare-before { transition: clip-path .7s cubic-bezier(.76, 0, .24, 1); }
.hp-compare.is-animating .hp-compare-handle { transition: left .7s cubic-bezier(.76, 0, .24, 1); }
.hp-compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--hp-compare-pos, 32%);
  width: 2px;
  background: #fff;
  transform: translateX(-1px);
  pointer-events: none;
}
.hp-compare-handle i {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #fff;
  color: #2d2d35;
  transform: translate(-50%, -50%) rotate(90deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.hp-compare-label {
  position: absolute;
  top: 1rem;
  padding: .35rem .7rem;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.hp-compare-label--before { left: 1rem; }
.hp-compare-label--after { right: 1rem; }
.hp-compare-range { position: absolute; inset: auto 0 0 0; width: 100%; opacity: 0; height: 2.5rem; cursor: ew-resize; }
.hp-compare-range:focus-visible { opacity: .9; }
.hp-compare-subtitle { max-width: 40rem; margin-inline: auto; }

/* 4. Karussells -------------------------------------------------------------- */
.hp-hero-slider-frame { position: relative; height: clamp(26rem, 88vh, 64rem); overflow: hidden; background: #111; }
.is-under-nav .hp-hero-slider-frame { height: 100vh; height: 100svh; }
.hp-hero-slider-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); will-change: transform; }
.hp-hero-slider-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, transparent 35%, rgba(0, 0, 0, .55) 100%); }
.hp-hero-slider-copy {
  position: absolute;
  left: var(--hp-pad, 2rem);
  right: var(--hp-pad, 2rem);
  bottom: clamp(3rem, 10vh, 7rem);
  color: #fff;
  max-width: 60rem;
}
.hp-editorial .hp-hero-slider-title { color: inherit; font-size: clamp(2.5rem, 7vw, 6.4rem); margin-bottom: .75rem; }
.hp-editorial .hp-hero-slider-subtitle { color: inherit; opacity: .9; font-size: clamp(1rem, 1.6vw, 1.35rem); }
[data-hp-text-style="dark"] .hp-hero-slider-copy { color: #1c1b1f; }
[data-hp-text-style="dark"] .hp-hero-slider-scrim { background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .55)); }
.carousel-item.active .hp-hero-slider-copy { animation: hp-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes hp-rise { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }

.hp-testimonials-section { background: var(--hp-band); color: var(--hp-ink); }
.hp-editorial .hp-testimonials-title { color: var(--hp-ink); }
.hp-editorial .hp-testimonials { --bs-carousel-control-icon-filter: var(--hp-band-icon); }
.hp-testimonial-quote::before { content: ""; display: block; width: 3rem; height: 3px; margin: 0 auto 1.5rem; background: var(--club-primary); }
[data-bs-theme="dark"] .hp-testimonial-quote::before { background: var(--club-accent-line); }
.hp-testimonial { max-width: 46rem; margin: 0 auto; padding: 0 3.5rem; text-align: center; }
.hp-testimonial-avatar img { width: 6rem; height: 6rem; border-radius: 50%; object-fit: cover; margin-bottom: 1.5rem; }
.hp-testimonial-quote { font-size: clamp(1.2rem, 2.2vw, 1.75rem); line-height: 1.5; font-weight: 300; margin-bottom: 1.5rem; }
.hp-testimonial figcaption strong { display: block; font-weight: 600; }
.hp-testimonial figcaption span { opacity: .7; font-size: .9rem; }

.hp-guestbook-section { padding: clamp(4.5rem, 9vw, 8.5rem) var(--hp-pad); background: var(--hp-paper-2); }
.hp-guestbook-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; max-width: 90rem; margin: 0 auto; }
.hp-guestbook-card { position: relative; padding: clamp(2rem, 4vw, 3.5rem); background: var(--hp-paper); margin: 0 0 3rem; }
.hp-guestbook-index { font-size: .72rem; letter-spacing: .18em; color: var(--hp-accent); font-weight: 600; }
.hp-guestbook-mark { position: absolute; right: 1.5rem; top: -.5rem; font-size: 7rem; line-height: 1; color: var(--club-primary); opacity: .25; font-weight: 600; }
.hp-guestbook-card blockquote { font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.5; margin: 1rem 0; }
.hp-guestbook-card figcaption { font-size: .85rem; color: var(--hp-ink-2); }
.hp-guestbook-slider .carousel-indicators { bottom: 0; margin: 0; justify-content: flex-start; }
.hp-guestbook-slider .carousel-indicators [data-bs-target] { background-color: var(--hp-ink); }
@media (max-width: 991.98px) { .hp-guestbook-grid { grid-template-columns: 1fr; } }

.hp-scroll-carousel-section { background: var(--hp-paper-2); padding-bottom: 3rem; }
.hp-sc { position: relative; }
.hp-sc-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding: 2rem var(--hp-pad);
  cursor: grab;
}
.hp-sc-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.hp-sc-item { flex: 0 0 auto; height: var(--hp-sc-height, 480px); margin: 0; scroll-snap-align: center; position: relative; }
.hp-sc-item img { height: 100%; width: auto; max-width: 85vw; object-fit: cover; display: block; }
.hp-sc-item figcaption { position: absolute; left: 0; bottom: 0; padding: .5rem .8rem; background: rgba(0, 0, 0, .6); color: #fff; font-size: .8rem; }
.hp-sc-arrows { display: flex; gap: .5rem; justify-content: flex-end; padding: 0 var(--hp-pad); }
.hp-sc-arrows button, .hp-ms-arrows button {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--hp-line);
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
}
.hp-sc-arrows button:hover { background: var(--hp-ink); color: var(--hp-paper); }

/* 5. Karten ------------------------------------------------------------------ */
.hp-info-card { display: flex; flex-direction: column; background: var(--hp-paper-2); height: 100%; transition: transform .25s ease, box-shadow .25s ease; }
.hp-info-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .35); }
.hp-info-card-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hp-info-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.hp-info-card-title { font-size: 1.35rem; }
.hp-info-card-text { font-size: .95rem; }

.hp-ec { display: flex; gap: .75rem; height: var(--hp-ec-height, 400px); }
.hp-ec-card { flex: 1 1 0; min-width: 4rem; transition: flex-grow .6s cubic-bezier(.76, 0, .24, 1); position: relative; overflow: hidden; background: var(--hp-dark); }
.hp-ec-card.is-open { flex-grow: 4; }
.hp-ec-link { position: absolute; inset: 0; display: block; color: #fff; text-decoration: none; }
.hp-ec-link:hover { color: #fff; }
.hp-ec-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-ec-shade { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .75)); }
.hp-ec-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.25rem; display: block; }
.hp-ec-title { display: block; font-size: 1.2rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-ec-text { display: block; font-size: .9rem; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .4s ease .2s, max-height .4s ease; }
.hp-ec-card.is-open .hp-ec-text { opacity: .9; max-height: 12rem; }
@media (max-width: 700px) {
  .hp-ec { flex-direction: column; height: auto; }
  .hp-ec-card { min-height: 5rem; height: 5rem; transition: height .5s ease; }
  .hp-ec-card.is-open { height: calc(var(--hp-ec-height, 400px) * .8); }
}

/* 6. Monats-Slider, Polygon, Foto der Woche --------------------------------------- */
.hp-month-slider-section { position: relative; height: var(--hp-ms-height, 100vh); min-height: 26rem; background: #111; color: #fff; overflow: hidden; }
.hp-ms, .hp-ms-slides { position: absolute; inset: 0; }
.hp-ms-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 1.2s; }
.hp-ms-slide.is-active { opacity: 1; visibility: visible; }
.hp-ms-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-ms-slide.is-active .hp-ms-image { animation: hp-kenburns 14s ease-out both; }
@keyframes hp-kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.hp-ms-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .15) 60%, transparent), linear-gradient(transparent 60%, rgba(0, 0, 0, .5)); }
.hp-ms-content { position: absolute; left: var(--hp-pad); bottom: clamp(7rem, 18vh, 11rem); max-width: min(38rem, 80vw); }
.hp-editorial .hp-ms-eyebrow { color: #fff; opacity: .8; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; margin-bottom: .75rem; }
.hp-editorial .hp-ms-name { color: #fff; font-size: clamp(2.5rem, 6vw, 5.4rem); margin-bottom: 1rem; }
.hp-editorial .hp-ms-des { color: #fff; opacity: .88; }
.hp-ms-slide.is-active .hp-ms-content > * { animation: hp-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hp-ms-slide.is-active .hp-ms-content > *:nth-child(2) { animation-delay: .1s; }
.hp-ms-slide.is-active .hp-ms-content > *:nth-child(3) { animation-delay: .2s; }
.hp-ms-btn { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hp-ms-btn-link {
  display: inline-block;
  padding: .9rem 1.2rem;
  background: #fff;
  color: #2d2d35;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.hp-ms-btn-link--ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .7); }
.hp-ms-thumbs { position: absolute; right: var(--hp-pad); bottom: 6.5rem; display: flex; gap: .6rem; }
.hp-ms-thumb { width: 5.5rem; height: 7.5rem; padding: 0; border: 2px solid transparent; background: none; opacity: .65; transition: opacity .3s ease, transform .3s ease; }
.hp-ms-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hp-ms-thumb.is-active { border-color: #fff; opacity: 1; transform: translateY(-.5rem); }
.hp-ms-arrows { position: absolute; left: var(--hp-pad); bottom: 2.5rem; display: flex; gap: .5rem; }
.hp-ms-arrows button { border-color: rgba(255, 255, 255, .5); border-radius: 50%; }
.hp-ms-arrows button:hover { background: #fff; color: #2d2d35; }
.hp-ms-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .2); }
.hp-ms-progress span { display: block; height: 100%; width: 0; background: var(--club-primary); }
@media (max-width: 767.98px) { .hp-ms-thumbs { display: none; } }

.hp-polygonizr-section {
  position: relative;
  display: grid;
  place-items: center;
  min-height: var(--hp-polygonizr-height, 70vh);
  background-color: var(--hp-polygonizr-bg, #0b0f14);
  color: #fff;
  overflow: hidden;
}
.hp-polygonizr { position: absolute; inset: 0; }
.hp-polygonizr canvas { display: block; width: 100%; height: 100%; }
.hp-polygonizr::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, .38) 100%); }
.hp-polygonizr-copy { position: relative; z-index: 1; padding-block: 4rem; }
.hp-editorial .hp-polygonizr-title, .hp-editorial .hp-polygonizr-subtitle { color: #fff; }
.hp-polygonizr-section[data-hp-text-style="dark"],
.hp-editorial [data-hp-text-style="dark"] .hp-polygonizr-title,
.hp-editorial [data-hp-text-style="dark"] .hp-polygonizr-subtitle { color: #1c1b1f; }

.hp-week-photo-section { position: relative; min-height: min(92vh, 56rem); display: flex; align-items: flex-end; overflow: hidden; background: var(--hp-dark); color: #fff; }
.hp-week-photo-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.05); will-change: transform; }
.hp-week-photo-shade { position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .7)); }
.hp-week-photo-label { position: relative; padding: clamp(2rem, 6vw, 5rem) var(--hp-pad); max-width: 46rem; }
.hp-week-photo-label > span { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.hp-week-photo-label strong { display: block; font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 300; letter-spacing: -.06em; line-height: .95; margin: .5rem 0 1rem; }
.hp-week-photo-label strong em { font-style: normal; font-weight: 600; }
.hp-editorial .hp-week-photo-label p { color: #fff; opacity: .9; }
.hp-week-photo-link { color: #fff; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; text-decoration: none; border-bottom: 1px solid currentColor; }
.hp-week-photo-link:hover { color: #fff; opacity: .8; }
.hp-week-photo-open { display: inline-block; margin: -.05em -.22em; padding: .05em .22em; color: inherit; text-decoration: none; border: .05em solid transparent; border-radius: .18em; transition: background-color .2s, border-color .2s; }
.hp-week-photo-open:hover, .hp-week-photo-open:focus-visible { color: inherit; background: rgba(255, 255, 255, .18); border-color: currentColor; outline: none; }
.hp-week-photo-section:not(.has-photo) { min-height: 26rem; }

/* 7. Editorial-Sonderformen ------------------------------------------------------ */
.hp-marathon-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 54fr) minmax(0, 46fr);
  min-height: 40rem;
  background: var(--hp-paper);
  overflow: hidden;
}
.hp-marathon-section::before {
  content: attr(data-hp-watermark);
  position: absolute;
  right: -2rem;
  bottom: -3rem;
  font-size: clamp(5rem, 16vw, 15rem);
  font-weight: 600;
  letter-spacing: -.06em;
  color: var(--hp-ink);
  opacity: .05;
  pointer-events: none;
  white-space: nowrap;
}
.hp-marathon-visual { position: relative; background: var(--club-primary); min-height: 22rem; }
.hp-marathon-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-marathon-visual span {
  position: absolute;
  left: 2rem;
  bottom: 1rem;
  font-size: clamp(6rem, 14vw, 12rem);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  mix-blend-mode: overlay;
}
.hp-marathon-copy { position: relative; padding: clamp(2.5rem, 6vw, 6rem) var(--hp-pad); align-self: center; }
.hp-marathon-facts { display: grid; gap: .5rem; margin: 2rem 0; }
.hp-marathon-facts span { display: block; padding: .75rem 0; border-top: 1px solid var(--hp-line); font-size: .95rem; }
.hp-marathon-facts b { display: inline-block; min-width: 8rem; font-weight: 600; color: var(--hp-accent); }
.hp-marathon-link { color: var(--hp-ink); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; text-decoration: none; border-bottom: 2px solid var(--club-accent-line); }
@media (max-width: 991.98px) { .hp-marathon-section { grid-template-columns: 1fr; } }

.hp-youth-contest { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(4.5rem, 9vw, 8.5rem) var(--hp-pad); background: var(--hp-paper-2); }
.hp-youth-period { display: grid; gap: .25rem; margin-top: 2rem; padding-left: 1rem; border-left: 3px solid var(--club-primary); }
.hp-youth-period span { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; }
.hp-youth-period strong { font-size: 1.5rem; font-weight: 500; }
.hp-youth-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; align-content: start; }
.hp-youth-card { display: flex; flex-direction: column; gap: .5rem; padding: 2rem; background: var(--hp-band); color: var(--hp-ink); min-height: 16rem; border-top: 3px solid var(--club-primary); }
[data-bs-theme="dark"] .hp-youth-card { border-top-color: var(--club-accent-line); }
.hp-youth-card span { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; opacity: .75; }
.hp-youth-card strong { font-size: 1.8rem; font-weight: 500; letter-spacing: -.03em; }
.hp-editorial .hp-youth-card p { color: inherit; opacity: .85; }
.hp-youth-card b { margin-top: auto; font-weight: 600; }
.hp-youth-card.hp-youth-card--light { background: var(--hp-paper); color: var(--hp-ink); border-top-color: var(--hp-line); }
.hp-youth-footnote { grid-column: 1 / -1; font-size: .85rem; }
@media (max-width: 991.98px) { .hp-youth-contest { grid-template-columns: 1fr; } }

.hp-faq-section { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(4.5rem, 9vw, 8.5rem) var(--hp-pad); }
.hp-faq-item { border-top: 1px solid var(--hp-line); }
.hp-faq-item:last-child { border-bottom: 1px solid var(--hp-line); }
.hp-faq-item summary {
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.25rem 0;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 400;
  cursor: pointer;
  list-style: none;
}
.hp-faq-item summary::-webkit-details-marker { display: none; }
.hp-faq-item summary::after { content: "+"; margin-left: auto; font-size: 1.5rem; color: var(--hp-accent); transition: transform .3s ease; }
.hp-faq-item[open] summary::after { transform: rotate(45deg); }
.hp-faq-item summary span { font-size: .72rem; font-weight: 600; letter-spacing: .15em; color: var(--hp-accent); }
.hp-faq-item p { padding: 0 0 1.5rem 2.6rem; margin: 0; }
@media (max-width: 991.98px) { .hp-faq-section { grid-template-columns: 1fr; } }

.hp-stat-split-section { padding: clamp(4.5rem, 9vw, 8.5rem) var(--hp-pad); }
.hp-stat-split-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; max-width: 90rem; margin: 0 auto; }
.hp-stat-split-value { display: block; font-size: clamp(6rem, 18vw, 16rem); font-weight: 600; letter-spacing: -.08em; line-height: .85; color: var(--hp-accent); }
.hp-stat-split-value sup { font-size: .4em; top: -1.2em; }
.hp-stat-split-texts { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 767.98px) { .hp-stat-split-grid, .hp-stat-split-texts { grid-template-columns: 1fr; } }

/* 8. Teaser ------------------------------------------------------------------ */
.hp-history-teaser-stack { display: grid; gap: 1rem; }
.hp-history-teaser-item {
  display: block;
  padding: 1.75rem;
  background: var(--hp-paper-2);
  color: inherit;
  text-decoration: none;
  border-left: 3px solid var(--club-primary);
  transition: transform .25s ease;
}
.hp-history-teaser-item:hover { transform: translateX(.5rem); color: inherit; }
/* Einfahren (app.css .fade-in-up) und Hover-Verschiebung teilen sich transform */
.hp-history-teaser-item.fade-in-up {
  transition: opacity .6s ease-out var(--reveal-delay, 0s), filter .6s ease-out var(--reveal-delay, 0s), transform .5s cubic-bezier(.22, .61, .36, 1) var(--reveal-delay, 0s);
}
.hp-history-teaser-item h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.hp-history-teaser-item p { margin: 0; font-size: .95rem; }
.hp-history-teaser-item:nth-child(3) { opacity: .55; }

.hp-termine-list, .hp-deadline-list { border-top: 1px solid var(--hp-line); }
.hp-termine-item a, .hp-deadline-list a {
  display: grid;
  gap: .2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hp-line);
  color: inherit;
  text-decoration: none;
}
.hp-termine-item a:hover, .hp-deadline-list a:hover { color: var(--hp-accent); }
.hp-termine-date { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--hp-accent); font-weight: 600; }
.hp-termine-name { font-size: 1.25rem; font-weight: 500; }
.hp-termine-meta, .hp-termine-text, .hp-deadline-list span { font-size: .9rem; color: var(--hp-ink-2); }
.hp-termine-item.is-peek { opacity: .45; mask-image: linear-gradient(#000, transparent); }
.hp-teaser-empty { color: var(--hp-ink-2); }

.hp-excursions-cta { background: var(--hp-paper-2); }

/* 9. Seiten-Editor ------------------------------------------------------------- */
/* Die Seite erscheint wie öffentlich; Texte/Bilder werden direkt bearbeitet,
   je Baustein schwebt eine Werkzeugleiste (cms-editor.js). */
.cms-editor-body main { padding-bottom: 4rem; }
.cms-canvas { min-height: 6rem; }
.cms-canvas .fade-in-up { opacity: 1; transform: none; filter: none; }
.cms-block { position: relative; outline: 1px dashed transparent; outline-offset: -1px; transition: outline-color .2s ease, opacity .2s ease; }
.cms-block:hover { outline-color: rgba(var(--club-primary-rgb), .5); }
.cms-block.is-selected { outline: 2px solid rgba(var(--club-primary-rgb), .85); outline-offset: -2px; }
.cms-block.is-dragging { opacity: .4; }
.cms-block.drop-before { box-shadow: 0 -4px 0 var(--club-primary); }
.cms-block.drop-after { box-shadow: 0 4px 0 var(--club-primary); }

/* Schwebende Werkzeugleiste: klebt beim Scrollen am oberen Rand des Bausteins */
.cms-block-tools {
  position: sticky;
  top: calc(var(--nav-height) + .5rem);
  z-index: 30;
  height: 0;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.cms-block-bar {
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .1rem;
  max-width: calc(100% - 1rem);
  height: max-content;
  margin: .5rem .5rem 0;
  padding: .25rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: .6rem;
  box-shadow: var(--elevation-2);
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  opacity: 0;
  transform: translateY(-.25rem);
  transition: opacity .15s ease, transform .15s ease;
}
.cms-block:hover .cms-block-bar,
.cms-block:focus-within .cms-block-bar,
.cms-block.is-selected .cms-block-bar,
.cms-block.is-inactive .cms-block-bar { opacity: 1; transform: none; pointer-events: auto; }
.cms-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .45rem;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1;
}
button.cms-tool:hover, button.cms-tool:focus-visible, button.cms-tool[aria-expanded="true"] { background: rgba(var(--club-primary-rgb), .12); color: var(--club-primary-text); }
.cms-tool:focus-visible { outline: 2px solid var(--club-primary); outline-offset: 1px; }
.cms-handle { cursor: grab; color: var(--ink-muted); }
.cms-block-type { font-weight: 600; max-width: 14rem; }
.cms-block-type span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cms-tool-switch.form-switch { padding: 0 .45rem 0 2.9em; min-height: 0; }
.cms-tool-switch .form-check-input { margin-top: 0; }
.cms-tool-switch .form-check-label { font-family: var(--font-sans); cursor: pointer; }
.cms-tool-sep { width: 1px; height: 1.25rem; margin: 0 .2rem; background: var(--line); }
.cms-block-status { font-size: .75rem; color: var(--ink-muted); padding: 0 .35rem; white-space: nowrap; }
.cms-block-status:empty { display: none; }
.cms-block-status[data-kind="error"] { color: var(--bs-danger-text-emphasis); }
.cms-block-status[data-kind="saved"] { color: var(--bs-success-text-emphasis); }
.cms-inactive-chip { display: none; font-size: .72rem; padding: .15rem .5rem; border-radius: 1rem; background: var(--surface-muted); color: var(--ink-muted); }
.cms-block.is-inactive .cms-inactive-chip { display: inline-flex; }
.cms-block.is-inactive .cms-block-preview { opacity: .38; filter: grayscale(.6); }
.cms-block-preview { position: relative; }
@media (max-width: 575.98px) {
  .cms-block-type span:first-of-type, .cms-tool-switch .form-check-label, .cms-tool-sep { display: none; }
  .cms-tool-switch.form-switch { padding-left: 2.6em; }
  /* Handy: nur der ausgewählte Baustein zeigt seine Leiste – fest am unteren Rand, ohne Text zu verdecken */
  .cms-block:not(.is-selected) .cms-block-bar { opacity: 0; pointer-events: none; }
  .cms-block.is-selected .cms-block-bar {
    position: fixed;
    left: .5rem;
    right: .5rem;
    bottom: .75rem;
    max-width: none;
    margin: 0;
    justify-content: space-between;
    z-index: 1031;
  }
  body:has(.cms-block.is-selected) .cms-save-state { bottom: 4.25rem; }
  .cms-editor-body main { padding-bottom: 6rem; }
}

/* Direkt bearbeitbare Texte und austauschbare Bilder */
.cms-editable { cursor: text; border-radius: 2px; outline: 1px dashed transparent; outline-offset: 3px; transition: outline-color .15s ease; min-width: 1ch; }
.cms-block:hover .cms-editable { outline-color: rgba(var(--club-primary-rgb), .35); }
.cms-editable:hover { outline-color: rgba(var(--club-primary-rgb), .75); }
.cms-editable:focus { outline: 2px solid var(--club-primary); outline-offset: 3px; }
.cms-editable--multiline { white-space: pre-wrap; }
.cms-editable:empty { display: inline-block; min-width: 6ch; }
.cms-editable:empty::before { content: attr(data-placeholder); opacity: .45; font-style: italic; pointer-events: none; }
.cms-editable.is-too-long, .cms-editable.is-too-long:focus { outline-color: var(--bs-danger); }
.cms-media-edit { cursor: pointer; outline: 3px solid transparent; outline-offset: -3px; transition: filter .15s ease, outline-color .15s ease; }
.cms-media-edit:hover, .cms-media-edit:focus-visible { filter: brightness(.82); outline-color: var(--club-primary); }
.cms-media-edit.is-uploading { filter: grayscale(1) brightness(.7); animation: cms-pulse 1.2s ease-in-out infinite; }
@keyframes cms-pulse { 50% { opacity: .55; } }

/* Schwebende Bild-Werkzeuge über einem Vorschaubild (Hochladen, Mediathek, Entfernen) */
.cms-img-tools {
  position: absolute;
  z-index: 28;
  display: flex;
  gap: .25rem;
  translate: -100% 0;
  padding: .2rem;
  border-radius: .5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--elevation-2);
}
.cms-img-tools[hidden] { display: none; }

/* Bildleiste des ausgewählten Bausteins */
.cms-images {
  display: none;
  position: relative;
  z-index: 26;
  padding: .75rem 1rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}
.cms-block.is-selected > .cms-images,
.cms-block:focus-within > .cms-images,
.cms-images.is-busy { display: block; }
.cms-images-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; margin-bottom: .5rem; }
.cms-images-head > .bi { color: var(--club-primary-text); }
.cms-images-hint { color: var(--ink-muted); font-size: .78rem; }
.cms-images-group { padding: .25rem; border-radius: .4rem; }
.cms-images-group + .cms-images-group { margin-top: .5rem; }
.cms-images.is-over, .cms-images-group.is-over { outline: 2px dashed var(--club-primary); outline-offset: 2px; background: rgba(var(--club-primary-rgb), .06); }
.cms-images-label { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .4rem; font-weight: 600; }
.cms-images-note { font-weight: 400; color: var(--ink-muted); font-size: .78rem; }
.cms-images-list { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.cms-images-item { position: relative; width: 7.5rem; }
.cms-images-item[draggable="true"] { cursor: grab; }
.cms-images-item.is-dragging { opacity: .35; }
.cms-images-item.drop-before::before,
.cms-images-item.drop-after::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--club-primary);
  border-radius: 2px;
}
.cms-images-item.drop-before::before { left: -.4rem; }
.cms-images-item.drop-after::after { right: -.4rem; }
.cms-images-item.is-over .cms-images-thumb { outline: 2px dashed var(--club-primary); outline-offset: 2px; }
.cms-images-thumb,
.cms-images-add {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: var(--surface-muted);
  color: var(--ink-muted);
  font-size: 1.4rem;
  cursor: pointer;
}
.cms-images-item[draggable="true"] .cms-images-thumb { cursor: grab; }
.cms-images-thumb img { width: 100%; height: 100%; object-fit: cover; transition: filter .15s ease; }
.cms-images-thumb:hover img, .cms-images-thumb:focus-visible img { filter: brightness(.8); }
.cms-images-thumb:focus-visible, .cms-images-add:focus-visible, .cms-images-mini:focus-visible { outline: 2px solid var(--club-primary); outline-offset: 2px; }
.cms-images-item.is-empty .cms-images-thumb { border-style: dashed; }
.cms-images-add { border: 2px dashed rgba(var(--club-primary-rgb), .55); color: var(--club-primary-text); font-size: .9rem; font-weight: 600; display: flex; flex-direction: column; justify-content: center; gap: .15rem; }
.cms-images-add .bi { font-size: 1.4rem; line-height: 1; }
.cms-images-add:hover:not(:disabled) { background: rgba(var(--club-primary-rgb), .08); border-color: var(--club-primary); }
.cms-images-add:disabled { opacity: .45; cursor: not-allowed; }
.cms-images-tools { position: absolute; top: .3rem; right: .3rem; display: flex; gap: .2rem; }
.cms-images-num {
  position: absolute;
  left: .3rem;
  top: .3rem;
  min-width: 1.4rem;
  padding: 0 .3rem;
  border-radius: 1rem;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: .7rem;
  line-height: 1.4rem;
  text-align: center;
  pointer-events: none;
}
.cms-images-caption { display: block; margin-top: .2rem; font-size: .75rem; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cms-images-mini {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: var(--surface);
  color: var(--ink);
  font-size: .85rem;
  box-shadow: var(--elevation-1, 0 1px 3px rgba(0, 0, 0, .12));
}
.cms-images-mini:hover { color: var(--club-primary-text); border-color: var(--club-primary); }
.cms-images-mini.is-danger:hover { color: var(--bs-danger-text-emphasis); border-color: var(--bs-danger); }
.cms-images-mini:disabled { opacity: .45; }
.cms-images-add-item .cms-images-tools { top: auto; bottom: .3rem; }
@media (hover: hover) {
  .cms-images-item .cms-images-tools { opacity: 0; transition: opacity .15s ease; }
  .cms-images-item:hover .cms-images-tools,
  .cms-images-item:focus-within .cms-images-tools,
  .cms-images-add-item .cms-images-tools { opacity: 1; }
}
.cms-images-progress { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin-top: .75rem; }
.cms-images-progress[hidden] { display: none; }
.cms-images-progress .progress { flex: 1 1 12rem; height: .5rem; }
.cms-images-errors {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-top: .75rem;
  padding: .5rem .75rem;
  border: 1px solid var(--bs-danger-border-subtle);
  background: var(--bs-danger-bg-subtle);
  color: var(--bs-danger-text-emphasis);
}
.cms-images-errors ul { flex: 1; padding-left: 1rem; }
@media (prefers-reduced-motion: reduce) { .cms-media-edit.is-uploading { animation: none; } }

.cms-empty-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 2.5rem 1rem;
  border: 2px dashed var(--hp-line);
  margin: 1rem;
  color: var(--hp-ink-2);
  font-family: var(--font-sans);
}

/* Einfügepunkte zwischen den Bausteinen */
.cms-insert { display: flex; justify-content: center; height: 0; position: relative; z-index: 25; }
.cms-insert-btn {
  position: absolute;
  top: 0;
  translate: 0 -50%;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  padding: .25rem .8rem;
  border-radius: 2rem;
  box-shadow: var(--elevation-1, 0 1px 3px rgba(0, 0, 0, .12));
  opacity: .7;
  transition: opacity .2s ease, color .2s ease, border-color .2s ease;
}
.cms-insert:last-child { height: auto; padding: 2rem 0; }
.cms-insert:last-child .cms-insert-btn { position: static; translate: none; }
.cms-insert-btn:hover, .cms-insert-btn:focus-visible { opacity: 1; color: var(--club-primary-text); border-color: var(--club-primary); }
@media (hover: hover) {
  .cms-insert:not(:last-child) .cms-insert-btn span { display: none; }
  .cms-insert:not(:last-child) .cms-insert-btn:hover span, .cms-insert:not(:last-child) .cms-insert-btn:focus-visible span { display: inline; }
}

/* Speicherstatus (unten links, immer sichtbar) */
.cms-save-state {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1030;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: var(--surface);
  color: var(--ink-muted);
  box-shadow: var(--elevation-2);
  font-size: .8rem;
}
.cms-save-state[data-state="pending"] { color: var(--ink); }
.cms-save-state[data-state="saving"] .bi { animation: cms-spin 1s linear infinite; }
.cms-save-state[data-state="error"] { color: var(--bs-danger-text-emphasis); border-color: var(--bs-danger-border-subtle); }
@keyframes cms-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cms-save-state .bi { animation: none !important; } .cms-block-bar { transition: none; } }

/* Formular „Weitere Einstellungen“ */
.cms-form legend.form-label { font-size: 1rem; font-weight: 600; }
.cms-repeater { border: 0; }
.cms-repeater-row { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .5rem; }
.cms-repeater-row > .form-control { flex: 1; }
.cms-repeater-tools { display: flex; gap: .25rem; flex-shrink: 0; }
.cms-list { border: 0; }
.cms-list-item { border: 1px solid var(--line); padding: .9rem; margin-bottom: .75rem; background: var(--surface-muted); }
.cms-list-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.cms-media-field { display: flex; gap: 1rem; align-items: center; padding: .5rem; border: 1px dashed var(--line); }
.cms-media-field.is-over { border-color: var(--club-primary); background: rgba(var(--club-primary-rgb), .06); }
.cms-media-thumb { width: 6rem; height: 4.5rem; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-muted); color: var(--ink-muted); font-size: 1.5rem; }
.cms-media-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Verlauf je Baustein */
.cms-history { display: grid; grid-template-columns: minmax(15rem, 21rem) minmax(0, 1fr); min-height: 60vh; }
.cms-history-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 78vh; }
.cms-history-item {
  display: grid;
  gap: .3rem;
  width: 100%;
  padding: .75rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: .85rem;
}
.cms-history-item:hover { background: var(--surface-muted); }
.cms-history-item:focus-visible { outline: 2px solid var(--club-primary); outline-offset: -2px; }
.cms-history-item[aria-pressed="true"] { background: rgba(var(--club-primary-rgb), .1); box-shadow: inset 3px 0 0 var(--club-primary); }
.cms-history-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .5rem; }
.cms-history-head span { color: var(--ink-muted); }
.cms-history-meta { display: flex; flex-wrap: wrap; gap: .25rem; }
.cms-history-summary { color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cms-history-preview { display: flex; flex-direction: column; min-width: 0; }
.cms-history-preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.cms-history-canvas { flex: 1; overflow: auto; max-height: 72vh; transition: opacity .15s ease; }
.cms-history-canvas > * { pointer-events: none; }
.cms-history-canvas.is-loading { opacity: .5; }
@media (max-width: 767.98px) {
  .cms-history { grid-template-columns: 1fr; min-height: 0; }
  .cms-history-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 38vh; }
  .cms-history-canvas { max-height: none; }
}

.cms-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
.cms-type-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .25rem .75rem;
  text-align: left;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.cms-type-option i { grid-row: span 2; font-size: 1.6rem; color: var(--club-primary-text); }
.cms-type-option span { font-size: .8rem; color: var(--ink-muted); }
.cms-type-option:hover, .cms-type-option:focus-visible { border-color: var(--club-primary); background: rgba(var(--club-primary-rgb), .06); }
.cms-type-preview-canvas { max-height: 65vh; overflow: auto; }

.cms-dropzone { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem; border: 2px dashed var(--line); }
.cms-dropzone.is-over { border-color: var(--club-primary); background: rgba(var(--club-primary-rgb), .06); }
.cms-dropzone > .bi { font-size: 1.75rem; color: var(--club-primary-text); }
.cms-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; }
.cms-media-tile { position: relative; }
.cms-media-pick { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 3px solid transparent; background: var(--surface-muted); }
.cms-media-pick img { width: 100%; height: 100%; object-fit: cover; }
.cms-media-pick[aria-pressed="true"] { border-color: var(--club-primary); box-shadow: 0 0 0 2px var(--surface) inset; }
.cms-media-meta { display: block; font-size: .72rem; color: var(--ink-muted); margin-top: .2rem; }
.cms-media-delete { position: absolute; top: .35rem; right: .35rem; }
.cms-rename { max-width: 24rem; }

/* Seitenübersicht: ganze Zeile öffnet den Editor (cms-admin.js), Eingabezeile für neue Zusatzseiten */
.cms-pages-table .cms-row-link { color: inherit; text-decoration: none; }
.cms-pages-table .cms-row-link:focus-visible { outline: 2px solid var(--club-primary); outline-offset: 2px; border-radius: 2px; }
.cms-pages-table tr.is-clickable { cursor: pointer; }
.cms-pages-table tr.is-clickable .cms-row-actions { cursor: default; }
.cms-pages-table tr.is-clickable:hover > *,
.cms-pages-table tr.is-clickable:focus-within > * { --bs-table-bg-state: var(--surface-hover); }
.cms-pages-table tr.is-clickable:hover > :first-child,
.cms-pages-table tr.is-clickable:focus-within > :first-child { box-shadow: inset 3px 0 0 var(--club-primary), inset 0 0 0 9999px var(--surface-hover); }
.cms-pages-table tr.is-clickable:hover .cms-row-link { color: var(--club-primary-text, var(--club-primary)); text-decoration: underline; text-underline-offset: 3px; }
.cms-pages-table tr:target > * { animation: cms-row-new 2.4s ease-out; }
@keyframes cms-row-new { from { box-shadow: inset 0 0 0 9999px rgba(var(--club-primary-rgb), .2); } }
.cms-pages-table .cms-new-row > td { border-bottom: 0; padding-top: .75rem; }
.cms-pages-table tr.row-new { cursor: text; }
.cms-pages-table tr.row-new .form-text { margin-top: .15rem; padding-left: 2rem; }
@media (prefers-reduced-motion: reduce) { .cms-pages-table tr:target > * { animation: none; } }

/* 10. Rechtstexte, Vereinsverwaltung, Druck -------------------------------------- */
.legal-document { font-family: Georgia, "Times New Roman", serif; max-width: 48rem; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; color: #1c1b1f; background: #f2f0eb; line-height: 1.65; }
.legal-document h1 { font-size: 2rem; margin-bottom: .25rem; }
.legal-document .legal-meta { color: #555; font-size: .9rem; margin-bottom: 2rem; }
.legal-document .legal-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; font-family: var(--font-sans); }
.legal-body img { max-width: 100%; height: auto; }
.legal-body table { border-collapse: collapse; width: 100%; }
.legal-body td, .legal-body th { border: 1px solid #ccc; padding: .35rem .5rem; }
.application-form .field-line { display: grid; grid-template-columns: 14rem 1fr; gap: 1rem; align-items: end; margin-bottom: 1.1rem; }
.application-form .field-line span:last-child { border-bottom: 1px solid #333; min-height: 1.6rem; }
.application-form .signature { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 4rem; }
.application-form .signature span { border-top: 1px solid #333; padding-top: .25rem; font-size: .85rem; }

.club-settings .form-section { max-width: 52rem; }
.club-logo-preview { display: grid; place-items: center; width: 100%; max-width: 22rem; aspect-ratio: 16 / 7; padding: 1rem; background: var(--club-primary); background-image: var(--nav-gradient); }
.club-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.club-logo-preview img.is-inverted { filter: brightness(0) invert(1); }
.club-color-sample { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; font-weight: 600; }
.club-board-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: .5rem; margin-bottom: .5rem; }
.richtext-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .35rem; border: 1px solid var(--line); border-bottom: 0; background: var(--surface-muted); }
.richtext-editor { min-height: 18rem; max-height: 60vh; overflow-y: auto; padding: 1rem; border: 1px solid var(--line); background: var(--surface); line-height: 1.6; }
.richtext-editor:focus { outline: 2px solid var(--club-primary); outline-offset: -2px; }
.richtext-editor h2 { font-size: 1.35rem; } .richtext-editor h3 { font-size: 1.15rem; }

@media print {
  .legal-document { padding: 0; max-width: none; }
  .legal-toolbar, .cms-edit-fab { display: none !important; }
  .hp-editorial { background: #fff; }
}

/* Überschriften der Bausteine dürfen Zeilenumbrüche enthalten (Enter im Editor) */
.hp-editorial :is(h1, h2, h3, h4) { white-space: pre-line; }

/* Seitenverwaltung: Titel direkt in der Tabelle (sieht aus wie Text, beim Überfahren/Fokus wie ein Feld) */
.cms-title-form { position: relative; display: flex; align-items: center; max-width: 22rem; }
.cms-title-input {
  width: 100%; padding: .3rem 1.8rem .3rem .45rem; margin-left: -.45rem; border: 1px solid transparent; border-radius: .35rem;
  background: transparent; color: inherit; font-weight: 600;
}
.cms-title-input::placeholder { color: inherit; opacity: 1; }
.cms-title-input:hover { border-color: var(--line, rgba(0, 0, 0, .15)); }
.cms-title-input:focus { outline: none; border-color: var(--club-primary); background: var(--bs-body-bg); box-shadow: 0 0 0 .2rem rgba(var(--club-primary-rgb), .2); }
.cms-title-input:focus::placeholder { opacity: .45; }
.cms-title-icon { position: absolute; right: .45rem; font-size: .8rem; opacity: 0; pointer-events: none; transition: opacity .15s; }
.cms-title-form:hover .cms-title-icon, .cms-title-input:focus + .cms-title-icon { opacity: .55; }
.cms-menu-form { display: inline-flex; align-items: center; justify-content: center; }
.cms-menu-form .form-check-input { cursor: pointer; }
.cms-menu-form .form-check { padding-left: 0; } .cms-menu-check { width: 1.25rem; height: 1.25rem; margin: 0 !important; float: none !important; }
