/*
 * Eventplattform TV Spiez
 * Mobile first, ohne JavaScript, keine externen Ressourcen, Kontrast nach WCAG 2.1 AA.
 *
 * Farben aus dem Vereinslogo:
 *   Blau  #0080C6  Flächen, Akzente, grosse Schrift (4.28:1 auf Weiss)
 *   Gelb  #F8C824  nur Akzente, Text darauf dunkel (11:1)
 *   Rot   #C8352C  Akzente und Hinweise (5.25:1 auf Weiss)
 * Text, Links und Buttons: dunkleres Blau #006BA6 (5.75:1) bzw. #005A8C (7.39:1).
 */

:root {
  --brand: #0080c6;
  --brand-strong: #006ba6;
  --brand-darker: #005a8c;
  --brand-deep: #00486f;
  --brand-tint: #e8f4fb;
  --brand-tint-strong: #cfe7f6;
  --yellow: #f8c824;
  --yellow-tint: #fef6d8;
  --red: #c8352c;
  --text: #16202a;
  --muted: #4a5560;
  --surface: #ffffff;
  --surface-alt: #f3f6f9;
  --border: #d6dee6;
  --error: #b3261e;
  --error-tint: #fdecea;
  --success: #0b6b2f;
  --success-tint: #e6f4ea;
  --full-tint: #e4e9ee;
  --full-border: #6b7782;
  --radius: 0.75rem;
  --radius-small: 0.5rem;
  --shadow: 0 1px 2px rgba(16, 32, 48, 0.06), 0 4px 16px rgba(16, 32, 48, 0.08);
  --shadow-hover: 0 2px 4px rgba(16, 32, 48, 0.08), 0 10px 28px rgba(16, 32, 48, 0.14);
  --space: 1rem;
  --max-width: 62rem;
  font-size: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-alt);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--brand-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-darker);
}

:focus-visible {
  outline: 3px solid var(--brand-darker);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  padding: 0.5rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space);
}

/* --- Kopfzeile ------------------------------------------------------------------ */

.site-header {
  background: var(--surface);
  border-top: 5px solid transparent;
  border-image: linear-gradient(90deg, var(--yellow) 0 33.3%, var(--red) 33.3% 66.6%, var(--brand) 66.6%) 1;
  box-shadow: 0 1px 0 var(--border);
  position: relative;
  z-index: 2;
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem var(--space);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--text);
}

.brand__logo {
  display: block;
  height: 3.5rem;
  width: auto;
}

.brand__label {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--brand-strong);
  padding-left: 0.9rem;
  border-left: 2px solid var(--border);
  line-height: 1.2;
}

/* --- Hero ---------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-strong) 70%);
  padding: 2.25rem 0 3.25rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 1.5rem), 0 100%);
}

/* Dekorative Kreise in Vereinsblau und Gelb (reine Flächen, kein Text). */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 22rem;
  height: 22rem;
  right: -7rem;
  top: -9rem;
  background: var(--brand);
  opacity: 0.55;
}

.hero::after {
  width: 7rem;
  height: 7rem;
  right: 12%;
  bottom: -3.5rem;
  background: var(--yellow);
  opacity: 0.9;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 40rem;
}

.hero p {
  margin: 0;
  font-size: 1.125rem;
  max-width: 38rem;
}

.hero a {
  color: #ffffff;
}

.hero__back {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  font-size: 1.05rem;
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: currentColor;
}

/* --- Inhalt --------------------------------------------------------------------------- */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem var(--space) 3rem;
  width: 100%;
}

