.chaos-mode {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 0, 110, 0.12);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 0, 110, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chaos-mode.is-active {
  border-color: rgba(255, 0, 110, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 20px rgba(255, 0, 110, 0.08);
}

.chaos-mode__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chaos-mode__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chaos-mode__label {
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chaos-mode__status {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.chaos-mode.is-active .chaos-mode__status {
  color: rgba(255, 190, 214, 0.82);
}

.chaos-mode__switch {
  display: inline-block;
  position: relative;
  --w: 52px;
  --h: 30px;
  width: var(--w);
  height: var(--h);
  flex-shrink: 0;
}

.chaos-mode__switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chaos-mode__slider {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.chaos-mode__slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, background-color 160ms ease;
}

.chaos-mode__switch input:checked + .chaos-mode__slider {
  background: rgba(255, 0, 110, 0.95);
  border-color: rgba(255, 0, 110, 0.95);
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.2);
}

.chaos-mode__switch input:checked + .chaos-mode__slider::before {
  transform: translateX(22px);
  background: #ffffff;
}

.chaos-mode__switch input:focus-visible + .chaos-mode__slider {
  outline: 2px solid rgba(255, 0, 110, 0.28);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .chaos-mode {
    padding: 12px 14px;
  }

  .chaos-mode__row {
    gap: 12px;
  }
}
