:root {
  --au-control-red: #e5142a;
  --au-control-pink: #ff4b7e;
  --au-control-ink: #241318;
  --au-control-surface: #fff;
  --au-control-line: rgba(36, 19, 24, 0.18);
  --au-control-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Eine echte Checkbox bleibt im DOM und per Tastatur erreichbar. */
.check-item {
  position: relative;
}

.check-item > input[type="checkbox"] {
  display: block !important;
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.check-box {
  --check-size: 30px;
  position: relative;
  inline-size: var(--check-size) !important;
  block-size: var(--check-size) !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 var(--check-size) !important;
  overflow: visible;
  border: 2px solid color-mix(in srgb, var(--au-control-red) 72%, #4a202b) !important;
  border-radius: 7px !important;
  background: color-mix(in srgb, var(--au-control-ink) 94%, transparent) !important;
  color: var(--au-control-pink) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transform: none !important;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms var(--au-control-ease) !important;
}

.check-box::after {
  content: none !important;
}

/* 29.08.2026 - das Hakenzeichen haengt jetzt an der Kastengroesse statt an
   einer festen Zahl. Vorher stand hier 23px fest, waehrend --check-size je
   nach Seite anders gesetzt wird: auf der Guideline-Seite 22px. Ein 23px
   grosses Zeichen in einem 22px kleinen Kasten - der Haken war groesser als
   sein Kasten und stand ueber die Rundung hinaus (Mert: "haken sitzt nicht
   passend"). Der Faktor .767 ist so gewaehlt, dass die Standardgroesse 30px
   weiterhin exakt 23px ergibt: der gewohnte Anblick bleibt, nur skaliert er
   jetzt mit. */
.check-box svg {
  inline-size: calc(var(--check-size, 30px) * .767);
  block-size: calc(var(--check-size, 30px) * .767);
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check-box svg path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  transform-origin: center;
  transition: stroke-dashoffset 260ms var(--au-control-ease), transform 260ms var(--au-control-ease);
}

.check-item > input:checked + .check-box {
  border-color: var(--au-control-pink) !important;
  background: rgba(229, 20, 42, 0.13) !important;
  box-shadow: 0 0 0 4px rgba(229, 20, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: scale(1.06) !important;
}

.check-item > input:checked + .check-box svg path {
  stroke-dashoffset: 0;
  transform: scale(1.08);
}

.check-item > input:focus-visible + .check-box {
  outline: 3px solid rgba(229, 20, 42, 0.28);
  outline-offset: 3px;
}

.neon-check-ring,
.neon-check-particle {
  position: absolute;
  pointer-events: none;
  opacity: 0;
}

.neon-check-ring {
  inset: -6px;
  border: 1px solid var(--au-control-pink);
  border-radius: 50%;
}

.neon-check-particle {
  inset-inline-start: 50%;
  inset-block-start: 50%;
  inline-size: 4px;
  block-size: 4px;
  border-radius: 50%;
  background: var(--au-control-pink);
}

.check-item > input:checked + .check-box .neon-check-ring {
  animation: auCheckRing 520ms var(--au-control-ease) both;
}

.check-item > input:checked + .check-box .neon-check-particle {
  animation: auCheckParticle 460ms var(--au-control-ease) both;
}

@keyframes auCheckRing {
  0% { opacity: 0.65; transform: scale(0.72); }
  100% { opacity: 0; transform: scale(1.65); }
}

@keyframes auCheckParticle {
  0% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--px)), calc(-50% + var(--py))) scale(0.2); }
}

/* Native Semantik, eigene sichtbare Auswahl. */
.au-select-shell {
  position: relative;
  inline-size: 100%;
}

.au-select-source {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  margin: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.au-select-button {
  inline-size: 100%;
  min-block-size: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--au-control-line);
  border-radius: 12px;
  background: var(--au-control-surface);
  color: var(--au-control-ink);
  font: 600 15px/1.2 Manrope, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.au-select-button:hover,
.au-select-button[aria-expanded="true"] {
  border-color: rgba(229, 20, 42, 0.7);
  box-shadow: 0 0 0 3px rgba(229, 20, 42, 0.09);
}

.au-select-button:focus-visible {
  outline: 3px solid rgba(229, 20, 42, 0.25);
  outline-offset: 2px;
}

.au-select-button[data-placeholder="true"] .au-select-value {
  color: color-mix(in srgb, var(--au-control-ink) 56%, transparent);
}

.au-select-source.vg-invalid + .au-select-shell .au-select-button {
  border-color: #c31331;
  box-shadow: 0 0 0 3px rgba(195, 19, 49, 0.12);
}

.au-select-chevron {
  inline-size: 20px;
  block-size: 20px;
  flex: none;
  transition: transform 200ms cubic-bezier(0.77, 0, 0.175, 1);
}

.au-select-button[aria-expanded="true"] .au-select-chevron {
  transform: rotate(180deg);
}

.au-select-list {
  position: fixed;
  z-index: 1300;
  max-block-size: min(320px, 52vh);
  overflow-y: auto;
  padding: 5px;
  border: 1px solid rgba(36, 19, 24, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--au-control-ink);
  box-shadow: 0 8px 20px rgba(39, 18, 27, 0.15);
  transform-origin: top center;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 180ms var(--au-control-ease), transform 180ms var(--au-control-ease);
}

.au-select-list[data-open="true"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.au-select-option {
  inline-size: 100%;
  min-block-size: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: 600 14px/1.35 Manrope, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 180ms var(--au-control-ease), transform 180ms var(--au-control-ease), background-color 140ms ease;
}

.au-select-list[data-open="true"] .au-select-option {
  opacity: 1;
  transform: none;
}

.au-select-option:hover,
.au-select-option:focus-visible,
.au-select-option[aria-selected="true"] {
  outline: 0;
  background: rgba(229, 20, 42, 0.09);
  color: #ac102b;
}

@media (max-width: 560px) {
  .check-item { align-items: flex-start !important; gap: 13px !important; padding: 15px !important; }
  .check-box { margin-top: 1px; }
  .check-item .txt { min-width: 0; font-size: 16px; line-height: 1.45; }
}

@media (prefers-reduced-motion: reduce) {
  .check-box,
  .check-box svg path,
  .au-select-chevron,
  .au-select-list,
  .au-select-option { transition-duration: 1ms !important; }
  .neon-check-ring,
  .neon-check-particle { animation: none !important; }
}