.page--narrow {
  max-width: 44rem;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 1rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 2rem 0 0.75rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1rem 0 0.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-title::before {
  content: "";
  width: 0.35rem;
  height: 1.3em;
  border-radius: 1rem;
  background: var(--brand);
}

.muted {
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: var(--space);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.notice {
  border-radius: var(--radius-small);
  padding: 0.85rem 1rem;
  margin: 0 0 var(--space);
  border-left: 5px solid var(--brand-strong);
  background: var(--brand-tint);
}

.notice p {
  margin: 0.25rem 0;
}

.notice--error {
  border-left-color: var(--error);
  background: var(--error-tint);
}

.notice--success {
  border-left-color: var(--success);
  background: var(--success-tint);
}

.notice--warning {
  border-left-color: #b88a00;
  background: var(--yellow-tint);
}

/* --- Anlass-Karten ---------------------------------------------------------------- */

.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.event-card {
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.event-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.date-tile {
  flex: none;
  width: 4.5rem;
  border-radius: var(--radius-small);
  background: var(--brand-strong);
  color: #ffffff;
  text-align: center;
  /* Date bar over the full inner height of the card (Tim, 28.09.2026). */
  align-self: stretch;
  min-height: 4.5rem;
  padding: 0.45rem 0.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
}

.date-tile__day {
  font-size: 1.75rem;
  font-weight: 800;
}

.date-tile__month {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Same structure in every card: title and meta at the top, status and CTA at the
   bottom. Cards of one grid row are equally high, so the footers line up. */
.event-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.event-card__footer {
  margin-top: auto;
  padding-top: 0.25rem;
}

.event-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.event-card__title a {
  color: var(--text);
  text-decoration: none;
}

/* Ganze Karte klickbar, Link bleibt das einzige interaktive Element. */
.event-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.event-card__title a:focus-visible {
  outline: none;
}

.event-card__title a:focus-visible::after {
  outline: 3px solid var(--brand-darker);
  outline-offset: 3px;
}

.event-card .meta {
  flex-direction: column;
  gap: 0.2rem;
}

.event-card .meta li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-card__cta {
  display: inline-block;
  margin-top: 0.25rem;
  font-weight: 700;
  color: var(--brand-strong);
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
}

.empty-state img {
  width: 5rem;
  opacity: 0.9;
}

/* --- Schichten --------------------------------------------------------------------- */

.shift-day {
  margin-bottom: 1.75rem;
}

.shift-day > h2 {
  margin-top: 1.5rem;
}

.shift-area {
  margin-bottom: 1rem;
}

.shift-area > h3 {
  color: var(--brand-strong);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1rem 0 0.5rem;
}

.shift-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.shift {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.shift:hover {
  border-color: var(--brand);
}

.shift:has(input:checked) {
  border-color: var(--brand-strong);
  background: var(--brand-tint);
}

.shift input[type="checkbox"] {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.15rem 0 0;
  flex: none;
  accent-color: var(--brand-strong);
}

.shift label {
  flex: 1;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
}

.shift--full {
  background: var(--surface-alt);
  border-style: dashed;
}

.shift--full:hover {
  border-color: var(--border);
}

.shift--full label {
  cursor: default;
}

.shift__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
}

.shift__time {
  font-weight: 800;
  font-size: 1.1rem;
}

/* Belegung als Balken (natives <progress>, kein Inline-Style nötig). */
.occupancy {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.occupancy progress,
.event-card__need progress {
  appearance: none;
  width: 100%;
  height: 0.5rem;
  border: 0;
  border-radius: 1rem;
  background: var(--brand-tint-strong);
  overflow: hidden;
}

.occupancy progress::-webkit-progress-bar,
.event-card__need progress::-webkit-progress-bar {
  background: var(--brand-tint-strong);
  border-radius: 1rem;
}

.occupancy progress::-webkit-progress-value,
.event-card__need progress::-webkit-progress-value {
  background: var(--brand);
  border-radius: 1rem;
}

.occupancy progress::-moz-progress-bar,
.event-card__need progress::-moz-progress-bar {
  background: var(--brand);
  border-radius: 1rem;
}

.shift--full .occupancy progress::-webkit-progress-value {
  background: var(--full-border);
}

.shift--full .occupancy progress::-moz-progress-bar {
  background: var(--full-border);
}

.shift--full .occupancy progress::-webkit-progress-bar {
  background: var(--full-tint);
}

/* Greyed out, but the text stays readable (muted #4a5560 on #f3f6f9: about 7:1). */
.shift--full .shift__time,
.shift--full .occupancy__text,
.shift--full .help {
  color: var(--muted);
}

.occupancy__text {
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-darker);
  white-space: nowrap;
}

/* Fully booked: neutral grey with a frame and dark text, not red like an error
   (Usertesting 01.10.2026). Contrast #16202a on #e4e9ee: 13.5:1. */
.badge--full {
  background: var(--full-tint);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--full-border);
}

.badge--free {
  background: var(--yellow-tint);
  color: #6b5200;
}

.badge--closed {
  background: var(--surface-alt);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* --- Formulare ------------------------------------------------------------------------ */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

legend {
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  padding: 0;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.field .optional {
  font-weight: 400;
  color: var(--muted);
}

/* Required fields: red asterisk, --error on white has a contrast of 6.5:1. */
.required-marker {
  color: var(--error);
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid #8a96a3;
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-strong);
  box-shadow: 0 0 0 4px rgba(0, 128, 198, 0.2);
  outline: none;
}

.field--error input {
  border-color: var(--error);
  border-width: 2px;
}

.help {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.error {
  display: block;
  color: var(--error);
  font-weight: 700;
  margin-top: 0.3rem;
}

.checkbox-field {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.checkbox-field input {
  width: 1.4rem;
  height: 1.4rem;
  margin: 0.1rem 0 0;
  flex: none;
  accent-color: var(--brand-strong);
}

.checkbox-field label {
  font-weight: 400;
}

/* Honeypot: für Menschen unsichtbar, für Screenreader verborgen (T-29). */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  min-height: 2.9rem;
  border: 2px solid var(--brand-strong);
  border-radius: 999px;
  background: var(--brand-strong);
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.button:hover {
  background: var(--brand-darker);
  border-color: var(--brand-darker);
  color: #ffffff;
}

.button:active {
  transform: translateY(1px);
}

.button--large {
  font-size: 1.1rem;
  padding: 0.9rem 2rem;
}

.button--secondary {
  background: var(--surface);
  color: var(--brand-strong);
}

.button--secondary:hover {
  background: var(--brand-tint);
  color: var(--brand-darker);
}

.button--small {
  padding: 0.35rem 0.9rem;
  min-height: 2.25rem;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--brand-strong);
}

.button--danger {
  background: var(--error);
  border-color: var(--error);
}

.button--danger:hover {
  background: #8c1d17;
  border-color: #8c1d17;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--brand-strong);
  text-decoration: underline;
  cursor: pointer;
}

/* --- Fusszeile ------------------------------------------------------------------ */

.site-footer {
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem var(--space);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.site-footer__brand img {
  height: 2rem;
  width: auto;
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- Admin-Bereich ------------------------------------------------------------- */

.backoffice .page {
  max-width: 76rem;
}

.backoffice .site-header__inner {
  max-width: 76rem;
}

.bo-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bo-nav a {
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 3px solid transparent;
}

.bo-nav a:hover,
.bo-nav a:focus-visible {
  border-bottom-color: var(--yellow);
}

.bo-logout {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.bo-user {
  font-weight: 700;
  color: var(--muted);
}

.bo-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.narrow {
  max-width: 34rem;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.table thead th {
  background: var(--brand-tint);
  color: var(--brand-deep);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table tbody tr:hover {
  background: #f8fbfd;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}

.table-actions form {
  display: inline;
}

.secret {
  display: inline-block;
  font-size: 1.1rem;
  padding: 0.3rem 0.6rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  word-break: break-all;
}

.filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space);
}

.filter select {
  width: auto;
}

.field-legend {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

/* --- Grössere Bildschirme ------------------------------------------------------------ */

@media (min-width: 40rem) {
  .brand__logo {
    height: 4.25rem;
  }

  .hero {
    padding: 3rem 0 4.25rem;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  h1 {
    font-size: 2rem;
  }

  .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
  }

  .form-card,
  .card {
    padding: 1.75rem;
  }
}

@media (min-width: 56rem) {
  .event-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .actions,
  .hero::before,
  .hero::after {
    display: none;
  }

  .hero {
    color: #000000;
    background: none;
    clip-path: none;
  }
}

/* --- Feinschliff --------------------------------------------------------------- */

/* Legend in einer umrandeten Karte nicht auf den Rand setzen. */
.form-card > legend {
  float: left;
  width: 100%;
  margin-bottom: 1rem;
}

.form-card > legend + * {
  clear: both;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

/* Kleine Karten (Login, Bestätigungen) mittig. */
.card.narrow {
  margin: 1.5rem auto;
}

/* --- Mitgliederkonto (Kopfzeile) ------------------------------------------------ */

.site-nav {
  margin-left: auto;
}

.site-nav + .bo-logout {
  margin-left: 0;
}

.field input[readonly] {
  background: var(--surface-alt);
  color: var(--muted);
  cursor: default;
}

/* --- OK-Verantwortliche pro Anlass ---------------------------------------------- */

.organizer-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.organizer-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

/* --- Benutzerführung (Etappe 11) ------------------------------------------------ */

/* Badge and bar on one line; the bar takes the rest of the width and wraps below the
   badge (full width) when the card is too narrow. */
.event-card__need {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin: 0.5rem 0 0.35rem;
  min-height: 1.5rem;
}

.event-card__need progress {
  flex: 1 1 6rem;
}

.how-to__status {
  margin-top: 0;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.steps__nr {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--brand-strong);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.chosen-shifts {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.chosen-shifts li {
  margin: 0.25rem 0;
}

#angaben {
  scroll-margin-top: 1rem;
}

.past-events {
  margin-top: 1.5rem;
}

.past-events > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brand-strong);
  padding: 0.5rem 0;
}

.setup__title {
  margin-top: 0;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist__item {
  position: relative;
  padding: 0.35rem 0 0.35rem 2rem;
}

.checklist__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--border);
  border-radius: 50%;
  box-sizing: border-box;
}

.checklist__item--done::before {
  border-color: var(--success);
  background: var(--success);
  /* Häkchen als Rahmen eines gedrehten Rechtecks (ohne Bild, CSP-konform). */
  box-shadow: inset 0 0 0 3px var(--success);
}

.checklist__item--done::after {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.62rem;
  width: 0.3rem;
  height: 0.6rem;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checklist__item--done {
  color: var(--muted);
}

.shift--overlap {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px var(--yellow);
}

.shift__overlap {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #6b4e00;
}

.overlap-confirm {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-small);
  background: var(--yellow-tint);
}

#ueberschneidung ul {
  margin: 0.25rem 0 0.5rem;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 1rem;
  margin-bottom: 1rem;
}

.filter-form .field {
  min-width: 14rem;
}

/* Abmelden von Vereinsanlässen in Listen (ADR-0019). */
.inline-action {
  margin: 0.4rem 0 0;
}

.hero__kind {
  margin: 0.25rem 0 0;
}

/* --- Meine Anmeldungen: eine Karte pro Anlass ---------------------------------- */

.signup-cards {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 56rem) {
  .signup-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.signup-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.signup-card--past {
  background: var(--surface-alt);
}

.signup-card__kind,
.signup-card__title,
.signup-card__date {
  margin: 0;
}

.signup-card__title {
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.signup-card__date {
  color: var(--muted);
}

.signup-card__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.signup-card__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
}

.signup-card__status {
  font-size: 0.9rem;
  color: var(--muted);
}

.signup-card .help {
  margin: 0;
}

.signup-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.signup-card__actions form {
  margin: 0;
}

/* Type badges: same shape everywhere, distinct colours (text contrast >= 4.5:1). */
.badge--helper {
  background: var(--brand-tint);
  color: var(--brand-darker);
}

.badge--club {
  background: var(--yellow-tint);
  color: #6b5200;
}

/* --- Admin: Anlassdetail als Dashboard ------------------------------------------ */

.bo-back {
  margin: 0 0 0.75rem;
}

.event-head__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.event-head__title h1 {
  margin: 0;
  overflow-wrap: anywhere;
}

.event-head__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}

.badge--open {
  background: var(--success-tint);
  color: var(--success);
}

/* Key figures as short tiles instead of one long line. */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.stat-tile {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  padding: 0.65rem 0.8rem;
  min-width: 0;
}

.stat-tile dt {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.stat-tile dd {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  /* Break between words, hyphenate long ones (de-CH) instead of cutting
     «Mehrfachauswahl» anywhere (UX review 01.10.2026). */
  overflow-wrap: break-word;
  hyphens: auto;
}

.stat-tile__note {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

/* Main area (link, options/shifts) and side area (actions, list, OK). */
.event-layout {
  display: grid;
  gap: 0 var(--space);
}

@media (min-width: 64rem) {
  .event-layout {
    grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
    align-items: start;
  }
}

.card__title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.card__head .card__title {
  margin: 0;
}

.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.75rem 0 0;
}

.card__actions form {
  margin: 0;
}

.share-field {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.95rem;
}

/* Dangerous actions: separated, never the primary button. */
.danger-zone {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

/* Outlined, so it never looks like the main action of the page. */
.danger-zone .button--danger {
  background: var(--surface);
  color: var(--error);
  border-color: var(--error);
}

.danger-zone .button--danger:hover {
  background: var(--error-tint);
}

.danger-zone__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: var(--error);
}

.link-danger {
  color: var(--error);
}

.link-button--quiet {
  color: var(--muted);
}

/* Calm tables: occupancy as a clickable count, text wraps, actions grouped. */
.table--calm td {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.table__text {
  overflow-wrap: anywhere;
  min-width: 10rem;
}

.table-actions__head {
  text-align: right;
}

.table--calm .table-actions {
  justify-content: flex-end;
}

.count-badge {
  display: inline-block;
  min-width: 2.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-darker);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.count-badge:hover {
  background: var(--brand-tint-strong);
}

.count-badge--full {
  background: var(--success-tint);
  color: var(--success);
}

.compact-form .field {
  margin-bottom: 0.5rem;
}

/* Mobile: table rows become small cards, no horizontal scrolling. */
@media (max-width: 40rem) {
  .table--calm thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .table--calm,
  .table--calm tbody,
  .table--calm tr,
  .table--calm td {
    display: block;
    width: 100%;
  }

  .table--calm tr {
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }

  .table--calm td {
    display: flex;
    gap: 0.75rem;
    border: 0;
    padding: 0.3rem 0.85rem;
    min-width: 0;
  }

  .table--calm td::before {
    content: attr(data-label);
    flex: 0 0 6.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
  }

  .table--calm .table-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .table--calm .table-actions a,
  .table--calm .table-actions button {
    padding: 0.35rem 0;  /* touch targets */
  }
}

/* --- Anwesenheit (ADR-0020) ------------------------------------------------------- */

.attendance-mark {
  font-weight: 700;
  color: var(--success);
  white-space: nowrap;
}

.footnote {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

/* --- Abmelderegel (Usertesting 01.10.2026) ------------------------------------------ */

.leave-rule {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.leave-rule p {
  margin: 0.25rem 0;
}

.leave-rule__title {
  font-weight: 700;
}

/* Text label, not only colour: the rule is readable without colour vision. */
.leave-rule__tag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.9rem;
}

.leave-rule--compact {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
}

/* --- Ausgebuchte Anlässe in der Übersicht (Usertesting 01.10.2026) ------------------ */

/* Greyed card, still a link: title and date stay readable, the badge says why. */
.event-card--full {
  background: var(--surface-alt);
  border-style: dashed;
  box-shadow: none;
}

.event-card--full .date-tile {
  background: var(--full-border);
}

.event-card--full .event-card__need progress::-webkit-progress-value {
  background: var(--full-border);
}

.event-card--full .event-card__need progress::-moz-progress-bar {
  background: var(--full-border);
}

/* --- UX-Review 01.10.2026: Startseite, lange Einsatzlisten, Auswahl ---------------- */

.event-card__kind {
  margin: 0 0 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge--members {
  background: var(--surface-alt);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.filter-chip {
  display: inline-block;
  min-height: 2.25rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.filter-chip:hover {
  border-color: var(--brand);
}

/* The active chip is marked by aria-current, shown as filled (not only by colour). */
.filter-chip[aria-current="page"] {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #ffffff;
}

.filter-chip[aria-current="page"]::before {
  content: "✓ ";
}

.shift-tools {
  margin: 0 0 1rem;
}

.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-small);
  background: var(--surface-alt);
}

.jump-nav__label {
  font-weight: 700;
}

.shift-tools__filter {
  margin: 0.5rem 0 0;
}

.shift-area > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  cursor: pointer;
  list-style-position: outside;
}

.shift-area > summary h3 {
  display: inline;
  margin: 0;
}

.shift-area__count {
  color: var(--muted);
  font-size: 0.9rem;
}

.shift-area[open] > summary {
  margin-bottom: 0.5rem;
}

/* Jump targets stay below the top edge. */
.shift-area {
  scroll-margin-top: 1rem;
}

/* Selection above the form: counts ticked boxes without script. */
form {
  counter-reset: picked;
}

input[name="shifts"]:checked {
  counter-increment: picked;
}

.selection__count::before {
  content: counter(picked);
}

.selection {
  margin: 0 0 1rem;
  padding: 0.6rem 0.8rem;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-small);
  background: var(--brand-tint);
}

.selection p {
  margin: 0;
}

.selection__none {
  display: none;
}

form:not(:has(input[name="shifts"]:checked)) .selection__live {
  display: none;
}

form:not(:has(input[name="shifts"]:checked)) .selection__none {
  display: block;
}

.selection__list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}


/* Visible open/closed marker (flex removes the default one). */
.shift-area > summary {
  list-style: none;
}

.shift-area > summary::-webkit-details-marker {
  display: none;
}

.shift-area > summary::before {
  content: "▾";
  color: var(--brand-strong);
}

.shift-area:not([open]) > summary::before {
  content: "▸";
}

/* --- UX-Review 01.10.2026: Meine Anmeldungen als Dashboard ------------------------ */

/* The next date spans the full width and carries a label and a date tile. */
.signup-card--next {
  grid-column: 1 / -1;
  border: 2px solid var(--brand);
}

.signup-card__next {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-darker);
}

.signup-card__head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  min-width: 0;
}

.signup-card__head > div:last-child {
  min-width: 0;
}

.date-tile--small {
  width: 3.5rem;
  min-height: 3.5rem;
  align-self: auto;
}

.signup-card__label {
  margin: 0;
  font-weight: 700;
}

.signup-card__options ul,
.signup-card__contact ul {
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
}

.signup-card__when {
  font-weight: 700;
}

.signup-card__contact a[href^="tel:"] {
  white-space: nowrap;
}

.signup-card__whatsapp {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
}

.past-signups > summary {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  cursor: pointer;
  list-style: none;
}

.past-signups > summary::-webkit-details-marker {
  display: none;
}

.past-signups > summary::before {
  content: "▸";
  color: var(--brand-strong);
}

.past-signups[open] > summary::before {
  content: "▾";
}

.past-signups > summary h2 {
  display: inline;
}

/* --- UX-Review 01.10.2026: Backoffice-Übersicht als Dashboard --------------------- */

.dashboard-figures {
  margin-bottom: 1rem;
}

.stat-tile--warn {
  box-shadow: inset 4px 0 0 var(--yellow);
}

.dashboard-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1rem;
  margin: 0 0 1.5rem;
}

.dashboard-filter .field {
  margin: 0;
  min-width: 10rem;
}

.dashboard-filter .actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* Status by text in every tag; colour only adds emphasis. */
.status-tag--open {
  background: var(--success-tint);
  color: var(--success);
}

.status-tag--closed,
.status-tag--quiet {
  background: var(--surface-alt);
  color: var(--muted);
}

.status-tag--warn {
  background: var(--yellow-tint);
  color: #6b5200;
}

.status-tag--full {
  background: var(--full-tint);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--full-border);
}

.occupancy-cell {
  display: grid;
  gap: 0.2rem;
  min-width: 9rem;
}

.occupancy-cell progress {
  width: 100%;
  height: 0.45rem;
}

/* --- UX-Review 01.10.2026: Admin-Anlassdetail ------------------------------------- */

/* Long values get two columns where there is room. */
@media (min-width: 40rem) {
  .stat-tile--wide {
    grid-column: span 2;
  }
}

.card__summary {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.ok-missing {
  margin: 0 0 0.25rem;
}

/* === Layout-Feinschliff 02.10.2026 ================================================= */

/* 1. Start page cards: status and CTA anchored at the bottom, separated the same way
   for helper and club events; club events show a neutral count, no capacity bar. */
.event-card__footer {
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  margin-top: auto;
}

.event-card__kind + .event-card__title {
  margin-top: 0;
}

.badge--count {
  background: var(--surface-alt);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

/* 2. Jump navigation as compact chips that wrap; long names wrap inside the chip. */
.jump-nav {
  gap: 0.4rem;
}

.jump-nav a {
  display: inline-block;
  max-width: 100%;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-darker);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.jump-nav a:hover,
.jump-nav a:focus-visible {
  border-color: var(--brand);
}

.jump-nav__label {
  width: 100%;
  font-size: 0.9rem;
}

/* 3. The whole shift card toggles the choice: the existing label is stretched over
   the card, so the checkbox stays the only control (no nested interactive elements). */
.shift label::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.shift input[type="checkbox"],
.shift input[type="radio"] {
  position: relative;
  z-index: 1;
}

.shift:has(input:not(:disabled)) {
  cursor: pointer;
}

.shift:has(input:checked) {
  border-color: var(--brand-strong);
  background: var(--brand-tint);
}

.shift:has(input:focus-visible) {
  outline: 3px solid var(--brand-darker);
  outline-offset: 2px;
}

/* 4. Selection summary: lines hidden until auswahl.css shows the ticked ones. */
.selection__item {
  display: none;
}

.selection__list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

form:not(:has(input[name="shifts"]:checked)) .selection__list {
  display: none;
}

.selection {
  padding: 0.75rem 1rem;
}

/* 5. «Meine Anmeldungen»: the action row always sits at the bottom of the card,
   separated by a line, with the same gaps in every card. */
.signup-card {
  height: 100%;
}

.signup-card__actions {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  align-items: center;
}

.signup-card__actions-note {
  flex-basis: 100%;
  margin: 0;
}

/* 6. Notices by purpose: same shape, a text symbol in front, so the kind is not told
   by colour alone. */
.notice,
.leave-rule {
  position: relative;
  padding-left: 2.6rem;
}

.notice::before,
.leave-rule::before {
  position: absolute;
  left: 0.85rem;
  top: 0.8rem;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2rem;
  text-align: center;
  color: #ffffff;
  content: "i";
  background: var(--brand-strong);
}

.leave-rule::before {
  content: "!";
  background: var(--brand-darker);
}

.notice--warning::before {
  content: "!";
  background: #8a6700;
}

.notice--error::before {
  content: "×";
  background: var(--error);
}

.notice--success::before {
  content: "✓";
  background: var(--success);
}

.leave-rule {
  border-left-width: 5px;
  background: var(--brand-tint);
}

/* 7. Profile: deleting the account is a framed danger zone, not a next step. */
.account-manage {
  margin-top: 2rem;
}

.danger-zone--boxed {
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--error);
  border-radius: var(--radius-small);
  background: var(--surface);
}

/* 8. Narrow screens: long words never push the page wider than the viewport. */
h1,
h2,
h3,
.hero h1 {
  overflow-wrap: anywhere;
}

@media (max-width: 30rem) {
  .actions .button,
  .signup-card__actions .button {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* === Backoffice-Review 02.10.2026: verbindliche Masse und Arbeitsfluss ============ */

/* Binding values: page margin 24/16 px, sections 32 px apart, 16 px inside a section,
   8 px between label and field, 48 px controls, framed areas 24/16 px, corners 8 px. */
:root {
  --bo-page: 1.5rem;
  --bo-section: 2rem;
  --bo-inner: 1rem;
  --bo-label: 0.5rem;
  --bo-control: 3rem;
  --bo-frame: 1.5rem;
  --bo-corner: 0.5rem;
}

@media (max-width: 40rem) {
  :root {
    --bo-page: 1rem;
    --bo-frame: 1rem;
  }
}

.backoffice main .container,
.backoffice .site-header__inner {
  padding-left: var(--bo-page);
  padding-right: var(--bo-page);
}

.backoffice .card {
  padding: var(--bo-frame);
  border-radius: var(--bo-corner);
  margin-bottom: var(--bo-section);
}

.backoffice .card__title,
.backoffice .card > h2 {
  margin-bottom: var(--bo-inner);
}

.backoffice .field {
  margin-bottom: var(--bo-inner);
}

.backoffice .field > label,
.backoffice .field-legend {
  display: block;
  margin-bottom: var(--bo-label);
}

/* One control height for search, selects and buttons. */
.backoffice input[type="search"],
.backoffice input[type="text"],
.backoffice input[type="email"],
.backoffice input[type="url"],
.backoffice input[type="tel"],
.backoffice input[type="date"],
.backoffice input[type="time"],
.backoffice input[type="number"],
.backoffice input[type="password"],
.backoffice select {
  width: 100%;
  min-height: var(--bo-control);
  height: var(--bo-control);
  box-sizing: border-box;
  font: inherit;
  padding: 0 0.85rem;
  border: 1px solid #8a96a3;
  border-radius: var(--bo-corner);
  background: var(--surface);
}

.backoffice .button:not(.button--small) {
  height: var(--bo-control);
  min-height: var(--bo-control);
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}

.backoffice .button--small {
  min-height: 2.25rem;
}

/* Filter row: search takes the most room, all controls on one baseline. */
.dashboard-filter {
  align-items: flex-end;
  gap: var(--bo-inner);
  margin-bottom: var(--bo-section);
}

.dashboard-filter .field {
  margin: 0;
  flex: 1 1 10rem;
}

.dashboard-filter .field--grow {
  flex: 3 1 16rem;
}

.dashboard-filter .checkbox-field {
  min-height: var(--bo-control);
  display: flex;
  align-items: center;
}

@media (max-width: 40rem) {
  .dashboard-filter .field--grow {
    flex-basis: 100%;
  }
}

/* Event page: work area full width, cards below in a grid, settings last. */
.event-work__grid {
  display: grid;
  gap: 0 var(--bo-inner);
}

@media (min-width: 64rem) {
  .event-work__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bo-label);
  align-items: center;
}

.share-row .share-field {
  flex: 1 1 18rem;
  min-width: 0;
}

.stat-tile--plain dd {
  font-size: 1rem;
  font-weight: 400;
}

.note-details > summary {
  cursor: pointer;
  color: var(--brand-strong);
  font-size: 0.9rem;
}

.note-details[open] > summary {
  margin-bottom: 0.25rem;
}

.people-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.75rem;
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}

.people-details dt {
  font-weight: 700;
  color: var(--muted);
}

.people-details dd {
  margin: 0;
}

.add-person > summary,
.summary-details > summary {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  cursor: pointer;
  list-style: none;
}

.add-person > summary::-webkit-details-marker,
.summary-details > summary::-webkit-details-marker {
  display: none;
}

.add-person > summary::before,
.summary-details > summary::before {
  content: "▸";
  color: var(--brand-strong);
}

.add-person[open] > summary::before,
.summary-details[open] > summary::before {
  content: "▾";
}

.add-person > summary h2,
.summary-details > summary h2 {
  display: inline;
  margin: 0;
}

/* Forms: max. 760 px, short sections, rows side by side on wide screens. */
.form-narrow {
  max-width: 47.5rem;
}

.form-section {
  border: 0;
  margin: 0 0 var(--bo-section);
  padding: 0;
}

.form-section__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--bo-inner);
}

.field-row {
  display: grid;
  gap: 0 var(--bo-inner);
}

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

/* «Auswahl der Optionen» only for club events. */
.event-form:has(input[name="kind"][value="helfereinsatz"]:checked) .field--option_mode {
  display: none;
}

/* Mobile: event, people and member tables become labelled cards (no page scroll). */
@media (max-width: 40rem) {
  .table--events thead,
  .table--people thead,
  .table--members thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .table--events,
  .table--events tbody,
  .table--events tr,
  .table--events td,
  .table--people,
  .table--people tbody,
  .table--people tr,
  .table--people td,
  .table--members,
  .table--members tbody,
  .table--members tr,
  .table--members td {
    display: block;
    width: 100%;
  }

  .table--events tr,
  .table--people tr,
  .table--members tr {
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }

  .table--events td,
  .table--people td,
  .table--members td {
    display: flex;
    gap: 0.75rem;
    border: 0;
    padding: 0.3rem 0;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .table--events td::before,
  .table--people td::before,
  .table--members td::before {
    content: attr(data-label);
    flex: 0 0 6.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
  }

  .table-wrap:has(.table--events, .table--people, .table--members) {
    overflow: visible;
  }

  .backoffice .bo-title {
    flex-wrap: wrap;
  }
}

/* === Anlassdetail im einheitlichen Raster (02.10.2026) ============================= */

/* Key figures: tiles of one row equally high, label at the top and value right below
   it at the same position in every tile, one padding for all. */
.event-head .stat-tiles {
  align-items: stretch;
  gap: var(--bo-inner);
}

.event-head .stat-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.25rem;
  padding: var(--bo-inner);
  border-radius: var(--bo-corner);
}

.event-head .stat-tile dt {
  margin: 0;
  line-height: 1.2;
}

.event-head .stat-tile dd {
  margin: 0;
  line-height: 1.35;
}

/* Management, list and organizers: one row of three equal tiles on wide screens,
   flush at top and bottom; heading at the top, actions at the bottom, 24 px inside. */
.event-work__grid {
  gap: var(--bo-inner);
  margin-bottom: var(--bo-section);
}

.event-work__grid > .card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: var(--bo-frame);
  min-width: 0;
}

.event-work__grid > .card > .card__title {
  margin: 0 0 var(--bo-inner);
  line-height: 1.3;
}

.event-work__grid > .card > :last-child {
  margin-top: auto;
}

.event-work__grid > .card > .card__actions:last-child,
.event-work__grid > .card > form:last-child {
  padding-top: var(--bo-inner);
}

@media (min-width: 64rem) {
  .event-work__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}

/* Small screens: tiles stacked, 16 px apart, natural height. */
@media (max-width: 63.99rem) {
  .event-work__grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .event-work__grid > .card > :last-child {
    margin-top: 0;
  }
}

/* Long values and table cells wrap instead of widening the page. */
.event-work .table--calm td,
.event-work__grid > .card {
  overflow-wrap: anywhere;
}

/* --- Filter «Nur offene Einsätze anzeigen» (02.10.2026) ---------------------------- */

/* Off by default; on: fully booked shifts, areas and days without open shifts and
   their jump links are hidden. Pure CSS, the checkbox is never submitted. */
.shift-filter {
  margin: 0 0 0.75rem;
}

.shift-filter__empty {
  display: none;
}

main:has(#nur-offene:checked) .shift--full,
main:has(#nur-offene:checked) .shift-area--full,
main:has(#nur-offene:checked) .shift-day--full,
main:has(#nur-offene:checked) .jump-nav__link--full {
  display: none;
}

main:has(#nur-offene:checked) .shift-filter__empty {
  display: block;
}

/* --- Anlassseite: Filter und Sprunglinks in einer Zeile (03.10.2026) ----------------- */

/* Like the backoffice dashboard filter: one row, same left edge as the heading,
   controls centred on a 48 px line, no inset box; wraps on small screens. */
.shift-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.shift-tools .shift-filter {
  min-height: 3rem;
  margin: 0;
  align-items: center;
}

.shift-tools .shift-filter input {
  margin: 0;
}

.shift-tools .jump-nav {
  flex: 1 1 20rem;
  align-items: center;
  min-height: 3rem;
  padding: 0;
  background: none;
}

.shift-tools .jump-nav__label {
  width: auto;
}

.shift-tools .shift-filter__empty {
  flex-basis: 100%;
  margin: 0;
}

/* === Meine Anmeldungen übersichtlich (03.10.2026) ================================== */

/* All cards stacked in the page width, 16 px apart, natural height; 32 px between the
   main sections; 16 px between content groups of a card, 8 px inside a group. */
.signup-cards {
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0 0 2rem;
}

@media (min-width: 56rem) {
  .signup-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.signups-intro {
  margin: 0 0 2rem;
}

.signup-card {
  height: auto;
  gap: 1rem;
}

.signup-card--next {
  grid-column: auto;
  border: 1px solid var(--border);
}

.signup-card__head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.signup-card__kind {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Quiet mark for the next date: a small label, no heavy frame. */
.signup-card__next {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-darker);
}

.signup-card__options ul {
  margin: 0.5rem 0 0;
}

/* Shifts as compact rows separated by fine lines. Desktop: date, time, task and
   action start on shared column edges; mobile: stacked; long tasks wrap fully. */
.signup-card__items {
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.signup-card__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
}

.signup-card__day {
  font-weight: 700;
}

.signup-card__task {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.signup-card__replace {
  justify-self: start;
}

@media (min-width: 40rem) {
  .signup-card__item {
    grid-template-columns: 8rem 8.5rem minmax(0, 1fr) auto;
    gap: 1rem;
  }
}

.signup-card__rule {
  margin: 0;
  font-weight: 600;
}

/* Rules and contact on demand, as plain disclosure lines, not boxes inside the card. */
.signup-card__more {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.signup-card__details > summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  cursor: pointer;
  color: var(--brand-strong);
  font-weight: 600;
}

.signup-card__details .leave-rule {
  margin: 0.5rem 0 0;
  padding: 0;
  border: 0;
  background: none;
}

.signup-card__details .leave-rule::before {
  content: none;
}

.signup-card__contact {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

/* One action row at the end: same size and gaps for every button, 44 px targets. */
.signup-card__actions {
  margin-top: 0;
  padding-top: 1rem;
  gap: 0.5rem;
}

.signup-card .button--small {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Past section: the toggle sits after the title, so all titles share one left edge. */
.past-signups > summary::before {
  content: none;
}

.past-signups > summary::after {
  content: "▸";
  color: var(--brand-strong);
}

.past-signups[open] > summary::after {
  content: "▾";
}

.page--signups {
  max-width: 56rem;
}

.signup-card__task {
  overflow-wrap: break-word;
  hyphens: auto;
}

.signup-card__details > summary {
  list-style: none;
  gap: 0.4rem;
}

.signup-card__details > summary::-webkit-details-marker {
  display: none;
}

.signup-card__details > summary::after {
  content: "▸";
}

.signup-card__details[open] > summary::after {
  content: "▾";
}

.signup-card__leave-hint {
  margin: 0;
}

/* Mobile: every action button in the row gets the full width, so all have one size. */
@media (max-width: 30rem) {
  .signup-card__actions > *,
  .signup-card__actions form .button {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* --- Auswahl ändern (06.10.2026) ------------------------------------------------------ */

.change-options fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.change-options__list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.change-options__list .checkbox-field {
  min-height: 2.75rem;
  align-items: center;
}

.change-options__list input[type="radio"] {
  width: 1.4rem;
  height: 1.4rem;
  margin: 0;
  flex: none;
  accent-color: var(--brand-strong);
}

/* --- Mitgliederstamm aus Fairgate (ADR-0023) ---------------------------------------- */

.import-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bo-label, 0.5rem) var(--bo-inner, 1rem);
  margin: 0 0 var(--bo-inner, 1rem);
  padding: 0;
  list-style: none;
  counter-reset: import-step;
  color: var(--muted);
}

.import-steps li {
  counter-increment: import-step;
}

.import-steps li::before {
  content: counter(import-step) ". ";
}

.import-summary {
  margin: 0 0 var(--bo-section, 2rem);
  list-style: none;
  padding: 0;
}

.roster-details > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.roster-details > summary h2 {
  margin: 0;
}

.import-steps [aria-current="step"] {
  color: var(--text, inherit);
  font-weight: 700;
}

.import-errors {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--error);
}

.roster-signups {
  list-style: none;
  margin: 0;
  padding: 0;
}

.roster-signups > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--bo-label, 0.5rem) var(--bo-inner, 1rem);
  padding: var(--bo-label, 0.5rem) 0;
  border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
}

.mail-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  margin: 0;
  padding: var(--bo-inner, 1rem);
  border: 1px solid var(--border);
  border-radius: var(--bo-corner, 0.5rem);
  background: var(--surface-alt);
}

.roster-invite-actions {
  margin-top: 0;
}

/* Custom date range only when «Eigener Zeitraum» is chosen (no script, CSP). */
.roster-filter:not(:has(#saison option[value="eigen"]:checked)) .roster-filter__custom {
  display: none;
}

/* Action bar of the member overview: hidden until a person is ticked; the CSS counter
   counts the ticked boxes that come before it in the form (no script, CSP). */
.roster-select {
  counter-reset: roster-selected;
}

.roster-select input[name="person"]:checked {
  counter-increment: roster-selected;
}

.roster-actionbar {
  display: none;
  position: sticky;
  bottom: 0;
  align-items: center;
  gap: var(--bo-inner, 1rem);
  margin-top: var(--bo-inner, 1rem);
  padding: var(--bo-label, 0.5rem) var(--bo-inner, 1rem);
  border: 1px solid var(--border);
  border-radius: var(--bo-corner, 0.5rem);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.roster-select:has(input[name="person"]:checked) .roster-actionbar {
  display: flex;
}

.roster-actionbar__count::before {
  content: counter(roster-selected);
  font-weight: 700;
}

.roster-invite-all {
  margin-top: var(--bo-inner, 1rem);
}

.roster-invite-all > summary {
  cursor: pointer;
  color: var(--brand-strong);
  font-weight: 600;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.roster-datastate {
  margin: 0 0 var(--bo-inner, 1rem);
  color: var(--muted);
}

.roster-admin > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  cursor: pointer;
}

.roster-admin > summary h2 {
  margin: 0;
  font-size: 1rem;
}

.roster-admin__title {
  margin: var(--bo-inner, 1rem) 0 var(--bo-label, 0.5rem);
  font-size: 1rem;
}
